Agent skill

Doc Consolidation

by athola in athola/claude-night-market

Merges ephemeral report and analysis artifacts into permanent documentation.

MITAuto-check passedDevelopment

Install Doc Consolidation

skills CLI
$ npx skills add athola/claude-night-market --skill doc-consolidation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market doc-consolidation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/sanctum/skills/doc-consolidation .claude/skills/doc-consolidation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
doc-consolidation
GitHub stars
341
Token cost
~2.3k tokens
SKILL.md length
833 words
Files
5
Skills in repo
152
Repo updated
First seen
Licence
MIT

At a glance

Merges ephemeral report and analysis artifacts into permanent documentation.

  • Works in 7 steps: Triage (Fast Model) → Execute (Main Model) → Candidate Detection → …
  • LLM-generated markdown files have accumulated and need consolidation
  • SKILL.md covers When To Use, When NOT To Use, Formatting and Quick Start, plus 10 more sections
  • Calls git

What it does

Doc Consolidation is an agent skill from athola/claude-night-market. Merges ephemeral report and analysis artifacts into permanent documentation. Use when LLM-generated markdown files have accumulated and need consolidation.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `modules/candidate-detection.md`, `modules/content-analysis.md` and `modules/destination-routing.md`).

It sits in Development, covering Markdown. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • LLM-generated markdown files have accumulated and need consolidation
  • Tasks that involve Markdown

Example prompts

  • “Use the doc-consolidation skill to merge ephemeral report and analysis artifacts into permanent documentation”
  • “/doc-consolidation”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Triage (Fast Model)
  2. Execute (Main Model)
  3. Candidate Detection
  4. Content Analysis
  5. Destination Routing
  6. Generate Plan
  7. Execute Merges

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Doc Consolidation loads about 2.3k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 833 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 833 words, ~2,296 tokens.

