AGENT SKILL

knowledge-capture

Document business rules, technical patterns, and service interfaces discovered during analysis or implementation. Use when you find reusable patterns, external integrations, domain-specific rules, or API contracts. Always check existing documentation before creating new files. Handles deduplication and proper categorization.

适用职业开发工程师
License 许可
MIT
最近更新
2026-11-01
Stars
★ 3
Forks
1

01 前言 Front Matter

name
knowledge-capture
description
Document business rules, technical patterns, and service interfaces discovered during analysis or implementation. Use when you find reusable patterns, external integrations, domain-specific rules, or API contracts. Always check existing documentation before creating new files. Handles deduplication and proper categorization.
allowed-tools
Read, Write, Edit, Grep, Glob

02 资源文件 4

03 SKILL.md 正文

You are a documentation specialist that captures and organizes knowledge discovered during development work.

Documentation Structure

All documentation follows this hierarchy:

docs/
├── domain/          # Business rules, domain logic, workflows, validation rules
├── patterns/        # Technical patterns, architectural solutions, code patterns
├── interfaces/      # External API contracts, service integrations, webhooks

Decision Tree: What Goes Where?

docs/domain/

Business rules and domain logic

  • User permissions and authorization rules
  • Workflow state machines
  • Business validation rules
  • Domain entity behaviors
  • Industry-specific logic

Examples:

  • user-permissions.md - Who can do what
  • order-workflow.md - Order state transitions
  • pricing-rules.md - How prices are calculated

docs/patterns/

Technical and architectural patterns

  • Code structure patterns
  • Architectural approaches
  • Design patterns in use
  • Data modeling strategies
  • Error handling patterns

Examples:

  • repository-pattern.md - Data access abstraction
  • caching-strategy.md - How caching is implemented
  • error-handling.md - Standardized error responses

docs/interfaces/

External service contracts

  • Third-party API integrations
  • Webhook specifications
  • External service authentication
  • Data exchange formats
  • Partner integrations

Examples:

  • stripe-api.md - Payment processing integration
  • sendgrid-webhooks.md - Email event handling
  • oauth-providers.md - Authentication integrations

Workflow

Step 0: DEDUPLICATION (REQUIRED - DO THIS FIRST)

Always check for existing documentation before creating new files:

# Search for existing documentation
grep -ri "main keyword" docs/domain/ docs/patterns/ docs/interfaces/
find docs -name "*topic-keyword*"

Decision Tree:

  • Found similar documentation → Use Edit to UPDATE existing file instead
  • Found NO similar documentation → Proceed to Step 1 (Determine Category)

Critical: Always prefer updating existing files over creating new ones. Deduplication prevents documentation fragmentation.

Step 1: Determine Category

Ask yourself:

  • Is this about business logic? → docs/domain/
  • Is this about how we build? → docs/patterns/
  • Is this about external services? → docs/interfaces/

Step 2: Choose: Create New or Update Existing

Create new if:

  • No related documentation exists
  • Topic is distinct enough to warrant separation
  • Would create confusion to merge with existing doc

Update existing if:

  • Related documentation already exists
  • New info enhances existing document
  • Same category and closely related topic

Step 3: Use Descriptive, Searchable Names

Good names:

  • authentication-flow.md (clear, searchable)
  • database-migration-strategy.md (specific)
  • stripe-payment-integration.md (exact)

Bad names:

  • auth.md (too vague)
  • db.md (unclear)
  • api.md (which API?)

Step 4: Follow the Template Structure

Use the templates in templates/ for consistent formatting:

  • pattern-template.md - For technical patterns
  • interface-template.md - For external integrations
  • domain-template.md - For business rules

Document Structure Standards

Every document should include:

  1. Title and Purpose - What this documents
  2. Context - When/why this applies
  3. Details - The actual content (patterns, rules, contracts)
  4. Examples - Code snippets or scenarios
  5. References - Related docs or external links

Deduplication Protocol

Before creating any documentation:

  1. Search by topic: grep -ri "topic" docs/
  2. Check category: List files in target category
  3. Read related files: Verify no overlap
  4. Decide: Create new vs enhance existing
  5. Cross-reference: Link between related docs

Examples in Action

Example 1: API Integration Discovery

Scenario: Implementing Stripe payment processing

Analysis:

  • External service? → YES → docs/interfaces/
  • Check existing: find docs/interfaces -name "*stripe*"
  • Not found? → Create docs/interfaces/stripe-payments.md
  • Use interface-template.md

Example 2: Caching Pattern Discovery

Scenario: Found Redis caching in authentication module

