# Doc consolidation

> Doc consolidation is an open-source agent skill for developer tools. Merges scattered agent-run reports into committed docs, then removes the sources. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ajyadav013/claude-kit/tree/main/skills/doc-consolidation
- **Repository:** https://github.com/ajyadav013/claude-kit
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** doc-consolidation
- **Collection:** https://github.com/ajyadav013/claude-kit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill cleans up markdown that an autonomous run leaves behind, such as report, analysis, audit and summary files plus scratch notes. It pulls the durable findings out of those throwaway files and routes them into permanent documents, choosing between weaving content into an existing section, replacing stale material, appending a dated section or creating a new file.

The workflow has two phases. The first is a read-only triage that detects untracked candidate files, splits them into sections, scores their value and presents a routing plan as a table. The second runs only after the user approves: it merges each chunk, checks that the destination's frontmatter and structure are intact, deletes the source files only once their content is confirmed merged, and reports what changed so the diff can be reviewed before commit. Low-value boilerplate is dropped rather than merged.

The skill expects a repository with a docs/decisions folder for ADRs, a CHANGELOG and the project's rules files for human approval and memory promotion. It does not write new documentation itself; authoring new ADRs or judging prose is handed off to a separate documentation skill.

## When your agent uses it

> Harvest ephemeral agent-run reports (REPORT/ANALYSIS/AUDIT/SUMMARY, scratch notes) into canonical committed docs, then delete sources. Do NOT use to author new docs or judge prose (use documentation-and-adrs).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/doc-consolidation)
- [License: MIT](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/doc-consolidation)

## Features

- **Candidate file detection:** Finds untracked markdown outside standard doc folders that uses non-canonical names or typical LLM-output headings.
- **Two-phase approval workflow:** Presents a read-only merge plan and waits for approval before any file is changed or deleted.
- **Routing by content type:** Sends decisions to ADRs, action items to dated plans, metrics to benchmark docs and API changes to the changelog.
- **Four merge strategies:** Supports weaving, replacing, appending or creating standalone docs depending on what already exists.
- **Verify before delete:** Confirms the destination's frontmatter and structure after a merge and only then removes the source files.
- **Promote durable lessons:** Moves lasting lessons into agent memory rather than turning them into documents.

## Good for

- Clean up untracked analysis and audit reports before opening a pull request
- Preserve findings from a code review before the working files are lost
- Turn a decision noted in scratch notes into an ADR entry
- Merge several run summaries into the existing project documentation
- Plan which generated report files to keep, merge or drop

## Install

### Claude Code

This skill ships in the `claude-kit` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit
```

Or copy only this skill to `~/.claude/skills/doc-consolidation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/doc-consolidation &&
cp -R "$tmp/skills/doc-consolidation" ~/.claude/skills/doc-consolidation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/doc-consolidation` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/doc-consolidation` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/doc-consolidation &&
cp -R "$tmp/skills/doc-consolidation" ~/.agents/skills/doc-consolidation &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/doc-consolidation` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/doc-consolidation` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/doc-consolidation &&
cp -R "$tmp/skills/doc-consolidation" ~/.cursor/skills/doc-consolidation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/doc-consolidation` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ajyadav013/claude-kit.git --path skills/doc-consolidation
```

Or copy the folder to `~/.gemini/skills/doc-consolidation` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/doc-consolidation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/doc-consolidation &&
cp -R "$tmp/skills/doc-consolidation" ~/.copilot/skills/doc-consolidation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/doc-consolidation` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git
```

Then copy `claude-kit/skills/doc-consolidation` into your agent's skills folder as `doc-consolidation`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Doc consolidation delete files without asking?

No. Triage is read-only and presents a plan. Merging and deleting only happen after the user approves that plan, and sources are removed only once their content is confirmed in the destination.

### When should I not use Doc consolidation?

Skip it when files already live in a proper home such as docs or skills, when they are intentional scratch the user wants kept, or when they hold no extractable value, in which case the skill suggests deleting them.

### Does Doc consolidation write new documentation?

No. Authoring new guides, READMEs or ADRs is handled by the separate documentation-and-adrs skill, which this one hands off to.

### Does Doc consolidation include scripts or specific tool requirements?

The skill ships as a single SKILL.md file with no scripts, and it does not set allowed tools.

### How do I install Doc consolidation in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/doc-consolidation to use it in all your projects, or to .claude/skills/doc-consolidation in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

### Does Doc consolidation run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Doc consolidation?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Doc consolidation?

The closest alternatives to Doc consolidation are Documentation and adrs, Documentation and adrs, Update docs and commit, Decision backfill and Repository governance lifecycle.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Documentation and adrs](https://ai-powered.com/skills/documentation-and-adrs): Documentation and adrs is an open-source agent skill for developer tools.
- [Documentation and adrs](https://ai-powered.com/skills/documentation-and-adrs-ajyadav013-2): Documentation and adrs is an open-source agent skill for developer tools.
- [Update docs and commit](https://ai-powered.com/skills/update-docs-and-commit): Update docs and commit is an open-source agent skill for developer tools.
- [Decision backfill](https://ai-powered.com/skills/decision-backfill): Decision backfill is an open-source agent skill for developer tools.
- [Repository governance lifecycle](https://ai-powered.com/skills/repository-governance-lifecycle): Repository governance lifecycle is an open-source agent skill for developer tools.
- [Project retrofit](https://ai-powered.com/skills/project-retrofit): Project retrofit is an open-source agent skill for developer tools.
- [Agentsmd optimize](https://ai-powered.com/skills/agentsmd-optimize): Agentsmd optimize is an open-source agent skill for developer tools.
- [Spec driven develop](https://ai-powered.com/skills/spec-driven-develop): Spec driven develop is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/doc-consolidation-ajyadav013
