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.
npx agentmods add skills/aspenkit/aspens/doc-syncnpx skills add aspenkit/aspens --skill doc-syncgit clone --depth 1 https://github.com/aspenkit/aspensWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00026 | $0.01730 |
| Opus 5 | $0.00013 | $0.00865 |
| Sonnet 5 | $0.00005 | $0.00346 |
| Haiku 4.5 | $0.00003 | $0.00173 |
Grade A, and why
doc-sync 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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are working on doc-sync, the incremental skill update command (aspens doc sync).
Key Concepts
- Monorepo-aware:
getGitRoot(repoPath)resolves the actual git root.projectPrefix(toGitRelative) computes the subdirectory offset.scopeProjectFiles()filters changed files to the project subdirectory. Diffs are fetched fromgitRootbut file paths are project-relative. - Multi-target publish:
configuredTargets()reads.aspens.jsonfor all configured targets.chooseSyncSourceTarget()picks the best source (prefers Claude if both exist). LLM generates for the source target;publishFilesForTargets()transforms output for all other configured targets.graphSerializedandrepoPathare passed through to the transform context for conditional architecture references and disk-based instructions file loading. - Backend routing:
runLLM()fromrunner.jsdispatches torunClaude()orrunCodex()based onconfig.backend(defaults to source target's id). - Diff-based flow: Gets
git diff HEAD~N..HEADfrom git root, scopes changed files to project prefix, then feeds diff plus existing skill contents and graph context to the selected backend. - Changetype filter (Phase 1):
isNoOpDiff()fromdiff-classifier.jsskips the LLM call entirely on lockfile-only diffs and diffs touching zero code-bearing files.LOCK_FILESandCODE_BEARING_EXTSare the source of truth — extend them here, not at call sites. - Prompt path variables: Passes
{ skillsDir, skillFilename, instructionsFile, configDir }from source target toloadPrompt()for path substitution in prompts. - Refresh mode (
--refresh): Skips diff entirely. Reviews every skill against the current codebase. Base skill refreshed first, then domain skills in parallel batches ofPARALLEL_LIMIT(3). Also refreshes instructions file and reports uncovered domains. Refresh mode runsensureRootKeyFilesSectionbeforesyncSkillsSectionso the root file always carries a current Key Files block. - Deterministic section repair:
repairDeterministicSections()runs a no-LLM pass that re-injects## Skills,## Behavior, and## Key Filesinto the root instructions file from on-disk state. Called from the no-op / "up to date" sync paths so missing-section drift is fixed every invocation. The normal sync flow also runs the same Skills + Behavior + Key Files injection block on the canonical instructions file after the LLM step, so drift gets repaired whether or not the LLM produced an update. - Graph rebuild on every sync: Calls
buildRepoGraph+persistGraphArtifacts(with source target) to keep graph fresh.graphSerializedreturn value is captured and forwarded topublishFilesForTargetsfor conditional Codex architecture refs. Graph failure is non-fatal. - Legacy v0.7 hub-block cleanup:
notifyLegacyHubBlockIfPresent()surfaces a one-line notice on the first sync after upgrade whenAGENTS.md/AGENTS.mdstill carries the legacy## Key Fileshub-counts block, so the diff that strips it isn't alarming.regenerateStaleCodeMap()force-rebuilds.claude/code-map.mdon no-op syncs when it still carries the legacy**Hub files**block. - Graceful response handling: After LLM returns, if output has content but no
<file>tags, treats it as "no updates needed" with a verbose-only warning. The prompt explicitly requests an empty response when nothing needs updating. - Graph-aware skill mapping:
mapChangesToSkills()checks direct file matches viafileMatchesActivation()(fromskill-reader.js) and also whether changed files are imported by files matching a skill's activation block. - Interactive file picker: When diff exceeds 80k chars and TTY is available, offers multiselect with skill-relevant files pre-selected.
- Prioritized diff:
buildPrioritizedDiff()gives skill-relevant files 60k char budget, everything else 20k (80k total). Cuts atdiff --gitboundaries. - Token optimization: Affected skills sent in full; non-affected skills send only path + description line.
- Split writes: Direct-write files (
.claude/,AGENTS.md, rootAGENTS.md) usewriteSkillFiles(). Directory-scopedAGENTS.mdfiles (e.g.src/AGENTS.md) usewriteTransformedFiles(). - Skill-rules regeneration: After writing, regenerates
skill-rules.jsonviaextractRulesFromSkills()— only for targets withsupportsHooks: true(Claude). UseshookTargetfrom publish targets list. findExistingSkillsis target-aware: Usestarget.skillsDirandtarget.skillFilenameto locate skills for any target.- Git hook (monorepo-aware):
installGitHook()installs at the git root with per-project scoping. Hook usesPROJECT_PATHderived from project-relative offset. Each subproject gets its own labeled hook block (# >>> aspens doc-sync hook (label) >>>) with a unique function name (__aspens_doc_sync_<slug>). Multiple subprojects can coexist in one post-commit hook. Hook skips aspens-only commits scoped to the project prefix. 5-minute per-project cooldown via/tmp/aspens-sync-<hash>.lock; logs to/tmp/aspens-sync-<hash>.log(truncated to last 100 lines past 200). Unlabeled v0.6-era blocks are auto-upgraded on re-install. - Force writes: doc-sync always calls
writeSkillFileswithforce: true.
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.
- 2d ago First seen · 64 lines · 26 tokens per session scan A ddc842387639
doc-sync is a skill published in the GitHub repository aspenkit/aspens (96 stars, last pushed 17d ago), licensed MIT. It adds 26 tokens to every session and 1,730 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.
Other skills, from other repositories
skill-builder
Automatically detect source types and build AI skills using Skill Seekers. Use when the user wants to create skills from documentation, repos, PDFs, videos, or other knowledge sources.
skill-builder
Automatically detect source types and build AI skills using Skill Seekers. Use when the user wants to create skills from documentation, repos, PDFs, videos, or other knowledge sources.
setup-caliber
Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md, Cursor rules, and Copilot instructions update automatically on every commit. Use when Caliber hooks are not yet installed or when the user asks about keeping agent configs in sync.
maestro-improve
Turn filed lessons into the smallest doctrine edit - group pending lessons by target, make one commit per target carrying their evidence ids, mark each lesson processed by that commit or answered with the reason it was rejected, and hand back for the challenge lane.
generate-ai-rules
Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/.mdc) — from codebase analysis. Use whenever the user wants to create or update CLAUDE.md, AGENTS.md, agent rules, Cursor rules, AI coding assistant configuration, or "onboard AI tools" to a project, even…
session-crosslink
Use when an agent session ran outside the repo whose commits should record it — e.g. launched from a higher-level folder, a non-Entire repo, or one repo but editing another — to attach the session to each affected Entire-enabled repo's HEAD commit.