template-library
Skill100 starsChanged 6 months agoMITView on GitHub
Bundled agents, commands, hooks, and settings that users install via `aspens add`, `aspens doc init`, and `aspens save-tokens` into their .claude/ directories
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ZJU-REAL/Easeltheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ZJU-REAL/Easel★ 4.5ksame name
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 repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-customizationSkill
- architectureSkill
- baseSkill
- claude-runnerSkill
- cli-shellSkill
- codex-supportSkill
- doc-impactSkill
- doc-syncSkill
- import-graphSkill
- repo-scanningSkill
- save-tokensSkill
- skill-generationSkill
- template-librarySkill
- agent-customizationSkill
- baseSkill
- claude-runnerSkill
- cli-shellSkill
- codex-supportSkill
- doc-impactSkill
- doc-syncSkill
- import-graphSkill
- repo-scanningSkill
- save-tokensSkill
- skill-generationSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Only .md and .sh extensions are discovered by listAvailable().
≈ “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
You are working on the template library — bundled agents, slash commands, hooks, and settings that users browse and install into their repos.
Domain purpose
aspens add <type> [name] copies curated templates into a consumer repo's .claude/ directories so users get working agents, slash commands, hooks, and settings without authoring them. The same template tree is reused by aspens doc init (hook installation, recommended agents) and aspens save-tokens (handoff tooling). Custom skills can also be scaffolded blank or LLM-generated from a reference doc.
Key Concepts
- Four resource types for
add:agent→.claude/agents,command→.claude/commands,hook→.claude/hooks. A fourth typeskillis handled separately (not template-based). - Save-tokens templates:
save-tokens.mjsis the runtime entry point for all three hook entry points (statusline, prompt-guard, precompact). Shell wrappers (save-tokens-*.sh) resolve project dir and delegate to the.mjsfile. Slash commands (save-handoff.md,resume-handoff.md,resume-handoff-latest.md) provide user-invokable handoff management. These are installed byaspens save-tokensoraspens doc init --recommended, not byaspens add. - Codex-only restriction:
add agent,add command, andadd hookthrowCliErrorfor Codex-only repos. Skills work with both targets. - Target-aware skill commands:
addSkillCommandandgenerateSkillFromDocresolve the active target viaresolveSkillTarget(config). Skill paths usetarget.skillsDirandtarget.skillFilename. - Backend-aware generation:
generateSkillFromDocusesrunLLM()to dispatch to Claude or Codex based on config. - Hook templates (monorepo-aware): Shell hooks compute
PROJECT_DIRfrom the script's own location (cd "$SCRIPT_DIR/../.." && pwd) and pass it asASPENS_PROJECT_DIRto.mjscounterparts. Save-tokens shell hooks follow the same pattern. - Settings template quoting: Hook commands in
settings.jsonare wrapped in double quotes for shell safety. doc inithook installation (step 13): Generatesskill-rules.json, copies hook files, generatespost-tool-use-tracker.shwith domain patterns, mergessettings.jsonwith backup.doc init --recommendedextras (step 15): Copies all bundled agent templates to.claude/agents/(skips existing), addsdev/to.gitignore.- Template discovery:
listAvailable()reads template dir, filters.md/.shfiles, regex-parsesname:anddescription:. - No-overwrite policy:
addResource()skips files that already exist. Same foraddSkillCommand. - Plan/execute gitignore: Adding
planorexecuteagents auto-addsdev/to.gitignorefor plan storage.doc init --recommendedalso ensuresdev/in.gitignore. - Base-skill warning for agents:
addResource()prints a non-fatal yellow warning when installing an agent if.claude/skills/base/skill.mdis missing, prompting the user to runaspens doc init. The agent still installs.
Critical files (purpose, not inventory)
src/commands/add.js— Entry point foraspens add; dispatches to resource copy, blank skill scaffold, or LLM skill generation.src/templates/agents/*.md— Agent persona templates copied as-is into.claude/agents/.src/templates/commands/*.md— Slash command templates (includes handoff commands installed bysave-tokens).src/templates/hooks/— Hook scripts (skill-activation-prompt.{sh,mjs},graph-context-prompt.{sh,mjs},post-tool-use-tracker.sh,save-tokens.mjs,save-tokens-{statusline,prompt-guard,precompact}.sh).src/templates/settings/settings.json— Default Claude Code settings with hook wiring; merged into the consumer repo's settings.src/prompts/add-skill.md— System prompt foradd skill --from <doc>LLM generation.
Critical Rules
- Template files must contain
name: <value>anddescription: <value>lines parseable by regex. - Only
.mdand.shextensions are discovered bylistAvailable()..mjsfiles are copied bydoc initandsave-tokensdirectly, not byadd. - The templates dir resolves from
src/commands/viajoin(__dirname, '..', 'templates')— movingadd.jsbreaks template resolution. - Skill names are sanitized to lowercase alphanumeric + hyphens. Invalid names throw
CliError. - Commands throw
CliErrorfor expected failures instead of callingprocess.exit(). - Reference docs passed to
add skill --fromare truncated to 50,000 chars before being handed to the LLM.
References
- Customize flow:
.claude/skills/agent-customization/skill.md - Save-tokens install:
.claude/skills/save-tokens/skill.md
Last Updated: 2026-05-11
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.

