base

A project-specific reference for aspens, a command-line tool that scans codebases and keeps coding-agent instructions and skills up to date.

In plain words
What is it for?
Use it when running tests, scanning a repository, generating or updating agent instructions, checking documentation drift, rebuilding an import graph, installing templates, or saving tokens.
Why use it?
It gives an agent the project’s technology choices, commands, file structure, and conventions so it can work with the repository accurately.

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/base
Any agent
npx skills add aspenkit/aspens --skill base
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code, Codex.

Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,657 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.00014 $0.01657
Opus 5 $0.00007 $0.00829
Sonnet 5 $0.00003 $0.00331
Haiku 4.5 $0.00001 $0.00166

Measured 2d ago against content hash 74c50f943464, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

base 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 2d ago.

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/base/SKILL.md · 79 lines

How it starts

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

You are working in aspens — a CLI that keeps coding-agent context accurate as your codebase changes. Scans repos, generates project-specific instructions and skills for Claude Code and Codex CLI, and keeps them fresh.

Tech Stack

Node.js 20+ (ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors

Commands

  • npm test — Run vitest suite
  • npm start / node bin/cli.js — Run CLI
  • aspens scan [path] — Deterministic repo analysis (no LLM)
  • aspens doc init [path] — Generate skills + hooks + AGENTS.md (--target claude|codex|all, --recommended for full recommended setup)
  • aspens doc impact [path] — Show freshness, coverage, and drift of generated context (--apply for auto-repair, --backend/--model/--timeout/--verbose for LLM interpretation)
  • aspens doc sync [path] — Incremental skill updates from git diffs
  • aspens doc graph [path] — Rebuild import graph cache (.claude/graph.json)
  • aspens add <type> [name] — Install templates (agents, commands, hooks)
  • aspens customize agents — Inject project context into installed agents
  • aspens save-tokens [path] — Install token-saving session settings (--recommended for no-prompt install, --remove to uninstall)
  • Debug: ASPENS_DEBUG=1 dumps raw stream events to $TMPDIR/aspens-debug-{stream,codex-stream}.json
  • Env knob: ASPENS_TIMEOUT (seconds) overrides default LLM timeout when --timeout not passed

Architecture

CLI entry (bin/cli.js) → command handlers (src/commands/) → lib modules (src/lib/)

  • src/lib/scanner.js — Deterministic repo scanner (languages, frameworks, domains, structure)
  • src/lib/graph-builder.js — Static import analysis via es-module-lexer (hub files, clusters, priority)
  • src/lib/graph-persistence.js — Graph serialization, subgraph extraction, code-map + index generation
  • src/lib/runner.js — Claude/Codex CLI wrapper (runClaude for stream-json, runCodex for Codex JSONL); also hosts loadPrompt (partial substitution) and parseFileOutput/validateSkillFiles
  • src/lib/context-builder.js — Assembles repo files into prompt-friendly context
  • src/lib/skill-writer.js — Writes skill files and directory-scoped files, generates skill-rules.json, merges settings
  • src/lib/skill-reader.js — Parses skill files, frontmatter, triggers: blocks, legacy activation patterns, keywords
  • src/lib/diff-classifier.js — Maps changed files to affected skills for doc-sync
  • src/lib/diff-helpers.js — Targeted file diffs and prioritized diff truncation for doc-sync
  • src/lib/git-helpers.js — Git repo detection, git root resolution, diff retrieval, log formatting
  • src/lib/git-hook.js — Post-commit git hook installation/removal for auto doc-sync (monorepo-aware)
  • src/lib/impact.js — Context health analysis: domain coverage, hub surfacing, drift detection, hook health, save-tokens health, usefulness summary, value comparison, opportunities
  • src/lib/save-tokens.js — Save-tokens config defaults, settings builders, gitignore/readme generators
  • src/lib/timeout.js — Timeout resolution (--timeout flag > ASPENS_TIMEOUT env > default)
  • src/lib/errors.jsCliError class (structured errors caught by CLI top-level handler)
  • src/lib/target.js — Target definitions (claude/codex), config persistence (.aspens.json) with saveTokens feature config; getAllowedPaths for multi-target sanitization
  • src/lib/target-transform.js — Transforms Claude-format output to other target formats
  • src/lib/backend.js — Backend detection and resolution (which CLI generates content)
  • src/lib/path-resolver.js / src/lib/source-exts.js — Source-file extension and path resolution helpers shared by scanner/graph
  • src/lib/parsers/ — Language-specific import parsers (TypeScript, Python)
  • src/lib/frameworks/ — Framework-specific detectors (e.g. Next.js)
  • src/prompts/ — Prompt templates with {{partial}} and {{variable}} substitution
  • src/templates/ — Bundled agents, commands, hooks, and settings for aspens add / doc init / save-tokens

Read the full file on GitHub · 79 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. 2d ago First seen · 79 lines · 14 tokens per session scan A 74c50f943464

Subscribe to this mod's changes

base is a skill published in the GitHub repository aspenkit/aspens (96 stars, last pushed 17d ago), licensed MIT. It adds 14 tokens to every session and 1,657 once invoked, about $0.0001 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.