@wojisama/skill-based-architecture
AThis skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护". Activate when a SKILL.md is too large, rules are duplicated across agent entry files, task routing or trigger_examples miss natural user language, or templates / thin shells / validation scripts need drift-resistant maintenance.
Install
agr install @wojisama/skill-based-architecture --target claudeWrites 1 file into .claude/skills/, pinned to git-fc613721.
- .claude/skills/skill-based-architecture/SKILL.md
Document
name: skill-based-architecture description: > This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护". Activate when a SKILL.md is too large, rules are duplicated across agent entry files, task routing or trigger_examples miss natural user language, or templates / thin shells / validation scripts need drift-resistant maintenance. primary: true
skill-based-architecture (Cursor Registration Entry)
This is the Cursor discovery entry. Formal skill content lives at the repo root — read SKILL.md immediately, then follow its design principles and workflow routing.
Quick Routing (survives context truncation)
Task routes live in references/self-hosting-routing.yaml.
For every new task:
- Read
SKILL.md. - Read
references/self-hosting-routing.yaml. - Match by
labels,trigger_examples, and task intent. - Read only that route's
required_reads, then follow itsworkflow. - If no route matches, use the
otherroute.
Why this file exists
Cursor's agent_skill mechanism only scans .cursor/skills/. Without this registration entry, the formal skill at repo root is invisible to Cursor.
The description above must stay identical to the root SKILL.md description field. Drift between the two = Cursor uses one activation rule while other harnesses use another. templates/skill/scripts/smoke-test.sh automatically verifies they match.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-fc6137215e8a2026-07-31