
doc-consolidation
Merges ephemeral report and analysis artifacts into permanent documentation. Use when LLM-generated markdown files have accumulated and need consolidation.
- Installs
- 115
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/athola/claude-night-market --skill doc-consolidation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads doc-consolidation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.mdor*_ANALYSIS.mdfiles 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:
- Detect candidates - Find untracked markdown files with LLM output markers
- Analyze content - Extract and categorize valuable sections
- Route destinations - Match content to existing docs or propose new files
- 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:
- Merge content - Weave into existing docs or create new files
- Delete sources - Remove ephemeral files after successful merge
- 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
.mdfiles) - 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
expertcontent: route them todocs/deep-dive/<topic>.md, an ADR, or a benchmarks page, then link from thenewcomerdocument rather than weaving into it. Tier table and cut test:scribe:slop-detectormoduleaudience-targeting.md. When the destination's own tier is unclear, ask, do not guess.
Step 4: Generate Plan
Present consolidation plan to user:
# 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:
# 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.
Content Categories
| Category | Description | Default Destination |
|---|---|---|
| Actionable Items | Tasks, TODOs, next steps | docs/plans/YYYY-MM-DD-{topic}.md |
| Decisions Made | Architecture choices | docs/adr/NNNN-{date}-{topic}.md |
| Findings/Insights | Audit results, analysis | Best-match existing doc of the same tier, else docs/deep-dive/ |
| Metrics/Baselines | Before/after comparisons | docs/benchmarks/ |
| Migration Guides | Step-by-step procedures | docs/migration-guide.md |
| API Changes | Breaking changes, deprecations | CHANGELOG 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
Related Skills
sanctum:doc-updates- General documentation updatessanctum:git-workspace-review- Pre-flight workspace analysissanctum:pr-prep- Pull request preparationimbue: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 statusshows 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
FAQ
What does the doc-consolidation skill do?
Merges ephemeral report and analysis artifacts into permanent documentation. Use when LLM-generated markdown files have accumulated and need consolidation.
How do I install doc-consolidation?
Run npx skills add https://github.com/athola/claude-night-market --skill doc-consolidation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/doc-consolidation/ (personal) or .claude/skills/doc-consolidation/ (project).
Which AI agents can use doc-consolidation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is doc-consolidation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains doc-consolidation?
It is published by athola in athola/claude-night-market. It has 115 recorded installs.
More from athola/claude-night-market
project-planning
athola/claude-night-market
Converts a specification into a phased, dependency-ordered implementation plan. Use after specification is complete and before execution begins.
code-quality-principles
athola/claude-night-market
Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity. Use when refactoring or reviewing code for over-engineering.
slop-detector
athola/claude-night-market
Detects AI-generated writing patterns in prose. Use when reviewing docs for slop, vague language, or identity leaks before publishing.
bloat-detector
athola/claude-night-market
Detects codebase bloat via dead code, duplication, complexity, and doc bloat scans. Use when codebase feels large or before a release.
doc-generator
athola/claude-night-market
Generates or remediates documentation with human-quality writing. Use when creating new docs, rewriting AI-generated content, or applying style profiles.
project-brainstorming
athola/claude-night-market
Guides project ideation via Socratic questioning to produce a validated brief. Use before specification when requirements are unclear.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
slideshow
heygen-com/hyperframes
Build a HyperFrames slideshow to present live - slides, fragment reveals, branching hotspots and presenter mode with speaker notes, served by hyperframes present - or turn an existing page into one. Use when the person wants a deck or presentation rather than a rendered video.