with one click
base
Core conventions, tech stack, and project structure for aspens
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Core conventions, tech stack, and project structure for aspens
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when modifying imports, creating new files, refactoring modules, or understanding how components relate. Not needed for simple single-file edits.
LLM-powered injection of project context into installed agent templates via `aspens customize agents`
Claude/Codex CLI execution layer — prompt loading, stream-json parsing, file output extraction, path sanitization, skill file writing, and skill rule generation
Top-level Commander wiring, welcome screen, missing-hook warning, CliError exit handling, and the public programmatic API surface
Multi-target output system — target abstraction, backend routing, content transforms for Codex CLI and future targets
Context health analysis — freshness, domain coverage, hub surfacing, drift detection, LLM-powered interpretation, and auto-repair for generated agent context
| name | base |
| description | Core conventions, tech stack, and project structure for aspens |
| triggers | {"alwaysActivate":true} |
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.
Node.js 20+ (ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors
npm test — Run vitest suitenpm start / node bin/cli.js — Run CLIaspens 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 diffsaspens 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 agentsaspens save-tokens [path] — Install token-saving session settings (--recommended for no-prompt install, --remove to uninstall)ASPENS_DEBUG=1 dumps raw stream events to $TMPDIR/aspens-debug-{stream,codex-stream}.jsonASPENS_TIMEOUT (seconds) overrides default LLM timeout when --timeout not passedCLI 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 generationsrc/lib/runner.js — Claude/Codex CLI wrapper (runClaude for stream-json, runCodex for Codex JSONL); also hosts loadPrompt (partial substitution) and parseFileOutput/validateSkillFilessrc/lib/context-builder.js — Assembles repo files into prompt-friendly contextsrc/lib/skill-writer.js — Writes skill files and directory-scoped files, generates skill-rules.json, merges settingssrc/lib/skill-reader.js — Parses skill files, frontmatter, triggers: blocks, legacy activation patterns, keywordssrc/lib/diff-classifier.js — Maps changed files to affected skills for doc-syncsrc/lib/diff-helpers.js — Targeted file diffs and prioritized diff truncation for doc-syncsrc/lib/git-helpers.js — Git repo detection, git root resolution, diff retrieval, log formattingsrc/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, opportunitiessrc/lib/save-tokens.js — Save-tokens config defaults, settings builders, gitignore/readme generatorssrc/lib/timeout.js — Timeout resolution (--timeout flag > ASPENS_TIMEOUT env > default)src/lib/errors.js — CliError 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 sanitizationsrc/lib/target-transform.js — Transforms Claude-format output to other target formatssrc/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/graphsrc/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}} substitutionsrc/templates/ — Bundled agents, commands, hooks, and settings for aspens add / doc init / save-tokens"type": "module" throughout; use import/export, never require()await init before calling parse() in graph-builderrunClaude() spawns claude -p with stream-json; always use --verbose flag with stream-jsonrunCodex() spawns codex exec --json --sandbox read-only --ask-for-approval never --ephemeral; returns { text, usage } matching runClaude interfacerunClaude/runCodex pipe prompts via stdin and respect drain when write() returns false; never rewrite to use args (shell length limits)parseFileOutput() restricts writes to .claude/ and AGENTS.md by default; accepts allowedPaths override for multi-target via getAllowedPaths(targets)allowedTools: ['Read', 'Glob', 'Grep']; never broaden without review{{name}} in prompt files resolves to src/prompts/partials/name.md first, then falls back to template variables.aspens.json. Customize is Claude-only (CliError if targets: ['codex'])CliError instead of calling process.exit(); caught at top level in bin/cli.jsgetGitRoot() resolves the actual git root; hooks, sync, and impact scope to the subdirectory project pathbin/ — CLI entry point (commander setup, CliError handler)src/commands/ — Command handlers (scan, doc-init, doc-impact, doc-sync, doc-graph, add, customize, save-tokens)src/lib/ — Core library modulessrc/prompts/ — Prompt templates + partialssrc/templates/ — Installable agents, commands, hooks, settingstests/ — Vitest test filesLast Updated: 2026-05-11