feat: refactor SKILL.md into modular reference files#458
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
Codecov Results 📊✅ 116 passed | Total: 116 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1149 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.20% 95.20% —%
==========================================
Files 176 176 —
Lines 23871 23930 +59
Branches 0 0 —
==========================================
+ Hits 22724 22781 +57
- Misses 1147 1149 +2
- Partials 0 0 —Generated by Codecov Action |
Split the monolithic 824-line SKILL.md into a compact index (~300 lines) with agent guidance + command summaries, and 12 per-group reference files with full flag/example details. Changes: - Create docs/src/content/docs/agent-guidance.md with operational guidance for AI coding agents (context window tips, safety rules, workflow patterns, common mistakes) - Refactor script/generate-skill.ts to produce SKILL.md index + references/*.md files + auto-generate index.json - Update script/check-skill.ts to verify all generated files (not just SKILL.md) - Update src/lib/agent-skills.ts to fetch and install SKILL.md + reference files (with graceful degradation) - Add directory symlinks for .cursor/ and docs/.well-known/ - Update CI workflow to git add entire skill directory - Update tests for new multi-file API The SKILL.md remains the primary entry point for Claude Code and other agents. Reference files provide full command details that agents can read on-demand when they need specifics about a command group.
40df14a to
710b68b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…ped route fallback

Summary
Closes #319
Split the monolithic 824-line SKILL.md into a compact index (~300 lines) with agent guidance + command summaries, and 12 per-group reference files with full flag/example details.
Changes
New Agent Guidance Document
docs/src/content/docs/agent-guidance.md— Operational guidance for AI agents including context window tips, safety rules, workflow patterns, and common mistakesGenerator Refactoring (
script/generate-skill.ts)SKILL.md— compact ~297-line index with agent guidance + command summaries (down from 824)references/*.md— 12 per-group reference files with full flag/example detailsindex.json— skill discovery manifest for.well-knownreferences/directory before writing to handle stale filesChecker Update (
script/check-skill.ts)Bun.Glob(SKILL.md + references/*.md + index.json)Runtime Installer Update (
src/lib/agent-skills.ts)fetchAllSkillFiles()fetches SKILL.md + all 12 reference files in parallelinstallAgentSkills()createsreferences/directory and writes all filesAgentSkillLocationtype now includesreferenceCountDirectory Symlinks
.cursor/skills/sentry-cli/references→ source referencesdocs/public/.well-known/skills/sentry-cli/references→ source referencesCI Update
check-skilljob updated togit addentire skill directory + index.jsonTests
fetchAllSkillFiles, reference file installation, graceful degradationMetrics