Agent skill

Doc Drift Detector

by borghei in borghei/Claude-Skills

Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity.

MITAuto-check passedDevelopment

Install Doc Drift Detector

skills CLI
$ npx skills add borghei/Claude-Skills --skill doc-drift-detector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills doc-drift-detector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/doc-drift-detector .claude/skills/doc-drift-detector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
doc-drift-detector
GitHub stars
874
Token cost
~1.9k tokens
SKILL.md length
768 words
Files
11 (incl. scripts, references, assets)
Skills in repo
364
Repo updated
First seen
Licence
MIT

At a glance

Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity.

  • Docs fall out of sync with code
  • SKILL.md covers Core Capabilities, When to Use, Clarify First and Tools, plus 4 more sections
  • Runs Python scripts from its folder; calls python
  • Preparing releases

What it does

Doc Drift Detector is an agent skill from borghei/Claude-Skills. Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity. Use when docs fall out of sync with code, preparing releases, running CI doc gates, or auditing doc accuracy.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts, reference files and assets (for example `assets/drift_report_template.md`, `assets/sample_drift_data.json` and `references/documentation_standards.md`).

It sits in Development, covering Technical documentation. It works with Python. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Docs fall out of sync with code
  • Preparing releases
  • Running CI doc gates
  • Auditing doc accuracy

Example prompts

  • “/doc-drift-detector”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit c9a1487. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Doc Drift Detector loads about 1.9k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 64 tokens; SKILL.md has 768 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit c9a1487, republished under its MIT licence (© borghei). 768 words, ~1,877 tokens.

Download SKILL.mdSave it as .claude/skills/doc-drift-detector/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
doc-drift-detector
description
Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity. Use when docs fall out of sync with code, preparing releases, running CI doc gates, or auditing doc accuracy.
license
MIT + Commons Clause
metadata.version
2.1.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
documentation
metadata.updated
2026-06-17
metadata.tags
documentation, staleness, api-docs, drift-analysis
metadata.python-tools
drift_analyzer.py, doc_staleness_scorer.py, api_doc_validator.py, link_checker.py
metadata.tech-stack
python, git, markdown, documentation

Documentation Drift Detector

The agent detects documentation drift by mapping code directories to their docs, comparing git modification histories, extracting Python function signatures via AST, validating every markdown link and anchor, and scoring freshness on a weighted 0-100 scale. All four CLI tools use the Python standard library only.

Core Capabilities

  • Full drift analysis — map docs to code, compare git histories, detect renamed files, version drift, broken references, and structural gaps; classify each issue by category, severity, and fix type.
  • API doc validation — AST-based extraction of Python signatures/classes compared against markdown API docs (undocumented items, phantom docs, parameter mismatches, deprecations).
  • Staleness scoring — weighted 0-100 freshness score across five dimensions with CI threshold gates and README-focused mode.
  • Link integrity audit — validate local files, anchors, cross-document anchors, images, case-sensitivity, and duplicate anchors; optional external URL checks.
  • Drift classification — structural, factual, referential, temporal, semantic categories, each tagged [AUTO]/[SEMI]/[MANUAL] for fix routing.
  • CI/CD integration — non-zero exit codes, JSON output, GitHub Actions and pre-commit recipes for ongoing monitoring.

When to Use

  • Docs have fallen out of sync with code — run full drift analysis.
  • Preparing a release — gate on aggregate staleness score.
  • Running CI doc gates — fail PRs on high/critical drift or broken links.
  • Auditing API doc accuracy against Python source.
  • Checking README health and link integrity after refactors.

Clarify First

Before running detection, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • Which check — full drift analysis, staleness score, API doc validation, or link audit (selects drift_analyzer.py vs doc_staleness_scorer.py vs api_doc_validator.py vs link_checker.py)
  • Repo & doc/source paths — the repository and which code and docs directories to compare (the input the tools scan)
  • Threshold & gate — minimum severity or staleness threshold for CI failure (sets --min-severity/--threshold and the exit-code gate)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Tools

