Documentation Hygiene

This skill should be used when the user asks to perform "documentation hygiene", "update docs for change", "mark historical docs", "add deprecation headers", "documentation migration", or when making significant changes that affect multiple documentation files (like license migrations, tier changes, or API changes).

16 stars

Best use case

Documentation Hygiene is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when the user asks to perform "documentation hygiene", "update docs for change", "mark historical docs", "add deprecation headers", "documentation migration", or when making significant changes that affect multiple documentation files (like license migrations, tier changes, or API changes).

Teams using Documentation Hygiene should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/documentation-hygiene/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/documentation/documentation-hygiene/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/documentation-hygiene/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Documentation Hygiene Compares

Feature / AgentDocumentation HygieneStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when the user asks to perform "documentation hygiene", "update docs for change", "mark historical docs", "add deprecation headers", "documentation migration", or when making significant changes that affect multiple documentation files (like license migrations, tier changes, or API changes).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Documentation Hygiene Skill

Systematically update documentation when making significant changes to prevent AI agents and developers from referencing outdated information.

---

## Core Principle

**Never delete historical documentation.** Instead, mark it clearly as outdated while preserving valuable context. Future AI agents read CLAUDE.md first, so prominent warnings there prevent confusion.

---

## Workflow

### Step 1: Gather Change Information

Before starting, collect from the user:

1. **What changed?** (e.g., "License changed from Apache-2.0 to Elastic License 2.0")
2. **Search terms for OLD state** (e.g., "Apache-2.0", "three-tier", "unlimited free")
3. **Authoritative reference for NEW state** (e.g., "ADR-013, ADR-017")

Ask if unclear:
```
To perform documentation hygiene, I need:
1. A summary of the change being made
2. Keywords that identify the OLD/outdated state
3. The authoritative document(s) for the NEW state

What change are we documenting?
```

### Step 2: Search for Affected Documentation

Search the codebase for references to the OLD state:

```bash
# Search for old terms in markdown files
grep -r "OLD_TERM" docs/ --include="*.md"
grep -r "OLD_TERM" packages/*/README.md
grep -r "OLD_TERM" CLAUDE.md
```

### Step 3: Categorize Files

Present a categorized plan to the user:

| Category | Treatment | Examples |
|----------|-----------|----------|
| **CLAUDE.md** | Add prominent warning section at top | Project root CLAUDE.md |
| **ADRs** | Update to reflect current state, add revision history | docs/adr/*.md |
| **Package READMEs** | Update to reflect current state | packages/*/README.md |
| **Current Reference Docs** | Update to reflect current state | docs/architecture/*.md |
| **Historical/Retro Docs** | Add deprecation header with links | docs/retros/*.md, docs/strategy/*.md |
| **Legal Docs** | Flag for legal review | docs/legal/*.md |

### Step 4: Get User Approval

Present the plan:

```markdown
## Documentation Hygiene Plan

**Change:** [Summary of change]

### Files to Update (X files)

**CLAUDE.md** (1 file)
- [ ] Add warning section about change

**ADRs** (X files)
- [ ] docs/adr/XXX.md - Update for new state
- [ ] docs/adr/YYY.md - Create new ADR if needed

**Current Reference Docs** (X files)
- [ ] file1.md - Update license reference
- [ ] file2.md - Update tier information

**Historical Docs** (X files) - Add deprecation headers
- [ ] docs/retros/phase-X.md
- [ ] docs/strategy/analysis.md

**Legal Docs** (X files) - Flag for legal review
- [ ] docs/legal/TERMS.md

Shall I proceed with this plan?
```

### Step 5: Execute Updates

Apply updates in this order:

1. **CLAUDE.md first** - Most important for AI agents
2. **ADRs** - Authoritative technical decisions
3. **Package READMEs** - Public-facing documentation
4. **Current reference docs** - Architecture, publishing guides
5. **Historical docs** - Retros, strategy docs
6. **Legal docs** - Flag only, don't modify without legal approval

---

## Templates

### CLAUDE.md Warning Section

Add after the first major section (usually after project overview or critical notices):

```markdown
## [EMOJI] IMPORTANT: [Change Title] ([Date])

**As of [Date], [summary of change].**

> **CRITICAL FOR AI AGENTS**: Documentation written before [Date] may reference the old [X]. **IGNORE** any references to:
> - "[Old term 1]"
> - "[Old term 2]"
> - "[Old term 3]"

### Current State

[Brief description of current state with key facts]

| Key | Value |
|-----|-------|
| [Fact 1] | [Value 1] |
| [Fact 2] | [Value 2] |

**Authoritative References:**
- [ADR-XXX: Title](path/to/adr) - [Description]
- [ADR-YYY: Title](path/to/adr) - [Description]
```

### Deprecation Header for Historical Docs

```markdown
> [WARNING_EMOJI] **HISTORICAL DOCUMENT**
>
> This [document type] documents [Phase/Period] ([Date]). [What changed]:
> - [Change 1]
> - [Change 2]
>
> See [ADR-XXX](path/to/adr) and [ADR-YYY](path/to/adr) for current [topic].
```

### Legal Review Flag

```markdown
> [WARNING_EMOJI] **LEGAL REVIEW REQUIRED**
>
> **This document requires legal review to reflect the [Date] [change type].**
>
> **Changes needed:**
> - Section X.X: [Specific change needed]
> - Section Y.Y: [Specific change needed]
>
> **See:** [ADR-XXX](path/to/adr)
>
> **Tracking Issue:** [Issue ID] (to be created for legal review)
```

### ADR Revision History

Add after the Status/Date/Deciders header:

```markdown
## Revision History

| Version | Date | Changes |
|---------|------|---------|
| 1.0 | [Original Date] | Original [description] |
| 1.1 | [Update Date] | **[Summary of changes]** |
```

---

## Best Practices

### 1. CLAUDE.md is Priority One

AI agents read CLAUDE.md first. A prominent warning there prevents:
- Agents citing outdated license information
- Agents referencing old pricing/tier structures
- Agents using deprecated patterns

### 2. Never Delete Historical Docs

Historical documents provide valuable context:
- Why decisions were made
- What was tried before
- Evolution of the project

Instead of deletion, add clear deprecation headers.

### 3. ADRs Are the Source of Truth

Architecture Decision Records should always reflect the current state:
- Add revision history for significant changes
- Cross-reference related ADRs
- Create new ADRs for major architectural changes

### 4. Consistent Visual Indicators

Use consistent emoji and formatting:
- `> [WARNING_EMOJI]` for deprecation notices
- **Bold** for critical terms
- Tables for structured comparisons
- Links to authoritative sources

### 5. Category-Specific Treatment

| Doc Type | Action | Rationale |
|----------|--------|-----------|
| CLAUDE.md | Update immediately | AI agents read first |
| ADRs | Update with revision history | Authoritative reference |
| READMEs | Update | Public-facing, affects perception |
| Reference docs | Update | Current guidance |
| Retros/Strategy | Deprecation header | Historical context valuable |
| Legal | Flag for review | Requires legal expertise |

---

## Environment Variables

This skill does not require any environment variables.

---

## Example Usage

### License Migration

**User:** "We changed from Apache-2.0 to Elastic License 2.0. Run documentation hygiene."

**Agent workflow:**
1. Search for: `Apache-2.0`, `Apache License`, `open source`, `free tier unlimited`
2. Categorize ~20 files found
3. Present plan to user
4. Update CLAUDE.md with license warning
5. Update ADRs with revision history
6. Update package READMEs
7. Add deprecation headers to historical docs
8. Flag TERMS.md for legal review

### Tier Structure Change

**User:** "We added an Individual tier. Update docs."

**Agent workflow:**
1. Search for: `three-tier`, `Community/Team/Enterprise`, pricing references
2. Categorize affected files
3. Present plan to user
4. Update CLAUDE.md with new tier table
5. Update ADRs with new tier information
6. Add deprecation headers to old strategy docs

---

## Related Skills

- **governance** - For code review and standards compliance
- **issue-tracker** - For creating tracking issues for legal review (Linear, Jira, GitHub Issues, etc.)

Related Skills

reviewing-documentation

16
from diegosouzapw/awesome-omni-skill

Use when reviewing documentation quality, auditing README or CLAUDE.md files, or standardizing AI instruction files.

research-documentation

16
from diegosouzapw/awesome-omni-skill

Searches across your Notion workspace, synthesizes findings from multiple pages, and creates comprehensive research documentation saved as new Notion pages. Trigger on "노션 검색", "조사해줘", "리서치 정리". For meeting prep use meeting-intelligence; for saving knowledge use knowledge-capture; for spec breakdown use spec-to-implementation.

quality-documentation-manager

16
from diegosouzapw/awesome-omni-skill

Document control system management for medical device QMS. Covers document numbering, version control, change management, and 21 CFR Part 11 compliance. Use for document control procedures, change control workflow, document numbering, version management, electronic signature compliance, or regulatory documentation review.

documentation-templates

16
from diegosouzapw/awesome-omni-skill

Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.

documentation-structure-validator

16
from diegosouzapw/awesome-omni-skill

Validate documentation structure, check for missing sections, verify markdown syntax, ensure consistency with templates. Use when user mentions docs validation, structure check, README review, documentation quality, or wants to verify documentation completeness.

documentation-standards

16
from diegosouzapw/awesome-omni-skill

Clear technical documentation with JSDoc, READMEs, Mermaid diagrams, ISMS policy references, and comprehensive code examples

documentation-specialist

16
from diegosouzapw/awesome-omni-skill

文档专家。专注于技术文档编写、API 文档生成、README 优化和文档维护。提供清晰的文档结构、规范的格式和用户友好的内容。

documentation-research

16
from diegosouzapw/awesome-omni-skill

Enforces documentation research before implementation. Auto-loads when implementing features to ensure current best practices are followed. Researches official docs first.

documentation

16
from diegosouzapw/awesome-omni-skill

Technical writing, API docs, and documentation best practices

documentation-guidelines

16
from diegosouzapw/awesome-omni-skill

Write or update backend feature documentation that follows a repo's DOCUMENTATION_GUIDELINES.md (or equivalent) across any project. Use when asked to create/update module docs, API contracts, or backend documentation that must include architecture, endpoints, payloads, Mermaid diagrams, and seeding instructions.

documentation-generation-doc-generate

16
from diegosouzapw/awesome-omni-skill

You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI...

create-oo-component-documentation

16
from diegosouzapw/awesome-omni-skill

Create comprehensive, standardized documentation for object-oriented components following industry best practices and architectural documentation standards.