$npx -y skills add lbb00/ai-rules-sync --skill update-knowledge-baseAnalyze code changes and update KNOWLEDGE_BASE.md with architectural and feature changes.
| 1 | # Update Knowledge Base |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Automatically analyze recent code changes and update the project's knowledge base documentation to reflect current architecture, features, and conventions. |
| 6 | |
| 7 | ## Instructions |
| 8 | |
| 9 | 1. **Analyze Recent Changes** |
| 10 | - Review git diff or recent commits |
| 11 | - Identify new adapters, commands, or features |
| 12 | - Note architectural changes or new patterns |
| 13 | |
| 14 | 2. **Read Current Knowledge Base** |
| 15 | - Check if KNOWLEDGE_BASE.md exists |
| 16 | - If not, create it with proper structure |
| 17 | - If exists, identify sections needing updates |
| 18 | |
| 19 | 3. **Update Sections** |
| 20 | - **Architecture**: Update if new adapters or core components added |
| 21 | - **Features**: Document new CLI commands or options |
| 22 | - **Conventions**: Note any new coding patterns established |
| 23 | - **API Changes**: Document breaking changes or deprecations |
| 24 | |
| 25 | 4. **Verify Accuracy** |
| 26 | - Cross-reference with actual source code |
| 27 | - Ensure examples are runnable |
| 28 | - Check that all documented features exist |
| 29 | |
| 30 | 5. **Format Consistently** |
| 31 | - Use consistent markdown formatting |
| 32 | - Include code examples where helpful |
| 33 | - Maintain table format for command references |
| 34 | |
| 35 | ## Knowledge Base Structure |
| 36 | |
| 37 | ```markdown |
| 38 | # AI Rules Sync - Knowledge Base |
| 39 | |
| 40 | ## Architecture Overview |
| 41 | - Adapter system description |
| 42 | - CLI layer structure |
| 43 | - Config management |
| 44 | |
| 45 | ## Supported Tools |
| 46 | | Tool | Types | Source Dir | Target Dir | |
| 47 | |
| 48 | ## Commands Reference |
| 49 | | Command | Description | Example | |
| 50 | |
| 51 | ## Adapter Implementation |
| 52 | - How to add new adapters |
| 53 | - Required interfaces |
| 54 | |
| 55 | ## Configuration |
| 56 | - ai-rules-sync.json structure |
| 57 | - Local/private rules |
| 58 | |
| 59 | ## Changelog |
| 60 | - Recent significant changes |
| 61 | ``` |
| 62 | |
| 63 | ## Output |
| 64 | |
| 65 | After running this skill: |
| 66 | - KNOWLEDGE_BASE.md is created or updated |
| 67 | - Changes reflect current codebase state |
| 68 | - Documentation is accurate and complete |