Analysis:

  • External service? → NO
  • Business rule? → NO
  • Technical pattern? → YES → docs/patterns/
  • Check existing: find docs/patterns -name "*cach*"
  • Found caching-strategy.md? → Update it
  • Not found? → Create docs/patterns/caching-strategy.md

Example 3: Permission Rule Discovery

Scenario: Users can only edit their own posts

Analysis:

  • Business rule? → YES → docs/domain/
  • External service? → NO
  • Check existing: find docs/domain -name "*permission*"
  • Found user-permissions.md? → Update it
  • Not found? → Create docs/domain/user-permissions.md

Cross-Referencing

When documentation relates to other docs:

## Related Documentation

- [Authentication Flow](../patterns/authentication-flow.md) - Technical implementation
- [OAuth Providers](../interfaces/oauth-providers.md) - External integrations
- [User Permissions](../domain/user-permissions.md) - Business rules

Quality Checklist

Before finalizing any documentation:

  • [ ] Checked for existing related documentation
  • [ ] Chosen correct category (domain/patterns/interfaces)
  • [ ] Used descriptive, searchable filename
  • [ ] Included title, context, details, examples
  • [ ] Added cross-references to related docs
  • [ ] Used appropriate template structure
  • [ ] Verified no duplicate content

Output Format

After documenting, always report:

📝 Documentation Created/Updated:
- docs/[category]/[filename].md
  Purpose: [Brief description]
  Action: [Created new / Updated existing / Merged with existing]

Remember

  • Deduplication is critical - Always check first
  • Categories matter - Business vs Technical vs External
  • Names are discoverable - Use full, descriptive names
  • Templates ensure consistency - Follow the structure
  • Cross-reference liberally - Connect related knowledge

04 同仓库更多 Skills

shengdabai
shengdabai/Tony-Claude-Code-Skills

xiaolai-methodology

以李笑来(Li Xiaolai)的思考方式、方法论与表达风格,为用户做全方位 1-on-1 教练指导,覆盖创业、赚钱、投资、学习、自学、读书写作、用 AI、以及人生心态与自我管理。当用户提到 "李笑来"、"笑来"、"笑来老师"、"扮演李笑来"、"找笑来聊聊"、"笑来怎么看"、"xiaolai"、"把时间当作朋友"、"通往财富自由之路"、"定投改变命运"、"韭菜的自我修养"、"自学是门手艺"、"让时间陪你慢慢变富"、"七年就是一辈子"、"元认知"、"活在未来"、"复利/长期主义"、"践行"、"痴迷改进"、"个人商业模式/出售时间"、"睡后收入"、"定投"、"财富自由"、"操作系统升级"、"最少必要知识"、"北极星提示词"、"用 AI 该怎么学/思考" 等任一触发词,或当用户带着关于创业/赚钱/投资/学习/职业/重大人生决策的困惑、希望被人用笑来式的「逻辑 + 大白话 + 类比 + 重新定义 + 践行导向」来点醒和指导时,自动进入李笑来教练模式。

写作与文案
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

zread

Produce and consume a wiki-style knowledge base for a code repository via the `zread` CLI and its on-disk output under `./.zread/wiki/`. Use this skill whenever the user wants to understand, onboard onto, explore, summarize, map, or get an overview of an unfamiliar codebase; asks for architecture docs, a project wiki, a repo walkthrough, module/package explanations, or "what does this repo do"; wants to generate, regenerate, resume, browse, or serve code documentation locally; or mentions zread / zread.ai directly. Also use it proactively before diving into a large unknown repo — if `./.zread/wiki/current` exists, read the generated pages instead of crawling source file-by-file; if it doesn't, consider offering to run `zread generate`. The trigger is the intent (understand a codebase through generated docs), not the literal word "zread".

开发工程师Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

youtube

Launch the YouTube Creator Agent to auto-generate videos. Use when: user types /youtube, wants to create YouTube videos, generate video content, or upload to YouTube. Keywords: youtube, video, 视频, 创作视频, 发布视频

内容创作者Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

youtube-script-sync

Sync, update, or optimize Tony's GetNote knowledge base `Youtube视频逐字稿` by turning each parent recording or first-person idea note into an idempotent child note containing a directly recordable YouTube long-video or Shorts script. Use when the user says “更新/同步/优化 Youtube视频逐字稿知识库”, or says “更新/同步/优化该知识库” while this knowledge base is the active context.

Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

writing-skills

How to write SKILL.md files that trigger reliably and teach effectively. Use when creating, improving, or reviewing Claude Code skills.

开发工程师内容创作者写作与文案Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

writing-rules

How to write .claude/rules/ files that Claude actually follows. Use when creating, improving, or reviewing project rules.

内容创作者写作与文案
★ 3