ToolPurposeCommand
drift_analyzer.pyFull drift analysis between code and docspython scripts/drift_analyzer.py <repo> --min-severity high --json
doc_staleness_scorer.pyScore documentation freshness 0-100python scripts/doc_staleness_scorer.py <repo> --threshold 60
api_doc_validator.pyValidate API docs against Python source (AST)python scripts/api_doc_validator.py <src> <docs> --recursive
link_checker.pyAudit all markdown links and anchorspython scripts/link_checker.py <repo> --broken-only

All tools: Python 3.8+ stdlib only, --json and --help, non-zero exit codes for CI, any OS.

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/workflows-and-tool-reference.md — quick start, the 5 core workflows (full analysis, API validation, README health, link audit, CI monitoring) with output examples, GitHub Actions + pre-commit recipes, and the complete per-tool parameter/output/exit-code reference. Read when running tools or wiring CI.
  • references/scoring-categories-and-troubleshooting.md — the staleness scoring model and weights, the five drift categories, auto-fix vs manual-fix classification, detailed integration points, anti-patterns, troubleshooting table, and success criteria. Read when interpreting results or triaging drift.
  • references/documentation_standards.md — README structure, API docs, changelogs, ADRs, docs-as-code standards.
  • references/drift_prevention_guide.md — coupling strategies, CI gates, review checklists, and prevention patterns.
Show full SKILL.md (281 more words)Show less

Assets

AssetDescription
Drift Report TemplateTemplate for drift analysis reports
Sample Drift DataSample JSON for testing and demonstration

Scope & Limitations

Covers:

  • Detection of documentation drift against git history for any git repository
  • AST-based validation of Python API documentation (function signatures, class definitions, parameters, return types)
  • Internal link validation including local files, markdown anchors, cross-document anchors, images, and case-sensitivity checks
  • Multi-dimensional staleness scoring with configurable weights and CI/CD threshold enforcement

Does NOT cover:

  • Non-Python source code API validation -- the AST-based validator only parses Python; for TypeScript, Go, Rust, or Java APIs, use language-specific doc generators and pair with the link checker
  • External URL uptime monitoring -- --check-external performs one-shot HEAD requests but does not provide continuous monitoring; use the senior-devops skill for uptime dashboards
  • Automatic documentation rewriting -- tools classify issues as [AUTO], [SEMI], or [MANUAL] but do not generate replacement text; use the code-reviewer skill for AI-assisted doc suggestions
  • Content quality or readability assessment -- staleness scoring measures freshness and structural completeness, not prose quality; see the standards/communication library for writing guidelines

Integration Points

SkillIntegrationData Flow
code-reviewerInclude drift report in PR review commentsdrift_analyzer.py --json output feeds into review checklists as a documentation health section
senior-devopsAdd staleness gate to CI/CD pipelinesdoc_staleness_scorer.py --threshold 50 returns exit code 1 on failure, blocking deploys
senior-qaDocumentation quality as part of QA acceptancelink_checker.py --json output merges into QA dashboards alongside test coverage metrics
senior-fullstackValidate generated project docs post-scaffoldRun api_doc_validator.py against scaffolded docs/ directory to confirm generated API docs match source
senior-secopsAudit security documentation currencydrift_analyzer.py --scope security/ detects when security docs fall behind policy changes
senior-architectArchitecture decision record (ADR) freshnessdoc_staleness_scorer.py --required-sections "Status,Context,Decision,Consequences" validates ADR completeness

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references, assets) in engineering/doc-drift-detector of borghei/Claude-Skills.

  • SKILL.md
  • assets/drift_report_template.md
  • assets/sample_drift_data.json
  • references/documentation_standards.md
  • references/drift_prevention_guide.md
  • references/scoring-categories-and-troubleshooting.md
  • references/workflows-and-tool-reference.md
  • scripts/api_doc_validator.py
  • scripts/doc_staleness_scorer.py
  • scripts/drift_analyzer.py
  • scripts/link_checker.py

