Dethon

document-creator

0
0
# Install this skill:
npx skills add Dethon/ai-dev-flow --skill "document-creator"

Install specific skill from multi-skill repository

# Description

Generate DEVGUIDE.md architectural documentation using LSP (project)

# SKILL.md


name: document-creator
allowed-tools: Task, Glob, Read
argument-hint: " [dir2] ... [dirN]"
description: Generate DEVGUIDE.md architectural documentation using LSP (project)
context: fork
model: opus


Document Creator

Generate hierarchical architectural documentation (DEVGUIDE.md) using Claude Code's built-in LSP tools. Supports multiple directories with parallel agent execution.

Built-in LSP Operations

  • documentSymbol — Extract symbols from files
  • findReferences — Map dependencies
  • goToDefinition — Detailed symbol analysis

Arguments

Directory paths to document (one agent per directory):
- Single directory: /document-creator src/services/
- Multiple directories: /document-creator src/services src/components src/lib
- No argument: analyzes current directory (.)

Instructions

Step 1: Parse Input

The user invoked this skill with arguments: $ARGUMENTS

Extract directory list:
- Split arguments by spaces
- If empty → use current directory (.)
- Validate each path exists as a directory

Step 2: Check for Rules

Check if .claude/rules directory exists at project root:

Use Glob(".claude/rules/*.md") to find rules files.

If rules exist:
- Read each rules file to understand frontmatter paths
- Pass relevant rules info to agents

If no rules exist:
- Note this for agents to create rules files when missing

Step 3: Determine Output Paths

For each directory:
- If no DEVGUIDE.md exists → <target-dir>/DEVGUIDE.md
- If exists → <target-dir>/DEVGUIDE_2.md (increment until unused)

Step 4: Launch Agents

For EACH directory, launch background agent:

Generate DEVGUIDE: <directory-path>
Output: <determined path>
Rules: <exists/not found>

REQUIRED Task tool parameters:

subagent_type: "essentials:document-creator-default"
run_in_background: true
prompt: "Generate DEVGUIDE: <dir>\nOutput: <path>\nRules: <status>"

Launch ALL agents in a single message for parallel execution. Output a status message like "Generating N DEVGUIDE files..." and end your turn. The system wakes you when agents finish.

Step 5: Report Results

## DEVGUIDE Documentation Created (LSP)

| Directory | Output | Status |
|-----------|--------|--------|
| [dir1] | [output path] | CREATED |
| [dir2] | [output path] | CREATED |

Rules Status: [Found N rules / No rules folder found]

Next Steps:
1. Review generated documentation
2. Commit the DEVGUIDE files
3. [If no rules] Agent created .claude/rules/ file automatically

Error Handling

Scenario Action
Path not found Report error, continue with other paths
Path is file not directory Report error, continue with other paths
Empty directory Generate minimal guide
Agent fails Report error, suggest retry

Example Usage

/document-creator
/document-creator src/services/
/document-creator src/services src/components src/lib
/document-creator backend/src frontend/src

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.