aspens: Skill for Claude Code

.agents/skills/doc-sync/SKILL.md

doc-sync is a skill for Claude Code, Codex from aspenkit/aspens. It costs 26 tokens per session (1,730 once invoked), scanned A, original, MIT.

A tool that updates installed coding-agent instructions based on the files changed in Git. Git is a system that records code changes; a monorepo is one repository containing several projects or packages.

In plain words
What is it for?
Use it after commits to find affected skills, generate updates from the relevant differences, and optionally sync those skills through a post-commit hook.
Why use it?
It keeps instructions current without regenerating every file after each change. It can update instructions for multiple configured coding agents.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; mentions Codex.

This is aspenkit/aspens's own configuration. It tells Claude Code and Codex how to work on aspens itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aspens configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aspenkit/aspens. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aspenkit/aspens/main/.agents/skills/doc-sync/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/aspenkit/aspens/doc-sync/github.svg)](https://agentmods.dev/skills/aspenkit/aspens/doc-sync)
Your own site
<a href="https://agentmods.dev/skills/aspenkit/aspens/doc-sync"><img src="https://agentmods.dev/badge/skills/aspenkit/aspens/doc-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/aspenkit/aspens/doc-sync"><img src="https://agentmods.dev/badge/skills/aspenkit/aspens/doc-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,730 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00026 $0.01730
Opus 5.5 $0.00010 $0.00692
Sonnet 5.5 $0.00005 $0.00346
Haiku 4.5 $0.00003 $0.00173

Measured 1mo ago against content hash ddc842387639, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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/doc-sync/SKILL.md · 64 lines

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 from gitRoot but file paths are project-relative.
  • Multi-target publish: configuredTargets() reads .aspens.json for 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. graphSerialized and repoPath are passed through to the transform context for conditional architecture references and disk-based instructions file loading.
  • Backend routing: runLLM() from runner.js dispatches to runClaude() or runCodex() based on config.backend (defaults to source target's id).
  • Diff-based flow: Gets git diff HEAD~N..HEAD from 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() from diff-classifier.js skips the LLM call entirely on lockfile-only diffs and diffs touching zero code-bearing files. LOCK_FILES and CODE_BEARING_EXTS are the source of truth — extend them here, not at call sites.
  • Prompt path variables: Passes { skillsDir, skillFilename, instructionsFile, configDir } from source target to loadPrompt() 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 of PARALLEL_LIMIT (3). Also refreshes instructions file and reports uncovered domains. Refresh mode runs ensureRootKeyFilesSection before syncSkillsSection so 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 Files into 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. graphSerialized return value is captured and forwarded to publishFilesForTargets for 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 when AGENTS.md/AGENTS.md still carries the legacy ## Key Files hub-counts block, so the diff that strips it isn't alarming. regenerateStaleCodeMap() force-rebuilds .claude/code-map.md on 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 via fileMatchesActivation() (from skill-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 at diff --git boundaries.
  • Token optimization: Affected skills sent in full; non-affected skills send only path + description line.
  • Split writes: Direct-write files (.claude/, AGENTS.md, root AGENTS.md) use writeSkillFiles(). Directory-scoped AGENTS.md files (e.g. src/AGENTS.md) use writeTransformedFiles().
  • Skill-rules regeneration: After writing, regenerates skill-rules.json via extractRulesFromSkills() — only for targets with supportsHooks: true (Claude). Uses hookTarget from publish targets list.
  • findExistingSkills is target-aware: Uses target.skillsDir and target.skillFilename to locate skills for any target.
  • Git hook (monorepo-aware): installGitHook() installs at the git root with per-project scoping. Hook uses PROJECT_PATH derived 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 writeSkillFiles with force: true.

Read the full file on GitHub · 64 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. 1mo ago First seen · 64 lines · 26 tokens per session scan A ddc842387639

Subscribe to this mod's changes

doc-sync is a skill published in the GitHub repository aspenkit/aspens (103 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 1,730 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

do

Work a SpecWeave increment task by task - claim, implement inside its Files, test, commit, done with evidence - alone, unattended or in lanes, then close. Use for "implement", "continue", "auto".

anton-abyzov/specweave · 46 tokens

autofix-pr

Watch a pull request and fix it from a worktree of its own - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once] [--every ] [--no-reply] [--yes] [instructions]…

QwenLM/qwen-code · 123 tokens

cw-land

Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.

Hmbown/Codewhale · 44 tokens

git-commit

Analyze changes with Git only and auto-generate conventional commit messages with optional emoji; suggests splitting commits when needed, runs local Git hooks by default (use --no-verify to skip).

UfoMiao/zcf · 41 tokens

git-master

MUST USE for ANY git operations: atomic commits, rebase/squash/fixup, and history search (blame, bisect, log -S, reflog). Load it before running git yourself, or pass loadskills=['git-master'] to the task that commits. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.

code-yeongyu/lazycodex · 93 tokens

atmos-git

Atmos Git and GitOps: git.repositories, clone/pull/status/diff/commit/push/clean, local Git hook shims and hook env vars, pre-commit framework migration, Starlark git.sandbox checks and unstaged fixes, signed commits, managed workdirs, fork-PR trust gate (clone gate and posting gate), and auth via identities or…

cloudposse/atmos · 82 tokens