template-library

A library of ready-made coding-agent resources, including agents, slash commands, hooks, and settings. Users install these templates into their project's .claude folders.

In plain words
What is it for?
Use it to browse and install templates, initialise documentation hooks, add recommended agents, or create blank or generated custom skills.
Why use it?
It avoids writing common agent instructions and automation from scratch, while keeping reusable resources in one place.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aspenkit/aspens/template-library
Any agent
npx skills add aspenkit/aspens --skill template-library
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,286 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.01286
Opus 5 $0.00022 $0.00643
Sonnet 5 $0.00009 $0.00257
Haiku 4.5 $0.00004 $0.00129

Measured yesterday against content hash 668cbffb8a00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

template-library scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/template-library/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 type skill is handled separately (not template-based).
  • Save-tokens templates: save-tokens.mjs is 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 .mjs file. Slash commands (save-handoff.md, resume-handoff.md, resume-handoff-latest.md) provide user-invokable handoff management. These are installed by aspens save-tokens or aspens doc init --recommended, not by aspens add.
  • Codex-only restriction: add agent, add command, and add hook throw CliError for Codex-only repos. Skills work with both targets.
  • Target-aware skill commands: addSkillCommand and generateSkillFromDoc resolve the active target via resolveSkillTarget(config). Skill paths use target.skillsDir and target.skillFilename.
  • Backend-aware generation: generateSkillFromDoc uses runLLM() to dispatch to Claude or Codex based on config.
  • Hook templates (monorepo-aware): Shell hooks compute PROJECT_DIR from the script's own location (cd "$SCRIPT_DIR/../.." && pwd) and pass it as ASPENS_PROJECT_DIR to .mjs counterparts. Save-tokens shell hooks follow the same pattern.
  • Settings template quoting: Hook commands in settings.json are wrapped in double quotes for shell safety.
  • doc init hook installation (step 13): Generates skill-rules.json, copies hook files, generates post-tool-use-tracker.sh with domain patterns, merges settings.json with backup.
  • doc init --recommended extras (step 15): Copies all bundled agent templates to .claude/agents/ (skips existing), adds dev/ to .gitignore.
  • Template discovery: listAvailable() reads template dir, filters .md/.sh files, regex-parses name: and description:.
  • No-overwrite policy: addResource() skips files that already exist. Same for addSkillCommand.
  • Plan/execute gitignore: Adding plan or execute agents auto-adds dev/ to .gitignore for plan storage. doc init --recommended also ensures dev/ in .gitignore.
  • Base-skill warning for agents: addResource() prints a non-fatal yellow warning when installing an agent if .agents/skills/base/SKILL.md is missing, prompting the user to run aspens doc init. The agent still installs.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 59 lines · 43 tokens per session scan A 668cbffb8a00

Subscribe to this mod's changes

template-library is a skill published in the GitHub repository aspenkit/aspens (96 stars, last pushed 16d ago), licensed MIT. It adds 43 tokens to every session and 1,286 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.