skills-catalog/ln-160-docs-skill-extractor/SKILL.md
Extracts procedural content from project docs into slash commands. Use when docs contain deploy, test, or troubleshoot procedures.
npx skillsauth add levnikolaevich/claude-code-skills ln-160-docs-skill-extractorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L2 Coordinator Category: 1XX Documentation Pipeline Workers: ln-161-skill-creator, ln-162-skill-reviewer
Scans project documentation, identifies procedural content, and extracts it into executable slash command files under .claude/commands/*.md. Declarative documentation stays in markdown; this skill only routes procedural sections into command form.
| Aspect | Details |
|--------|---------|
| Input | Project docs, test docs, and optional doc registry |
| Output | .claude/commands/*.md files in target project |
| Workers | ln-161 creates commands, ln-162 reviews them |
| Source policy | Docs-first extraction; AGENTS.md and CLAUDE.md are routing-only |
Phase 1: Discovery (route docs, build inventory)
|
Phase 2: Classification (procedural vs declarative scoring)
|
Phase 3: Extraction Plan (user approval)
|
Phase 4: Delegate -> ln-161 (create commands)
|
Phase 5: Delegate -> ln-162 (review commands)
|
Phase 6: Report (aggregate results)
MANDATORY READ: Load shared/references/procedural_extraction_rules.md, shared/references/markdown_read_protocol.md, and shared/references/docs_quality_contract.md
Build a docs-first inventory before extracting anything.
Use these files only to route discovery and prioritize reading:
AGENTS.mdCLAUDE.mddocs/project/.context/doc_registry.json if presentDo not extract commands from routing sources.
Scan only these sources for procedural content:
docs/**/*.mdtests/README.mdtests/manual/**/*README.mdCONTRIBUTING.mdAlso scan:
.claude/commands/*.md to avoid duplicate command creationdocs/project/.context/doc_registry.json exists, prioritize:
DOC_KIND=how-to before referencereference before index and explanationQuick NavigationAgent EntryMaintenanceSCOPE, DOC_KIND, DOC_ROLE, READ_WHEN, SKIP_WHEN, PRIMARY_SOURCEScontextStorecontextStore:
project_root: {CWD}
routing_sources:
agents_md: true
claude_md: true
doc_registry: true
existing_commands: [list of .claude/commands/*.md filenames]
doc_inventory:
- file: docs/project/runbook.md
doc_kind: how-to
doc_role: canonical
sections:
- header: "Deployment"
line_range: [45, 92]
signals: { code_blocks: 3, numbered_steps: 5, imperative_verbs: 8 }
Score each candidate section with the shared procedural extraction rules.
| Classification | Condition | Action |
|---------------|-----------|--------|
| PROCEDURAL | proc >= 4 and proc > decl * 2 | Extract to command |
| DECLARATIVE | decl >= 4 and decl > proc * 2 | Keep as documentation |
| MIXED | Both >= 3 | Extract procedural subsection only |
| THIN | Both < 3 | Skip |
Filter:
.claude/commands/*.mdDOC_KIND=how-to when multiple sections overlap semanticallyPresent the classified result set to the user before creating files.
Found {N} procedural sections in {M} files:
| # | Source | DOC_KIND | Section | Score | Proposed Command |
|---|--------|----------|---------|-------|------------------|
| 1 | runbook.md | how-to | Deployment | P:8/D:1 | deploy.md |
| 2 | tests/README.md | index | Running Tests | P:7/D:2 | run-tests.md |
Existing .claude/commands/ (will skip): refresh_context.md, build-and-test.md
Include? (e.g., "1,2" or "all" or "all skip 2")
If the user approves nothing, stop with No skills to create.
Pass only approved sections to ln-161-skill-creator.
Agent(
description: "Create commands from procedural docs",
prompt: "Execute skill creator.\nStep 1: Invoke:\n Skill(skill: \"ln-161-skill-creator\")\nCONTEXT:\n{approved_sections}",
subagent_type: "general-purpose"
)
Normalized payload:
{
"approved_sections": [
{
"source_file": "docs/project/runbook.md",
"section_header": "Deployment",
"line_range": [45, 92],
"command_name": "deploy.md",
"doc_kind": "how-to",
"doc_role": "canonical"
}
]
}
Collect:
Pass created command paths to ln-162-skill-reviewer in COMMAND mode.
Agent(
description: "Review created commands",
prompt: "Execute skill reviewer in COMMAND mode.\nStep 1: Invoke:\n Skill(skill: \"ln-162-skill-reviewer\", args: \"commands\")\nFILES: {list of created paths}",
subagent_type: "general-purpose"
)
Collect:
Aggregate the create and review results.
## Docs Skill Extractor -- Complete
| Metric | Count |
|--------|-------|
| Documents scanned | {N} |
| Sections analyzed | {N} |
| Procedural found | {N} |
| Commands created | {N} |
| Commands skipped (existing) | {N} |
| Review PASS | {N} |
| Review FIXED | {N} |
| Review WARN | {N} |
Created commands:
- .claude/commands/deploy.md (from runbook.md#Deployment)
- .claude/commands/run-tests.md (from tests/README.md#Running Tests)
AGENTS.md and CLAUDE.md route discovery but never become command sources..claude/commands/*.md.TodoWrite format (mandatory):
- Build docs inventory (in_progress)
- Invoke ln-161-skill-creator (pending)
- Invoke ln-162-skill-reviewer (pending)
- Aggregate report (pending)
| Phase | Worker | Context | |-------|--------|---------| | 4 | ln-161-skill-creator | Approved procedural sections with source metadata | | 5 | ln-162-skill-reviewer | Created command file paths in COMMAND mode |
All workers: Invoke via Skill tool. Workers consume only the context they need.
AGENTS.md, CLAUDE.md, doc registry if present)MANDATORY READ: Load shared/references/meta_analysis_protocol.md
Skill type: planning-coordinator. Run after Phase 6 completes. Output to chat using the planning-coordinator format.
Version: 1.0.0 Last Updated: 2026-03-26
testing
Audits architecture config boundaries: typed settings, scattered env reads, config leakage, and layer ownership. Use for config architecture.
tools
Finds architecture-level modernization opportunities: obsolete custom mechanisms, overbuilt extension points, and simplifiable architecture. Use when auditing architecture evolution.
development
Builds dependency topology, detects cycles, validates import rules, and calculates coupling metrics. Use when auditing architecture topology.
testing
Checks layer, resource ownership, and orchestration boundaries. Use when auditing architecture boundary enforcement.