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
- 参考文档reference.md11.1 KB
- 参考文档templates/domain-template.md6.2 KB
- 参考文档templates/interface-template.md4.7 KB
- 参考文档templates/pattern-template.md2.7 KB
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 whatorder-workflow.md- Order state transitionspricing-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 abstractioncaching-strategy.md- How caching is implementederror-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 integrationsendgrid-webhooks.md- Email event handlingoauth-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 patternsinterface-template.md- For external integrationsdomain-template.md- For business rules
Document Structure Standards
Every document should include:
- Title and Purpose - What this documents
- Context - When/why this applies
- Details - The actual content (patterns, rules, contracts)
- Examples - Code snippets or scenarios
- References - Related docs or external links
Deduplication Protocol
Before creating any documentation:
- Search by topic:
grep -ri "topic" docs/ - Check category: List files in target category
- Read related files: Verify no overlap
- Decide: Create new vs enhance existing
- 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
seedance-prompt-en
Write effective prompts for Jimeng Seedance 2.0 multimodal AI video generation. Use when users want to create video prompts using text, images, videos, and audio inputs with the @ reference system. Covers camera movements, effects replication, video extension, editing, music beat-matching, e-commerce ads, short dramas, and educational content.
onepage-pdf
Convert an HTML page into a single continuous-page PDF (one tall page, no pagination breaks), preserving desktop layout, backgrounds and selectable text. Use when the user asks to turn an HTML file/report/proposal into a "single-page PDF", "long PDF", "不分页 PDF", "单页 PDF", "长图式 PDF", or complains that an HTML-to-PDF export breaks into pages or cuts content. Supports optional string redaction with leak verification.
native-feel-cross-platform-desktop
Use when the user is designing, prototyping, or rewriting a desktop app that must run on multiple OSes (macOS + Windows, optionally Linux) AND feel indistinguishable from a native app to its users — fast launch, native windowing, native input handling, native materials. Trigger words include "cross-platform desktop", "Electron alternative", "Tauri vs native", "WebView wrapper", "near-native performance", "Raycast architecture", "WebKit/WebView2 quirks", "WKWebView", "system tray app", "global hotkey app", "launcher app". Do NOT trigger this skill for pure web apps, pure mobile apps, or for greenfield projects that have no native-feel requirement.
gstack
Router for the gstack skill suite. (gstack)
fireworks-tech-graph
Use when the user wants to create any technical diagram - architecture, data flow, flowchart, sequence, agent/memory, or concept map - and export as SVG+PNG. Trigger on: "画图" "帮我画" "生成图" "做个图" "架构图" "流程图" "可视化一下" "出图" "generate diagram" "draw diagram" "visualize" or any system/flow description the user wants illustrated.
dbs-video-extract
接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。