Agent skill

Docs Audit

by ChanningLua in ChanningLua/prax-agent

“对比近期代码改动和文档变更,找出"代码改了文档没跟上"的 drift”

— description from SKILL.md by ChanningLua
MITAuto-check: notesDevelopment

Install Docs Audit

skills CLI
$ npx skills add ChanningLua/prax-agent --skill docs-audit -a claude-code

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

GitHub CLI
$ gh skill install ChanningLua/prax-agent docs-audit --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/ChanningLua/prax-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/prax/skills/docs-audit .claude/skills/docs-audit && 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
docs-audit
GitHub stars
273
Token cost
~1k tokens
SKILL.md length
205 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 6 steps: :摸底 → :找近期改过的源文件 → :对每个源文件查文档提及 → …
  • SKILL.md covers 何时触发, 输入, 输出 and 工作流程, plus 5 more sections
  • Calls git, tsx and go

About this skill

Docs Audit is a skill in ChanningLua/prax-agent (273 stars). Its SKILL.md is about 1k tokens. Licence: MIT.

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, Grep, Glob, Notify

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. :摸底
  2. :找近期改过的源文件
  3. :对每个源文件查文档提及
  4. :生成报告
  5. (可选):开 GitHub issue
  6. :通知

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Grep
    • Glob
    • Notify

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • tsx
    • go
    • java
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    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

Docs Audit loads about 1k tokens when it runs. Until then it costs about 11 tokens; SKILL.md has 205 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~11
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Grep, Glob, Notify

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from ChanningLua/prax-agent at commit 19d016b, republished under its MIT licence (© ChanningLua). 205 words, ~1,019 tokens.

