ar-optimize-docs

Audit project documentation against code, remove stale content, and install rules preventing re-bloat.

1|2|Updated Jul 11, 2026
One-click install
npx skills add https://github.com/mahsanamin/agentic-repos --skill ar-optimize-docs-mahsanamin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ar-optimize-docs
Source: https://github.com/mahsanamin/agentic-repos/tree/main/skills/ar-optimize-docs
Command: npx skills add https://github.com/mahsanamin/agentic-repos --skill ar-optimize-docs-mahsanamin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Project documentation drifts out of sync with the code it describes: claims become wrong, facts get duplicated across files, and stale history accumulates. A wrong doc is worse than a missing one because it gets trusted, and manual audits rarely verify every claim against the actual codebase. ## Core Features & Use Cases - Claim Verification: Mechanically checks every documented claim (endpoints, env vars, paths, behaviors, absence claims) against the real code and produces an evidence table classifying each as OK or WRONG. - Doc Classification and Reduction: Classifies every doc as WRONG, DUPLICATE, INVENTORY, HISTORY, SPECULATIVE, NAVIGATION, or LOAD-BEARING, then deletes, merges, or rewrites with a required user approval gate. - Secret and Staleness Scanning: Greps docs for leaked credentials and self-admitted staleness markers before any restructuring. - Regrowth Prevention: Installs or verifies a lean-docs rule and wires it into code review, docs-update steps, and contributor guides so the doc set stays small. - Use Case: After a major release, run a scoped audit on the docs a PR touched to confirm every changed claim matches the code, delete migration narratives that git already carries, and report before/after sizes. ## Quick Start Ask the assistant to run ar-optimize-docs to audit the docs in this repository and verify every claim against the code.

Frequently Asked Questions about ar-optimize-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit project documentation for stale or wrong claims?▼

Run the ar-optimize-docs audit, which inventories every Markdown, AsciiDoc, and reStructuredText file, then mechanically verifies each claim about endpoints, env vars, paths, and behaviors against the code. It produces an evidence table marking each claim OK or WRONG before any edits.

How to find leaked secrets in Markdown documentation?▼

The audit greps doc files for credential patterns like passwords, tokens, and API keys with case-insensitive matching, plus cloud endpoint URLs. On a hit, it replaces the value with placeholders and flags it for rotation, since the secret remains in git history.

Can I audit only the docs changed in a pull request?▼

Yes, scoped mode accepts a file list via stdin, the prompt, or a scope file, skipping full discovery and auditing only those files. Findings needing out-of-scope edits are recorded as deferred to the next full audit.

Does the documentation audit delete files without approval?▼

No, Phase 3 is a required gate that reports the evidence table, classification, and proposed deletions or rewrites before changing anything. Only if execute-and-report autonomy was agreed in Phase 0 does it proceed without waiting.

When should I not use a documentation audit skill?▼

Do not use it for comments inside code; declaration-attached doc blocks and inline comments belong to separate comment-optimization skills. Also avoid hand-editing generated documentation committed to the repo; fix the generator or template instead.