Download SKILL.mdSave it as .claude/skills/doc-consolidation/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
doc-consolidation
description
Merges ephemeral report and analysis artifacts into permanent documentation. Use when LLM-generated markdown files have accumulated and need consolidation.
globs
**/*.md
alwaysApply
false
category
documentation
tags
docs, consolidation, cleanup, git-hygiene, knowledge-management
status
stable
created
2025-12-06
updated
2025-12-06
modules
modules/candidate-detection.md, modules/content-analysis.md, modules/destination-routing.md, modules/merge-execution.md
model_hint
standard

Doc Consolidation

Extracts valuable knowledge from ephemeral LLM outputs and merges it into permanent documentation.

When To Use

Use this skill when:

  • You have untracked *_REPORT.md or *_ANALYSIS.md files from Claude sessions
  • Git status shows markdown files that shouldn't be committed but contain useful content
  • You want to preserve insights from code reviews, refactoring reports, or API audits
  • Preparing a PR and need to clean up working artifacts

Do NOT use when:

  • Files are already in proper documentation locations (docs/, skills/)
  • Files are intentionally temporary scratch notes
  • User explicitly wants to preserve the original report format
  • Source files have no extractable value (pure log output)

When NOT To Use

  • Updating docs to match a code change (use sanctum:doc-updates)
  • Detecting AI patterns in prose (use scribe:slop-detector)

Formatting

When merging content into permanent documentation, follow Skill(leyline:markdown-formatting) conventions: wrap prose at 80 chars (prefer sentence/clause boundaries), blank lines around headings, ATX headings only, blank line before lists, and reference-style links for long URLs.

Quick Start

/consolidate-docs

Or invoke directly:

I have some report files that need consolidating into permanent docs.

Two-Phase Workflow

Phase 1: Triage (Fast Model)

Read-only analysis to generate a consolidation plan:

  1. Detect candidates - Find untracked markdown files with LLM output markers
  2. Analyze content - Extract and categorize valuable sections
  3. Route destinations - Match content to existing docs or propose new files
  4. Present plan - Show user what will be consolidated and where

Checkpoint: User reviews and approves plan before execution.

Phase 2: Execute (Main Model)

After approval, performs the consolidation:

  1. Merge content - Weave into existing docs or create new files
  2. Delete sources - Remove ephemeral files after successful merge
  3. Generate summary - Report what was created/updated/deleted

Workflow Details

Step 1: Candidate Detection

Load: @modules/candidate-detection.md

Identifies files using:

  • Git status (untracked .md files)
  • Location (not in standard doc directories)
  • Naming (ALL_CAPS non-standard names)
  • Content markers (Executive Summary, Findings, Action Items)
Step 2: Content Analysis

Load: @modules/content-analysis.md

For each candidate:

  • Extract sections as content chunks
  • Categorize: Actionable Items, Decisions, Findings, Metrics, Migration Guides, API Changes
  • Score value: high/medium/low
Step 3: Destination Routing

Load: @modules/destination-routing.md

For each valuable chunk:

  • Semantic match against existing documentation
  • Apply default mappings if no good match
  • Determine merge strategy (weave, replace, append, create)
  • Check the audience tier before routing. A destination serves one reader, and merging across tiers is how a getting-started page acquires an audit table. Report-derived findings, metrics, and rationale are expert content: route them to docs/deep-dive/<topic>.md, an ADR, or a benchmarks page, then link from the newcomer document rather than weaving into it. Tier table and cut test: scribe:slop-detector module audience-targeting.md. When the destination's own tier is unclear, ask, do not guess.
Step 4: Generate Plan

Present consolidation plan to user:

markdown
# Consolidation Plan

## Source: API_REVIEW_REPORT.md

| Content | Category | Value | Destination | Action |
|---------|----------|-------|-------------|--------|
| API inventory | Findings | High | docs/api-overview.md | Create |
| Action items | Actionable | High | docs/plans/2025-12-06-api.md | Create |

### Post-Consolidation
- Delete: API_REVIEW_REPORT.md

Proceed with consolidation? [Y/n]
Step 5: Execute Merges

Load: @modules/merge-execution.md

After user approval:

  • Group operations by destination file
  • Apply merge strategies
  • Validate results (frontmatter intact, structure preserved)
  • Delete source files
  • Generate execution summary

Fast Model Delegation

Phase 1 tasks are delegated to haiku-class models for efficiency:

python
# plugins/sanctum/scripts/consolidation_planner.py handles:
-scan_for_candidates()
-extract_content_chunks()
-categorize_chunks()
-score_value()
-find_semantic_matches()

Phase 2 stays on the main model for careful merge execution.

Show full SKILL.md (344 more words)Show less

Content Categories

CategoryDescriptionDefault Destination
Actionable ItemsTasks, TODOs, next stepsdocs/plans/YYYY-MM-DD-{topic}.md
Decisions MadeArchitecture choicesdocs/adr/NNNN-{date}-{topic}.md
Findings/InsightsAudit results, analysisBest-match existing doc of the same tier, else docs/deep-dive/
Metrics/BaselinesBefore/after comparisonsdocs/benchmarks/
Migration GuidesStep-by-step proceduresdocs/migration-guide.md
API ChangesBreaking changes, deprecationsCHANGELOG or api docs

Merge Strategies

Intelligent Weave

Insert content into matching existing sections, preserving style.

Use when: Destination has relevant section, content is additive.

Replace Section

Replace existing section with more detailed new content.

Use when: New content 2x+ more detailed or has later date.

Append with Context

Add new section with date and source reference.

Use when: No matching section, content doesn't fit existing structure.

Create New File

Generate complete new document.

Use when: No suitable destination exists, content warrants standalone doc.

Integration

Works with other sanctum skills:

  • git-workspace-review: May suggest consolidation when untracked reports detected
  • pr-prep: Warns about untracked analysis files before PR creation
  • doc-updates: Can invoke for final polish after consolidation

Example Session

User: I have API_REVIEW_REPORT.md from our review session. Can you consolidate it?

Claude: I'll consolidate the report into permanent documentation.

**Phase 1: Triage**

Scanning for candidates...
- Found: API_REVIEW_REPORT.md (untracked, LLM markers detected)

Analyzing content...
- Extracted 6 content chunks
- High value: API inventory, action items, CLI recommendation
- Medium value: security assessment
- Low value: executive summary (generic)

Routing destinations...
- API inventory → docs/api-overview.md (CREATE)
- Action items → docs/plans/2025-12-06-api-consistency.md (CREATE)
- CLI naming → docs/adr/0002-cli-naming.md (CREATE ADR)
- Security → Already covered in docs/security.md (SKIP)

**Consolidation Plan**
[table shown]

Proceed? [Y/n]

User: Y

Claude: **Phase 2: Executing**

Created: docs/api-overview.md (1,247 bytes)
Created: docs/plans/2025-12-06-api-consistency.md (892 bytes)
Created: docs/adr/0002-2025-12-06-cli-naming.md (634 bytes)
Deleted: API_REVIEW_REPORT.md

Consolidation complete. Review the created files and commit when ready.

Troubleshooting

No candidates found
  • Check git status for untracked files
  • Files may already be in standard locations
  • Try explicit file path: "Consolidate API_REVIEW_REPORT.md"
Low-quality extractions
  • Source file may lack structured sections
  • Content may be too generic to categorize
  • Try manual extraction for unstructured reports
Merge conflicts
  • Destination file structure changed
  • Try APPEND strategy instead of WEAVE
  • Manual intervention may be needed
  • sanctum:doc-updates - General documentation updates
  • sanctum:git-workspace-review - Pre-flight workspace analysis
  • sanctum:pr-prep - Pull request preparation
  • imbue:catchup - Understanding recent changes

Exit Criteria

  • Consolidation plan presented to the user showing source files, content categories, destination paths, and merge strategies before any file is modified
  • All source ephemeral files (*_REPORT.md, *_ANALYSIS.md, etc.) are deleted after their content is successfully merged
  • Each merged destination file has its frontmatter intact and existing structure preserved after the merge
  • No merge moved content into a document written for a different reader. Cross-tier content went to a linked deep dive instead
  • git status shows no untracked report-style markdown files after consolidation completes
  • If no candidates are found, skill reports "no candidates" with the search criteria used rather than silently completing

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in plugins/sanctum/skills/doc-consolidation of athola/claude-night-market.

  • SKILL.md
  • modules/candidate-detection.md
  • modules/content-analysis.md
  • modules/destination-routing.md
  • modules/merge-execution.md

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Doc Consolidation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Doc Consolidation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Doc Consolidation this skillathola/claude-night-market341—~2.3kAutomated safety check: PassMIT
Docs Diagramsvercel/next.js143k—~2.9kAutomated safety check: PassMIT
WooCommerce Markdown Guidelineswoocommerce/woocommerce11k1 repos~1.7kAutomated safety check: PassCustom licence
Update .NET Supported OS Matrixdotnet/core22k—~4.1kAutomated safety check: PassMIT
Fern Navigationai-dynamo/dynamo8.3k—~2.2kAutomated safety check: PassApache-2.0
README Badges and Headersjal-co/shieldcn919—~4.3kAutomated safety check: PassMIT

Similar skills

  • Docs Diagrams

    vercel/next.js

    Official

    Draw diagrams for the Next.js docs in the style of the ones already published there: the light/dark PNGs an mdx references with <Image srcLight="/docs/light/<name.png" srcDark="/docs/dark/<name.png".

    143k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Markdown Guidelines

    woocommerce/woocommerce

    Rules for writing and editing markdown in the WooCommerce repository, with the project's markdownlint settings for headings, lists and code blocks.

    11k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Official

    Audits and updates the supported-os.json files for .NET releases, checking them against upstream lifecycle data and regenerating the markdown with the release-notes tool.

    22k GitHub stars~4.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Fern Navigation

    ai-dynamo/dynamo

    Knowledge of Fern's site-level navigation and structure configuration — how a docs site is organized in docs.yml (and product/version .yml files) using sections, pages, folders, tabs, tab variants…

    8.3k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Adds shadcn/ui-styled README badges, badge groups, download charts, header banners and sponsor or contributor grids using the shieldcn service.

    919 GitHub stars~4.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Docs Conventions

    flet-dev/flet

    A skill your agent uses when writing or reviewing Flet documentation, including Python docstrings (Google style, reST roles, admonitions), Markdown docs (cross-references, images, code examples)…

    17k GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 152 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    341 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    341 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    341 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    341 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    341 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    341 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Doc Consolidation

What does Doc Consolidation do?

Merges ephemeral report and analysis artifacts into permanent documentation. Doc Consolidation is an agent skill from athola/claude-night-market. Merges ephemeral report and analysis artifacts into permanent documentation.

When should I use Doc Consolidation?

Doc Consolidation fits situations like: LLM-generated markdown files have accumulated and need consolidation; tasks that involve Markdown.

How do I install Doc Consolidation in Claude Code?

Run `npx skills add athola/claude-night-market --skill doc-consolidation -a claude-code`. Or copy the skill folder (plugins/sanctum/skills/doc-consolidation in athola/claude-night-market) into .claude/skills/doc-consolidation in your project. Claude Code loads it when a task matches its description.

How do I install Doc Consolidation in Codex?

Run `npx skills add athola/claude-night-market --skill doc-consolidation -a codex`. Or copy the skill folder (plugins/sanctum/skills/doc-consolidation in athola/claude-night-market) into .agents/skills/doc-consolidation in your project. Codex loads it when a task matches its description.

Can I use Doc Consolidation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill doc-consolidation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/doc-consolidation, .gemini/skills/doc-consolidation, .github/skills/doc-consolidation and .opencode/skills/doc-consolidation in your project.

What does Doc Consolidation need to run?

Going by SKILL.md and its folder, Doc Consolidation needs the command-line tools its instructions call (git). Our summary lists: Python 3.

Does Doc Consolidation access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Doc Consolidation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Doc Consolidation use?

Doc Consolidation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Doc Consolidation use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Doc Consolidation?

Skills that share tags, products or a category with Doc Consolidation: Docs Diagrams (vercel/next.js, 143k stars), WooCommerce Markdown Guidelines (woocommerce/woocommerce, 11k stars), Update .NET Supported OS Matrix (dotnet/core, 22k stars) and Fern Navigation (ai-dynamo/dynamo, 8.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Doc Consolidation?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 341 GitHub stars. The repository holds 152 skills in this directory. The repository was last updated on October 9, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.