All skills
acedergren avatar

/doc-sync

@9d099e9
by Alexander Cedergrenacedergren/agentic-tools26 stars
4

Use when auditing or fixing drift between project documentation and the actual codebase. Detects stale architecture diagrams, wrong file paths, outdated test counts, and undocumented structural changes. Pass 'fix' to apply repairs; default is report-only. Keywords: doc drift, stale docs, sync docs, documentation audit, update docs, architecture docs outdated. Triggers on "audit doc drift" or "sync documentation".

Use this Skill: https://skilld.dev/gh/acedergren/agentic-tools/doc-sync

This session only. Nothing lands on disk.

SKILL.md

โ‰ˆ107 tokens always: the name and description. โ‰ˆ782 when used: this file.

Documentation Sync Audit

When to Use

Load this skill when the user request matches the frontmatter description for Documentation Sync Audit.

Audit project docs against codebase reality. Report drift or fix it.

NEVER

  • Never update a doc based on what the code should look like โ€” only sync to what it actually is now.
  • Never fix docs for a section you didn't audit โ€” partial fixes create false confidence.
  • Never mark a roadmap item complete based on code presence alone โ€” check git log for the deliberate completion commit.
  • Never skip auditing CLAUDE.md / agent instructions โ€” stale agent instructions cause cascading errors in future sessions.

Drift Classification: What Actually Goes Stale

Most doc-code drift falls into four categories with different detection approaches:

Drift Type Detection Signal False Positive Risk
Structural drift Directory tree, plugin/middleware chain order Low โ€” filesystem is ground truth
Path rot File paths in docs that no longer exist Low โ€” use check-doc-paths.js
Count drift Test counts, permission counts, route counts Medium โ€” recount from actual files
Roadmap lag Completed work not reflected in docs High โ€” confirm git log intent

Decision: Audit vs Fix

  • $ARGUMENTS = empty or audit โ†’ report only, no edits
  • $ARGUMENTS = fix โ†’ report then apply targeted edits, commit

When fixing: edit the minimum to correct drift. Don't rewrite prose, restructure sections, or add new content โ€” this is sync, not authoring.

What to Audit

Architecture docs โ€” plugin/middleware chain order, route module list, monorepo package list, directory structure tree.

Security docs โ€” security plugins listed vs what's registered, permission counts, any security-related commits since last doc update (git log --oneline --since="$(git log -1 --format=%ai docs/SECURITY.md)" -- src/).

Test docs โ€” actual test file count vs documented count, pass/fail counts (run suite to get current numbers).

Roadmap/changelog โ€” git log for completed work not reflected in any phase. Flag commits with feat: or fix: prefixes that postdate the last roadmap update.

CLAUDE.md / agent instructions โ€” naming conventions match actual patterns, documented file paths exist, anti-patterns section is current.

Scripts

bash scripts/list-doc-targets.sh
node scripts/check-doc-paths.js README.md docs/ARCHITECTURE.md

Report Format

| Doc | Section | Issue | Severity |
|-----|---------|-------|----------|

Severity: Critical (broken paths, missing security docs), Warning (stale counts, missing routes), Info (minor wording drift, outdated roadmap phases).

Commit (fix mode only)

docs: sync documentation with codebase [doc-sync]

Arguments

$ARGUMENTS: Optional user-provided target, path, environment, symptom, or constraint. When empty, infer the narrowest safe scope from the current repository context and ask only if multiple high-impact choices remain.

Source: SKILL.md on GitHub

1 warning5mo5 checks ยท Risk SAFE
  • Gen Agent Trust Hub6mo

    The doc-sync skill is a utility for auditing and maintaining project documentation. It identifies inconsistencies between documentation and the codebase using local scripts to verify file paths. The skill is safe to use as it relies on standard file operations and local scripts for its auditing tasks.

  • Socket6mo

    No alerts

  • Snyk6mo

    Risk: LOW ยท No issues

  • Runlayer6mo

    2/3 files flagged

  • ZeroLeaks5mo

    Score: 93/100 ยท 2 sections analyzed

Signed by skilld at 9d099e9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago

README badge

README badge for acedergren/agentic-tools/doc-sync