Download SKILL.mdSave it as .claude/skills/docs-audit/SKILL.md (or your agent's skills folder).
name
docs-audit
description
对比近期代码改动和文档变更,找出"代码改了文档没跟上"的 drift
allowed-tools
Bash, Read, Write, Grep, Glob, Notify
triggers
docs audit, 文档审计, docs freshness, stale docs, 文档过时, 文档 drift, devex
tags
documentation, audit, devex, drift
priority
7

Docs Freshness Audit

痛点:代码改了 40 天了,文档还停在 3 个月前。没人专门盯,自然就 drift。这个 skill 每周扫一次、给出有证据的清单,让技术写作不用手动翻 git blame。

何时触发

  • cron 每周跑一次
  • 用户说:"扫一下文档哪些过时了"、"查 docs freshness"
  • PR 改了 src/ 但没改 docs/ 时触发(需要 hook 配合,本 skill 不负责触发点)

输入

  • 窗口:默认 30 天(--since="30 days ago"),用户可覆盖
  • 源目录:默认 src/、core/、tools/、lib/ 里实际存在的
  • 文档目录:默认 docs/ + README.md + CHANGELOG.md

实际检测前先用 Glob 探一下项目里实际的目录布局,不要假设。

输出

一个 markdown 报告 + 可选 GitHub issue:

.prax/reports/docs-audit-<YYYY-MM-DD>.md

不自动改文档(写作是人的事)。不删已有报告(历史归档有价值)。

工作流程

Step 1:摸底
bash
# 列出项目里实际的源目录和文档目录
ls -d src/ core/ tools/ lib/ docs/ 2>/dev/null
find . -maxdepth 2 -name "README*.md" -not -path "./node_modules/*"
Step 2:找近期改过的源文件
bash
git log --since="30 days ago" --name-only --pretty=format: -- <source-dirs> \
  | sort -u \
  | grep -v '^$' \
  | grep -E '\.(py|ts|tsx|js|jsx|go|rs|java|kt|md)$'

.md 也保留——文档自己也可能"过时"(比如指向已删除的文件)。

Step 3:对每个源文件查文档提及
bash
# 对 src/auth.py,grep docs/ 和 README
SOURCE=src/auth.py
STEM=$(basename $SOURCE .py)      # auth
grep -rln "$SOURCE\|$STEM" docs/ README*.md CHANGELOG.md 2>/dev/null

四种情况分类:

场景判定列入报告?
源文件新增(无 history)+ 文档无提及可能是内部实现,skip❌
源文件改过 + 文档也改过(窗口内)健康❌
源文件改过 + 文档完全没提过可能是内部模块,不是公开 API⚠ 低优先级
源文件改过 + 文档提过但文档未改真 drift✅ 高优先级
Step 4:生成报告

模板:

markdown
---
generated_at: 2026-04-22T09:00:00+08:00
window: "last 30 days"
repo_head: <short sha>
stale_count: 7
---

# Docs Freshness Audit — 2026-04-22

扫描窗口:过去 30 天。发现 **7 处可能的文档过时**。

## 🔴 高优先级(文档提及 + 代码改了 + 文档没改)

### 1. `src/auth.py` ↔ `docs/authentication.md`

**证据**:

- 源文件最近 commit:

a1b2c3d 2026-04-20 feat(auth): migrate session cookies to SameSite=Strict d4e5f6g 2026-04-15 fix(auth): token refresh race

- 文档最后修改:2026-02-10(64 天前)
- 文档中仍提到:SameSite=Lax(第 45 行)

**建议**:更新 `docs/authentication.md` 的 cookie 配置段。

### 2. ...

## 🟡 低优先级(代码改了但文档没提过)

- `core/cache.py`(3 commits in window)—— 可能是内部模块,酌情是否要补文档

## 📊 统计

- 扫描源文件:124
- 窗口内改动:18
- 真 drift:7
- 可能内部:11
Step 5(可选):开 GitHub issue

如果 gh 可用 且 用户配置允许(.prax/docs-audit.yaml: auto_issue: true):

bash
gh issue create \
  --title "Docs drift: 7 files need updating" \
  --body-file .prax/reports/docs-audit-2026-04-22.md \
  --label "docs,maintenance"

默认不开 issue——避免噪音。用户明确开关才做。

Step 6:通知

若 .prax/notify.yaml 有 devex channel:

Notify(
  channel = "devex",
  title = "Docs audit: X files drifting",
  body = <报告的 🔴 段摘要 + 报告路径>,
  level = "warn" if stale_count > 0 else "info",
)

硬约束

  1. 每项必须给证据——三行 git log + 文档最后修改时间。不能空口说"可能过时"。
  2. 不改文档——只报告。文档怎么写是人的事。
  3. 新文件不报 stale——没 history 的源文件,默认跳过。
  4. 跳过生成文件:*.lock、__pycache__、node_modules、.venv、dist/、build/
  5. 报告只写不删——.prax/reports/ 下的历史报告保留,用户自己清理。

工具选择(很关键)

  • 报告文件 .prax/reports/docs-audit-<YYYY-MM-DD>.md 几乎总是新文件:必须用 Write(它会自动建 .prax/reports/ 目录)。
  • git log / grep -rln 读 commit 历史和文档提及:用 Bash(需要 --permission-mode danger-full-access 或 Prax 未来加的 SafeGitTool)。
  • HashlineEdit / Edit 对不存在的报告路径会 File not found——不要拿它们写新报告。

脾气

  • 误报多好过漏报少:technical writers 宁愿过滤 20% 无关项,也比错过真 drift 强
  • 报告中列的每个源文件都要带最近 3 个 commit sha,让读者能 git show 验证
  • 低优先级那段只列前 20 条,超了折叠成"还有 N 个"

配置(可选).prax/docs-audit.yaml

yaml
window_days: 30
source_dirs: ["src", "core", "tools", "lib"]
doc_dirs: ["docs"]
include_files: ["README.md", "README.zh-CN.md", "CHANGELOG.md"]
skip_patterns: ["**/migrations/**", "**/__generated__/**"]
auto_issue: false
notify_channel: devex   # 空字符串或不设 = 不通知

和其他 skill 的接力

  • 上游 release-notes:发版前跑一次 docs-audit,把 drift 塞进 "## Documentation" 段
  • 上游 pr-triage:PR 改了 src/ 但没改 docs/,可以作为 triage 的一条"需关注"信息

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

Files

Just SKILL.md in src/prax/skills/docs-audit of ChanningLua/prax-agent.

Open the folder on GitHubat commit 19d016b

Compare with similar skills

Docs Audit 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.

Docs Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs Audit this skillChanningLua/prax-agent273—~1kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything86k1 repos~1.2kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    86k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    86k GitHub starsUsed in 1 repo~1.3k tokens
    DevelopmentAuto-check passed

More from ChanningLua/prax-agent

All 12 skills in this repo
  • Prax Shift

    ChanningLua/prax-agent

    Hand coding work or explicitly authorized one-shot verification to Prax Shift, inspect a shift, or schedule supported coding work with Claude as the worker.

    273 GitHub stars~1.4k tokensUpdated 26 days ago
    Auto-check passed
  • Prax Shift

    ChanningLua/prax-agent

    Hand coding work or explicitly authorized one-shot verification to Prax Shift, inspect a shift, or schedule supported coding work with Codex as the worker.

    273 GitHub stars~1.6k tokensUpdated 26 days ago
    Auto-check passed
  • AI News Daily

    ChanningLua/prax-agent

    端到端 pipeline —— 抓 X/知乎/Bilibili AI 相关热门 → 整理成 wiki → 推送飞书日报. An agent skill from ChanningLua/prax-agent.

    273 GitHub stars~1.3k tokensUpdated 26 days ago
    Auto-check: notes
  • Browser Scrape

    ChanningLua/prax-agent

    用 AutoCLI 二进制驱动用户已登录的 Chrome 抓取 Twitter/X、知乎、Bilibili、Reddit 等 55+ 站点

    273 GitHub stars~587 tokensUpdated 26 days ago
    Auto-check: notes
  • Hotspot Article

    ChanningLua/prax-agent

    从近期大事件、真实需求和常青决策中选题,完成多源研究、业务落地、实测、事实核验和精选文章. An agent skill from ChanningLua/prax-agent.

    273 GitHub stars~2.7k tokensUpdated 26 days ago
    Auto-check: notes
  • Knowledge Compile

    ChanningLua/prax-agent

    把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报

    273 GitHub stars~914 tokensUpdated 26 days ago
    Auto-check: notes

Works with

Categories

Questions about Docs Audit

How do I install Docs Audit in Claude Code?

Run `npx skills add ChanningLua/prax-agent --skill docs-audit -a claude-code`. Or copy the skill folder (src/prax/skills/docs-audit in ChanningLua/prax-agent) into .claude/skills/docs-audit in your project. Claude Code loads it when a task matches its description.

How do I install Docs Audit in Codex?

Run `npx skills add ChanningLua/prax-agent --skill docs-audit -a codex`. Or copy the skill folder (src/prax/skills/docs-audit in ChanningLua/prax-agent) into .agents/skills/docs-audit in your project. Codex loads it when a task matches its description.

Can I use Docs Audit 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 ChanningLua/prax-agent --skill docs-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs-audit, .gemini/skills/docs-audit, .github/skills/docs-audit and .opencode/skills/docs-audit in your project.

What does Docs Audit need to run?

Going by SKILL.md and its folder, Docs Audit needs the command-line tools its instructions call (git, tsx, go, java and gh). Its frontmatter pre-approves these tools: Bash, Read, Write, Grep, Glob, Notify.

Does Docs Audit access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docs Audit safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Docs Audit use?

Docs Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docs Audit use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docs Audit?

Skills that share tags, products or a category with Docs Audit: Finishing a Development Branch (obra/superpowers, 296k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 86k stars) and Code Design Rationale Investigator (cursor/plugins, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs Audit?

ChanningLua (a GitHub user) maintains it in ChanningLua/prax-agent, which has 273 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 11, 2026.

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