modular-skill-creator
Skill4 starsChanged 9 days agoMITView on GitHub
Build or convert skills into a modular, lazy-loading multi-workflow architecture. Use for "modular skill", "router skill", or splitting a monolithic skill into sub-workflows. For simple single-file skills, use skill-creator instead.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- angle-boardSkill
- ebook-researchSkill
- fetch-anythingSkill
- living-planSkill
- skill-hardenerSkill
- verbalized-samplingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Every modular skill has three layers:
- Very specific: line 20
Router stays thin: If you catch yourself writing multi-step procedure logic in SKILL.md, it belongs in a workflow file.
- Very specific: line 23
References are one level deep: Every file in references/ is named in SKILL.md.
- Very specific: line 53
Read workflows/design-modular-skill.md — run the interview to produce the skill spec.
- Very specific: line 54
Read workflows/scaffold-router.md — generate the SKILL.md router from the spec.
- Very specific: line 55
Read workflows/scaffold-workflows.md — generate each workflows/*.md file from the spec.
- Distinctive: line 56
Write all files to the save location confirmed in intake.
- Very specific: line 60
Read workflows/refactor-monolithic-skill.md.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<essential_principles>
Architecture This Skill Produces
Every modular skill has three layers:
- Router (
SKILL.md) — loaded at invocation, under ~150 lines. Contains frontmatter, essential principles, intake logic, and routing rules only. No workflow prose lives here. - Workflows (
workflows/*.md) — loaded on demand when the router decides which branch to execute. Each file is fully self-contained: it states its own inputs, prerequisites, steps, outputs, and done criteria. - References (
references/*.md) — single-purpose data files (blacklists, templates, taxonomies, examples). Loaded by workflows when needed. Never contain procedural logic. Every reference is also named in SKILL.md's Reference Materials list, so it is reachable one level from the router — a workflow may point at it too, but never as the only path.
Core Rules
- Router stays thin. If you catch yourself writing multi-step procedure logic in SKILL.md, it belongs in a workflow file.
- Each workflow owns its scope. A workflow file should not need to read another workflow file to complete its job — unless the skill is explicitly a stage-pipeline where step N hands off to step N+1.
- References are data, not logic. A reference file contains lookup tables, lists, templates, or examples. It never says "now do X."
- References are one level deep. Every file in
references/is named in SKILL.md. A file reachable only through a workflow gets previewed withhead, never read in full, and its tail is silently lost. - Long files carry a
## Contentsblock. Any workflow or reference file over 100 lines opens with a## Contentsblock listing its sections, so a partial read still shows the whole scope. - Always ask project vs global. Per the user's global preference, never assume a save location — always ask before writing files.
</essential_principles>
<intake>Before anything else, ask where to save the output skill using AskUserQuestion:
"Where should the new skill be saved?"
- Project-level —
./.claude/skills/<skill-name>/in the current repo- User-level — your global skills directory, e.g.
~/.claude/skills/<skill-name>/(or wherever your skill manager keeps shared skills)
Then ask what the user wants to do:
"What would you like to do?"
- Build a new modular skill — design it from scratch with router + workflows + references
- Convert an existing skill — refactor a single-file SKILL.md into the modular pattern
Route based on the answer.
</intake><instructions>Workflow Routing
If user wants to build a new modular skill:
- Read
workflows/design-modular-skill.md— run the interview to produce the skill spec. - Read
workflows/scaffold-router.md— generate theSKILL.mdrouter from the spec. - Read
workflows/scaffold-workflows.md— generate eachworkflows/*.mdfile from the spec. - Write all files to the save location confirmed in intake.
If user wants to convert an existing skill:
Read workflows/refactor-monolithic-skill.md. This workflow handles the full refactor end-to-end.
Reference Materials
references/router-patterns.md— read this during scaffold-router to get the correct template for the chosen routing pattern (menu-driven, input-shape detection, or stage-pipeline)references/frontmatter-conventions.md— read this to use only fields the user's existing skills use; prevents spurious fields from appearing in generated skillsreferences/examples.md— read this when you need a concrete canonical example to explain the pattern to the user or sanity-check your output against
Quality Checklist
Before reporting done:
- Router SKILL.md is under ~150 lines
- Router contains zero step-by-step procedure prose
- Every workflow file is self-contained (inputs, steps, outputs, done criteria all present)
- Every file in
references/is named in SKILL.md's Reference Materials list (none reachable only through a workflow) - Every workflow and reference file over 100 lines opens with a
## Contentsblock - No
allowed-toolsfield in frontmatter (not part of this user's convention) - Description field is pushy and trigger-rich (50-100 words, lists trigger phrases)
- Save location was confirmed with user before any files were written
</instructions>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.

