docs-audit

docs-audit is a skill for Claude Code, Codex from ChanningLua/prax-agent. It costs 30 tokens per session (1,903 once invoked), scanned A, original, MIT.

A scheduled review that looks for documentation that may no longer match recently changed source code. It examines Git history and searches documentation for references to changed files or names.

In plain words
What is it for?
Use it to create a Markdown freshness report, optionally open a GitHub issue, and identify documentation affected by recent changes in source directories.
Why use it?
It highlights likely documentation drift so technical writers do not have to inspect commit history manually. It reports findings but does not rewrite the documentation.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/channinglua/prax-agent/docs-audit
Any agent
npx skills add ChanningLua/prax-agent --skill docs-audit
Clone the repo
git clone --depth 1 https://github.com/ChanningLua/prax-agent

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 docs-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/channinglua/prax-agent/docs-audit.svg)](https://agentmods.dev/skills/channinglua/prax-agent/docs-audit)
Your own site
<a href="https://agentmods.dev/skills/channinglua/prax-agent/docs-audit"><img src="https://agentmods.dev/badge/skills/channinglua/prax-agent/docs-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00030 $0.01903
Opus 5 $0.00015 $0.00951
Sonnet 5 $0.00006 $0.00381
Haiku 4.5 $0.00003 $0.00190

Measured 4d ago against content hash ba1b5cf436bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-audit 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 4d 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.

src/prax/skills/docs-audit/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:摸底

# 列出项目里实际的源目录和文档目录
ls -d src/ core/ tools/ lib/ docs/ 2>/dev/null
find . -maxdepth 2 -name "README*.md" -not -path "./node_modules/*"

Step 2:找近期改过的源文件

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:对每个源文件查文档提及

# 对 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:生成报告

模板:

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

Read the full file on GitHub · 185 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. 4d ago First seen · 185 lines · 30 tokens per session scan A ba1b5cf436bb

Subscribe to this mod's changes

docs-audit is a skill published in the GitHub repository ChanningLua/prax-agent (272 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 1,903 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

claude-context-improver

Audit and improve the Claude Code context layer — CLAUDE.md guidance files, .claude/rules/ path-scoped rules, and companion codemap.md navigation maps — against Claude 5 context-engineering rules (judgement over rules, progressive disclosure, no cross-layer conflicts). Asks whether to optimize the current repository…

bahayonghang/my-ai-cli-toolkit · 173 tokens

spec-lock

Bi-directional code and documentation synchronizer. Use when editing code that affects specifications, API contracts, or documentation. Prevents documentation rot by maintaining sync between implementation and docs. Automatically detects drift and suggests updates.

aegntic/cldcde · 45 tokens

agents-md-improver

Audit or improve repository-scoped Codex AGENTS.md, AGENTS.override.md, configured fallback instructions, and companion codemap.md navigation. Use for effective-chain audits, nested conflicts, stale commands, scoped-guidance gaps, approved updates, 优化 AGENTS.md, 审计 Codex 项目指导, 更新 AGENTS.md, or 生成 codemap.md. Exclude…

bahayonghang/my-ai-cli-toolkit · 107 tokens

Documentation Gap Finder

Audits a codebase or docs folder and lists everything that is undocumented, outdated, or unclear.

Notysoty/openagentskills · 24 tokens

hubspot-workflow-documenter

Use when documenting or auditing a HubSpot portal's workflows, when asked what a portal's automation actually does, or when looking for broken automation such as duplicate enrolment, dead email references or unreachable steps. Read only.

meticulosity/hubspot-workflow-documenter · 51 tokens

Agent Instruction Drift Check

Procedure for comparing an agent-facing instruction doc (AGENTS.md/CLAUDE.md-style) against the actual current code and configuration to find and flag mismatches.

niels-emmer/myace · 38 tokens