skill-based-architecture
Skill1 starsChanged 3 months agoMITView on GitHub
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.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- WoJiSama/skill-based-architectureedited, first seen Apr 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- WoJiSama/skill-based-architecture★ 62525% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository184 other files it gives its agents.
- skills/gstack/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/gstack/CLAUDE.mdCLAUDE.md
- skills/gstack/model-overlays/claude.mdCLAUDE.md
- affiliate-marketingSkill
- agent-browserSkill
- agent-reachSkill
- aliexpress-source-mappingSkill
- animejsSkill
- antivibeSkill
- autoplanSkill
- brandkitSkill
- browseSkill
- buffettSkill
- canarySkill
- carefulSkill
- codexSkill
- open-gstack-browserSkill
- context-restoreSkill
- context-saveSkill
- copywritingSkill
- seedance-course-promoSkill
- create-viral-contentSkill
- csoSkill
- css-animationsSkill
- demand-validatorSkill
- design-consultationSkill
- design-htmlSkill
- design-reviewSkill
- design-shotgunSkill
- design-taste-frontendSkill
- discord-botSkill
- discord-historySkill
- discord-send-messageSkill
- docxSkill
- email-campaignsSkill
- engineering-figure-agentSkill
- freezeSkill
- frontend-designSkill
- full-output-enforcementSkill
- gmc-passSkill
- google-analyticsSkill
- gpt-tasteSkill
- gsapSkill
- autoplanSkill
- benchmark-modelsSkill
- benchmarkSkill
- browseSkill
- canarySkill
- carefulSkill
- codexSkill
- context-restoreSkill
- context-saveSkill
- csoSkill
- design-consultationSkill
- design-htmlSkill
- design-reviewSkill
- design-shotgunSkill
- devex-reviewSkill
- document-releaseSkill
- The first 60 shown.
The file
Files
Skill-Based Architecture
Restructure oversized single-file Skills or scattered project rules into a well-organized Skill directory. Builds on the official minimal Agent Skill contract (name + description) and kicks in when a single small SKILL.md is no longer enough.
When to Use
- A single SKILL.md exceeds ~150 lines, mixing rules, workflows, and background material
- Project rules are scattered across
AGENTS.md,CLAUDE.md,CODEX.md,.cursor/rules/,.claude/,.codex/, etc. - User explicitly requests Skill-based architecture or rule consolidation
When NOT to Use
- Very small projects (fewer than 3 rule/doc files)
- Temporary repos with no long-term maintenance needs
- Teams with a well-functioning documentation system who don't want to migrate
Progressive Rigor
Grow only under pressure. Tiers: Single-file (SKILL.md only, < 3 topics) → Folder-light (+ rules/, 3–5 topics or 1 recurring workflow) → Full (+ workflows/ + references/ + thin shells; ≥ 3 routed tasks, gotcha log, or multi-harness repo). Upgrade triggers: SKILL.md > 100 lines, same pitfall surfaces twice, a task needs step-by-step instructions, or two harnesses share routing. Downgrade when content shrinks. Details: references/layout.md § Progressive Rigor.
Target Structure
skills/<name>/
├── SKILL.md # ≤100 lines: always-read list, task routing, priority
├── rules/ # Long-lived constraints (what is always true)
├── workflows/ # Step-by-step procedures (how to do a task)
├── references/ # Background: architecture, pitfalls, indexes
│ └── gotchas.md # Recommended: known gotchas / footguns (most valuable reference)
└── docs/ # Optional: prompts, reports, external-facing materialRoot entries (AGENTS.md, CLAUDE.md, CODEX.md, GEMINI.md, .cursor/rules/*.mdc, .codex/) → thin shells with a routing.yaml bootstrap, not duplicated route tables.
.cursor/skills/<name>/SKILL.md → Cursor registration entry (required for discovery). See REFERENCE.md for templates.
Core Principles
- Single concise entry —
SKILL.md≤ 100 lines; it navigates, not exhausts. ✓ Check:wc -l≤ 100; over → move content to sub-files. - One skill folder — all formal docs under
skills/<name>/, not scattered at repo root. ✓ Check:ls *.mdat root shows only thin shells, not rule/workflow files. - Rules ≠ Flows —
rules/for constraints,workflows/for procedures. ✓ Check: any numbered steps inrules/? Any "always/never" inworkflows/? Either = mixing. - Routing.yaml as source — task routes live in
routing.yaml; shells only say how to read it. ✓ Check: route changed without running sync/check? No → drift risk. - Cursor registration entry —
.cursor/skills/<name>/SKILL.mdmust exist. ✓ Check:ls .cursor/skills/— missing = Cursor cannot discover the skill. - Progressive Rigor — three tiers (Single-file / Folder-light / Full); grow only under pressure — see Progressive Rigor section above + details. ✓ Check: can you name the specific pressure that forced the current tier? "It felt right" ≠ pressure.
- Description = coarse activation — describe the skill's domain boundary and real user trigger phrases, not every workflow keyword (ref). ✓ Check: can Common Tasks change without rewriting description? No → description is doing routing's job.
- Gotchas are highest-value — maintain costly pitfalls actively; keep them discoverable. ✓ Check: is each high-cost gotcha reachable from a Common Tasks route, not only buried in
references/? - Progressive disclosure — SKILL.md links one level deep; deep content pulled only when task-routed. ✓ Check: open SKILL.md and follow every link — does any target file link further to a third level that should have been reachable from SKILL.md directly? If yes, SKILL.md is hiding its routing structure.
- Task Closure Protocol — finalization includes original-constraint check + AAR, not just "tests passed" (ref); behavior change covers interaction, schema/renderer, styling, overlay/z-index, and host-compat too. ✓ Check: can you restate the user's original constraints and all AAR answers before marking done?
- Generalization rule — records must make sense outside current project context (ref). ✓ Check: replace project name with a different one — still makes sense? No → rewrite as pattern.
- Self-maintenance — line counts signal evaluation, not automatic action. ✓ Check before splitting: topics independently navigable? Reader ever wants only one part? Both yes → split.
- Activation over storage — pitfall in
references/alone is not "captured"; must also be on the task path. ✓ Check: trace normal route for this scenario — Agent hits the entry without hunting? No → stored, not activated. - Token efficiency — Always-read stays 2–3 files; domain files via Common Tasks only. ✓ Check: Always Read > 3 entries? Demote lowest-frequency.
- Rationalizations Table — captures verbatim excuses from real pressure-test failures (ref, Phase 9). ✓ Check: every row traces to a real failure — speculative rows dilute pressure value; remove them.
- Response discipline — output short, precise, direct answers; avoid process narration, self-congratulation, gratuitous confirmations, and requirement restatement. Correct objective errors neutrally; do not infer user stance. ✓ Check: does each sentence serve the explicit request? No → delete it.
Common Pitfalls
- Missing Cursor registration entry — Formal skill at
skills/<name>/but no.cursor/skills/<name>/SKILL.md→ Cursor never discovers the skill; all rules/workflows silently ignored - Soft-pointer-only shell — Thin shell says only "go read SKILL.md" without a
routing.yamlbootstrap → instruction lost after context summarization in long conversations - Vague / wrong-scope description — Description is passive, wrong-language, too narrow ("fix bug" only), or bloated with every workflow keyword → skill misses natural requests or over-fires; keep description domain-level and route tasks in SKILL.md
- Stored but not activated — Costly pitfall recorded in
references/but not surfaced in any workflow checklist or SKILL.md routing → future agents still miss it - Task Closure Protocol skipped — Agent considers itself "done" after main work, skips the 30-second AAR scan → lessons not captured; use Task Closure Protocol to make AAR a completion gate, not an optional add-on
- Project-specific records — Lessons written as project narratives ("in our product module, we found…") instead of reusable knowledge → useless outside current context; apply generalization rule before recording
- No SessionStart hook on long sessions —
/clearor/compactsilently drops SKILL.md from context; agent loses all routing and protocol awareness without the user noticing → install SessionStart hook if your harness supports it (see references/thin-shells.md § SessionStart Hook) - Route skipping in multi-task sessions — Agent reads SKILL.md for the first task, then skips re-reading for subsequent tasks in the same session ("I already know the rules"). New tasks may match different routes; context may have been compressed. Result: agent works from partial/stale memory, misses critical rules, debugs in wrong direction for hours → SKILL.md template now includes Session Discipline section; all shells include re-read trigger
- Long-task final drift — Agent follows the route early, then invents at the end after many tool calls or corrections → run
templates/protocol-blocks/reboot-check.mdbefore final validation/commit if original constraints are no longer fresh
Content Classification
| Content type | Target |
| Stable constraints, must-follow rules | rules/ |
| Step-by-step task procedures | workflows/ |
| Architecture, pitfalls, source indexes | references/ |
| Known gotchas, footguns, edge cases | references/gotchas.md (or domain-specific pitfall files) |
| Prompts, reports, external docs | docs/ |
| Editor/tool-specific config | .cursor/ / .claude/ (thin shells) |
Multi-Skill & Composition
- Multi-skill repos — references/multi-skill-routing.md (operating) + references/layout.md § Multi-Skill Projects (fission).
- Invoking other skills from your workflows (embedded / serial chain / subagent delegation) — references/skill-composition.md + starter templates/skill/workflows/invoke-skill.md.example.
Resources
- WORKFLOW.md — Migration procedure (Quick Start + 9 phases + Downstream Upgrade)
- REFERENCE.md + references/ — Templates, decision guides, anti-patterns, troubleshooting, self-hosting routing source
- TEMPLATES-GUIDE.md — Starter templates + meta-workflow templates
- EXAMPLES.md + examples/ — behavior failures + before/after scenarios
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

