Doc Cleanup logo

Doc Cleanup

Community
aka-luan
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.

Overview

Publisheraka-luan
Repositorydoc-cleanup
Skill namedoc-cleanup
Stars
47
Forks
1
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aka-luan on GitHub. Read the source before you install it.

Installation

Install the Doc Cleanup AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aka-luan/doc-cleanup/tree/main/skills/doc-cleanup
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aka-luan/doc-cleanup.git /tmp/doc-cleanup
mkdir -p .claude/skills
cp -r /tmp/doc-cleanup/skills/doc-cleanup .claude/skills/doc-cleanup
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Doc Cleanup in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Doc Cleanup on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Doc Cleanup is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Doc Cleanup AI skill do?

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.

Why use Doc Cleanup on TypingMind?

Because you install it once and use it with any model. Doc Cleanup is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Doc Cleanup in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aka-luan/doc-cleanup/tree/main/skills/doc-cleanup. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Doc Cleanup?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Doc Cleanup?

As many as you like. As long as a model supports skills, you can use Doc Cleanup with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Doc Cleanup AI skill free?

Yes. It is published on GitHub by aka-luan under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