Skip to content
Skills Library
Documents & office · Review & audit

doc-cleanup

/doc-cleanup

Audit and clean Markdown documentation for context rot. Use when docs may contain completed-work logs, executed plans, stale claims, contradictions, dead paths, or drifted authorities, especially in agent-required reading.

Repository
doc-cleanup ↗
Licence
MIT
Last repository change
14.07.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 14.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Audit and clean Markdown documentation for context rot. Use when docs may contain completed-work logs, executed plans, stale claims, contradictions, dead paths, or drifted authorities, especially in agent-required reading.

Original author description

Audit and clean Markdown documentation for context rot. Use when docs may contain completed-work logs, executed plans, stale claims, contradictions, dead paths, or drifted authorities, especially in agent-required reading.

How it works

  1. 1. Inventory the full scope
  2. 2. Diagnose without editing
  3. 3. Report and stop
  4. 4. Execute the approved plan
  5. 5. Verify and hand off
Original SKILL.md headings · 125 lines, 855 words
SKILL.md preview
---
name: doc-cleanup
description: Audit and clean Markdown documentation for context rot. Use when docs may contain completed-work logs, executed plans, stale claims, contradictions, dead paths, or drifted authorities, especially in agent-required reading.
---

# Doc cleanup

Remove context rot from Markdown without erasing load-bearing rules or useful
history. Treat every doc claim as a hypothesis and the repository as evidence.

Work in two passes: diagnose and report without editing, then execute only after
the user approves the proposed cleanup. Approval to edit does not imply approval
to commit.

## 1. Inventory the full scope

Enumerate every in-scope `*.md` file, excluding generated, dependency, VCS, and
user-excluded paths. Record each file's line count and role:

- **entry**: `AGENTS.md`, `CLAUDE.md`, or equivalent
- **required**: an entry doc instructs agents to read it
- **reference**: consulted conditionally
- **historical**: retained for lookup, not current guidance

Follow the reading pointers in every entry doc. Weight findings by reading
frequency: rot in required reading costs more than rot in an archive.

Inventory is complete when every in-scope Markdown file has a role and every
entry-doc reading pointer is accounted for as resolved, dead, or external.

## 2. Diagnose without editing

Read every in-scope doc deeply enough to test it for these rot patterns:

1. **Completed-work logs** — finished checklists, phase logs, implementation
   narratives, post-mortems, and verification transcripts presented as live
   guidance.
2. **Executed plans** — shipped plans still written as intent, including
   superseded analysis and rejected options.
3. **Internal contradictions** — competing values, corrections below stale
   tables, or dated addenda that reverse earlier guidance.
4. **Stale claims** — references to renamed symbols, changed constants, wrong
   line numbers, or work described as unmerged after it landed.
5. **Dead paths** — missing files, obsolete machine paths, moved repositories,
   or removed tools.
6. **Authority drift** — a purported source of truth that no longer matches the
   implemented behavior or a later authoritative decision.

For each suspected hit, capture:

- exact file and line location
- the claim or content at issue
- repository evidence from file lookup, search, configuration, tests, or Git
  history
- confidence and any unresolved ambiguity
- the smallest safe disposition: keep, correct, condense, archive, or banner

Code proves implemented behavior, not necessarily intended behavior. When a doc
may define the intended contract, report the mismatch as unresolved authority
drift unless repository evidence establishes which authority superseded it.

Mark load-bearing content that must survive: hard rules, active decisions,
recurring traps, do-this guidance, and domain vocabulary. A trap remains current
even when the story of discovering it is historical.

Diagnosis is complete when every inventoried file is either represented by at
least one evidence-backed finding or explicitly marked clean, and every factual
finding has been checked against repository evidence.

## 3. Report and stop

Present findings from highest to lowest `reading frequency × misdirection risk`.
For each one, show the claim, evidence, consequence, and proposed disposition.
Then give a per-file cleanup plan, list unresolved decisions separately, and
state which load-bearing content will remain.

Stop for approval. The diagnostic pass must leave the worktree unchanged.

Reporting is complete when the user can approve, reject, or amend every proposed
file change without additional investigation.

## 4. Execute the approved plan

Re-check each factual claim immediately before writing it. Apply only approved
changes, using this per-file playbook:

- **Archive history that must remain conveniently discoverable.** Put a verbatim
  copy or clearly bounded extract in `docs/archive/` with a collision-resistant
  source-and-date name. Record its source path and Git blob or content hash in
  the cleanup report or a sidecar manifest, leaving verbatim content untouched.
  Verify a full-file archive against the captured pre-edit source; verify an
  extract against its recorded source bounds. Git history alone is sufficient
  when discoverability does not justify a live archive.
- **Rewrite live guidance as current facts.** Add a short archive pointer when
  one was created. Derive every retained factual claim from current evidence,
  rather than carrying it forward unchecked.
- **Point to authorities.** Name the owning schema, configuration, or source file
  instead of duplicating volatile values.
- **Condense completed work.** Replace finished checklists with a short outcome;
  preserve open items in their original wording.
- **Preserve traps.** Turn recurring gotchas into short imperative guidance
  before moving their historical narrative.
- **Banner unresolved drift.** State the mismatch and the currently operative
  authority; avoid silently rewriting a contract whose ownership is unclear.
- **Repair entry docs.** Fix dead reading pointers and stale feature claims, and
  keep the required-reading set minimal.

Execution is complete when every approved finding has a corresponding diff or a
documented reason no change was needed, and every retained factual claim touched
by the rewrite has fresh evidence.

## 5. Verify and hand off

Verify that:

- every relative link in each touched file resolves
- full-file archives match their captured pre-edit sources byte-for-byte, and
  extracts match their recorded source bounds
- load-bearing content identified during diagnosis survives in live guidance
- the diff contains only approved Markdown changes
- no new contradiction was introduced across touched docs

Report the changed files, archive mappings, corrected contradictions, unresolved
authority decisions, and verification performed. Offer a docs-only commit with a
specific message; create it only when the user authorizes the commit.

The cleanup is complete when every approved finding is accounted for, all checks
pass, and the user has a reviewable diff plus any remaining decisions.

Versions

RepositoryScoreLicence
This page · aka-luan/doc-cleanup90MIT
Algoza-Solutions/spider-protocol100MIT

Database snapshot: 13.11.2026 · package version 38872df8daed (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95doc-to-markdown
    Doc to Markdown - convert Word (.doc/.docx) documents to clean Markdown using MinerU. Use when converting Word files to Markdown for reading or editing.
  • 100docs-consolidate
    Audit a repo's documentation for internal contradictions, stale claims, orphans and bloat after it has accumulated commits, then report findings for the user to disposition. Use when the consolidation nudge fires, or when the user asks to consolidate, audit, or spring-clean the…
  • 90nth-doc-sync
    Use when the user asks to check, audit, or sync documentation after a completed code, architecture, schema, workflow, or API change: finds stale, missing, duplicated, or contradictory docs and keeps each concern in one owning place. Not before the change exists, for changes…
  • 100v1-md2docs
    Use when explicitly converting a Markdown file into a formatted Google Doc. Triggers on "Markdown to Google Doc" or "publish this markdown as a doc".
  • 90purge-slop-docs
    Use when a human asks to purge stale docs, clean Markdown, or reorder the documentation hierarchy. Not for code debris: use deslop.
  • 100doc-audit
    Review this project's documentation (README.md, CLAUDE.md, docs/adr/, docs/design/, .claude/skills/) for redundancy, staleness, and archaeology, and fix what's genuinely wrong. Use when the user asks to audit, clean up, or reduce documentation, or says the docs feel bloated,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.