Open the folder on GitHubat commit c9a1487

Compare with similar skills

Doc Drift Detector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Doc Drift Detector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Doc Drift Detector this skillborghei/Claude-Skills874—~1.9kAutomated safety check: PassMIT
Adk Sample Creatorgoogle/adk-python22k—~1.3kAutomated safety check: PassApache-2.0
Crafting Effective Readmescumbucadev/cinemaempoa1465 repos~669Automated safety check: PassGPL-3.0
Acquire Codebase Knowledgegithub/awesome-copilot40k1 repos~2.3kAutomated safety check: PassMIT
Docs Conventionsflet-dev/flet17k—~1.6kAutomated safety check: PassApache-2.0
DDNS Provider DevelopmentNewFuture/DDNS4.7k—~558Automated safety check: PassMIT

Similar skills

  • Adk Sample Creator

    google/adk-python

    Official

    Creates a new sample agent in the ADK Python repository — the sample directory, its agent.py, and its README.md — following the conventions the existing samples already use.

    22k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Crafting Effective Readmes

    cumbucadev/cinemaempoa

    A skill your agent uses when writing or improving README files.

    146 GitHub starsUsed in 5 repos~669 tokens
    DevelopmentAuto-check passed
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Docs Conventions

    flet-dev/flet

    A skill your agent uses when writing or reviewing Flet documentation, including Python docstrings (Google style, reST roles, admonitions), Markdown docs (cross-references, images, code examples)…

    17k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Adds or changes a DNS provider in the DDNS project while keeping its code, schemas, tests and Chinese and English docs consistent.

    4.7k GitHub stars~558 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Mkdocs

    jeka-dev/jeka

    MkDocs documentation project reference covering CLI commands, mkdocs.yml configuration, Material theme setup, and plugin integration.

    176 GitHub stars~2k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from borghei/Claude-Skills

All 364 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    874 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    874 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    874 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    874 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Doc Drift Detector

What does Doc Drift Detector do?

Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity. Doc Drift Detector is an agent skill from borghei/Claude-Skills. Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity.

When should I use Doc Drift Detector?

Doc Drift Detector fits situations like: docs fall out of sync with code; preparing releases; running CI doc gates; auditing doc accuracy.

How do I install Doc Drift Detector in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill doc-drift-detector -a claude-code`. Or copy the skill folder (engineering/doc-drift-detector in borghei/Claude-Skills) into .claude/skills/doc-drift-detector in your project. Claude Code loads it when a task matches its description.

How do I install Doc Drift Detector in Codex?

Run `npx skills add borghei/Claude-Skills --skill doc-drift-detector -a codex`. Or copy the skill folder (engineering/doc-drift-detector in borghei/Claude-Skills) into .agents/skills/doc-drift-detector in your project. Codex loads it when a task matches its description.

Can I use Doc Drift Detector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill doc-drift-detector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/doc-drift-detector, .gemini/skills/doc-drift-detector, .github/skills/doc-drift-detector and .opencode/skills/doc-drift-detector in your project.

What does Doc Drift Detector need to run?

Going by SKILL.md and its folder, Doc Drift Detector needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Doc Drift Detector access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Doc Drift Detector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Doc Drift Detector use?

Doc Drift Detector is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Doc Drift Detector use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.2k tokens, read only when the agent opens those files.

What are the alternatives to Doc Drift Detector?

Skills that share tags, products or a category with Doc Drift Detector: Adk Sample Creator (google/adk-python, 22k stars), Crafting Effective Readmes (cumbucadev/cinemaempoa, 146 stars), Acquire Codebase Knowledge (github/awesome-copilot, 40k stars) and Docs Conventions (flet-dev/flet, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Doc Drift Detector?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 874 GitHub stars. The repository holds 364 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.