common-doc-generator
Generates documentation templates based on source code or skill files.
Install
mkdir -p .claude/skills/common-doc-generator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14946" && unzip -o skill.zip -d .claude/skills/common-doc-generator && rm skill.zipInstalls to .claude/skills/common-doc-generator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Generate a structured 7-section common doc for any subsystem or .github/ component by tracing source code or skill files. Fills Purpose, Source of Truth, Request/Data Flow, Key Constraints, Verification, Common Failure Modes, and Related Files. Marks [NEEDS CONTENT] where evidence is insufficient. Chat output only — does not write files.Key capabilities
- →Generate a structured 7-section common doc for subsystems
- →Trace source code or skill files to gather evidence
- →Fill sections like Purpose, Source of Truth, and Data Flow
- →Mark sections with `[NEEDS CONTENT]` when evidence is insufficient
- →Cross-reference architecture claims against `.runtime-fidelity.json` or `.scan-report.md`
- →Output the completed doc as a markdown code block
How it works
The skill traces source code or skill files to gather evidence and populate a 7-section common document template, marking gaps where evidence is insufficient.
Inputs & outputs
When to use common-doc-generator
- →Document a subsystem
- →Create tech documentation
- →Understand component structure
About this skill
Common Doc Generator
When to Use
Use this skill when:
repo-memory-promoterflags a subsystem as "Target layer: common doc"- A new team member needs to understand a subsystem quickly
- An agent keeps making mistakes about how a subsystem works
- You want a doc template pre-filled with real code evidence before human editing
Do NOT use when:
- You want to find what needs documenting (use
repo-memory-promoterfirst) - The subsystem already has a good doc with all 7 sections
- You need architecture diagrams (use
generate-sequence-diagraminstead)
Workflow
Step 1 — Receive input
Ask: "What subsystem or component do you want to document?" (if not provided).
Accept: free-text name, a directory path, a skill name, or an agent name.
Step 2 — Detect mode
Kit-mode (.github/ component): input matches a known skill name, agent name, or mentions .github/. Trace SKILL.md, .agent.md, or related instruction files.
Code-mode (source subsystem): input matches a directory name, package, or domain concept. Trace source directories and entry points.
If ambiguous, ask one clarifying question:
"Is this a
.github/skill/agent, or a source code subsystem like a service or module?"
Step 3a — Trace (Kit-mode)
- Find the matching SKILL.md or
.agent.mdunder.github/ - Extract from frontmatter:
name,description - Extract from body: when-to-use, workflow steps, output format, limitations
- Find any related
.instructions.mdwithapplyTomatching the component - Find any existing doc in
docs/for this component
Purpose ← from description + first paragraph of SKILL.md body
Source of Truth ← the SKILL.md or agent file path
Data Flow ← numbered workflow steps from skill
Constraints ← when-to-use (Do) + "Do NOT" section (Don't)
Verification ← any "verify" or "test" section in the skill
Failure Modes ← any warnings, limitations, or "if not found" branches in workflow
Related Files ← instruction files with matching applyTo, cross-referenced skills
Step 3b — Trace (Code-mode)
- Find directories/files matching the input name (fuzzy: split words, try subdirectories)
- Identify entry points: controllers, handlers, facades,
index.*,__init__.*, public interfaces - Trace 2-3 levels deep from entry points: collect services called, data stores accessed, external calls made
- Read any existing README or doc comments in the entry files
- Find test files for the subsystem (pattern:
*Test*,*Spec*,test_*.py)
Purpose ← package-level Javadoc / docstring / README first paragraph
Source of Truth ← entry point file(s) + key service class(es)
Data Flow ← method call chain from entry point, numbered steps
Constraints ← validation logic, guard clauses, annotations (@NotNull, @Valid, etc.)
Verification ← test file paths + any @Test method names that describe happy path
Failure Modes ← catch blocks, error returns, validation failure branches
Related Files ← all files touched in trace + config/migration files
Step 4 — Fill template
Fill this template with evidence gathered. For each section, use real file/line references where possible.
# <Subsystem Name>
## Purpose
<1-2 sentences: what this does and why it exists.>
## Source of Truth
- `<path>` — <what this file owns>
- `<path>` — <what this file owns>
## Request / Data Flow
1. <step — include caller and callee>
2. <step>
3. <step>
## Key Constraints
**Do:**
- <rule derived from code or skill>
**Don't:**
- <anti-pattern found in code or explicit warning>
## Verification
- <command to run tests or check behaviour>
- <manual check: what to observe>
## Common Failure Modes
- **<symptom>** → <diagnosis and fix>
## Related Files
- `<path>` — <purpose>
Step 5 — Mark gaps and enforce evidence contract
For any section where evidence is insufficient after tracing, insert:
[NEEDS CONTENT: <specific instruction for what to add, e.g. "Add the test command for this module">]
Aim for at most 2-3 [NEEDS CONTENT] markers. If more than 4 sections need markers, note at the top:
> ⚠️ Low evidence: most sections need manual completion. Consider reading the source more deeply before generating.
Evidence Contract
Every generated doc must satisfy these rules:
- Source of Truth required: the
Source of Truthsection must list at least one specific file path. Never leave it as a generic placeholder. - Traceable claims: every assertion about behavior, architecture, or business rules must link back to a file/line discovered during tracing. If no evidence supports a claim, use
[NEEDS CONTENT]instead. - No unsupported certainty: do not write "this module handles X" unless the trace found code or tests that confirm it. Prefer "appears to handle X based on [file]" when evidence is indirect.
- Scan-anchored architecture: if
.github/.runtime-fidelity.jsonor.github/.scan-report.mdexists, cross-reference architecture claims against them. Flag contradictions as warnings in the doc.
Step 6 — Output doc
Output the completed doc as a markdown code block (so user can copy easily).
Step 7 — Add save hint
After the doc, append:
> 💡 Suggested save path: `docs/<subsystem-slug>.md`
> To save: create the file at that path and paste the content above.
7-Section Template Reference
| Section | Source in Kit-mode | Source in Code-mode |
|---|---|---|
| Purpose | Frontmatter description | Package docstring / README |
| Source of Truth | SKILL.md / agent file path | Entry point + key service |
| Request / Data Flow | Workflow steps | Method call chain |
| Key Constraints | Do / Don't sections | Validations + guard clauses |
| Verification | Verify section | Test file paths |
| Common Failure Modes | Limitations / warnings | Catch blocks / error returns |
| Related Files | Cross-ref skills + instructions | All traced files |
Limitations
- Code-mode tracing is limited to statically readable call chains — dynamic dispatch and reflection cannot be traced
- Kit-mode cannot capture runtime agent behavior (only the static SKILL.md instructions)
- Generated doc is a starting point — always review before sharing with team
When not to use it
- →When finding what needs documenting
- →When the subsystem already has a good doc with all 7 sections
- →When needing architecture diagrams
Limitations
- →Code-mode tracing is limited to statically readable call chains
- →Kit-mode cannot capture runtime agent behavior
- →Generated doc is a starting point and requires review
How it compares
This skill automatically generates a structured documentation template pre-filled with code evidence, unlike manually creating documentation from scratch.
Compared to similar skills
common-doc-generator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| common-doc-generator (this skill) | 0 | 3mo | Review | Intermediate |
| korean-skill-creator | 8 | 9mo | Review | Beginner |
| skill-forge | 11 | 9mo | Review | Intermediate |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by vndkubi
View all by vndkubi →You might also like
korean-skill-creator
clwmfksek
한글 기반 클로드 스킬 자동 생성 도구. 사용자가 "클로드 스킬을 만들어줘" 또는 "[요구사항] 스킬 만들어줘"라고 요청할 때 사용. Progressive disclosure 원칙을 따르는 한글 문서 구조(SKILL.md + references/)를 자동으로 생성하고, 실전 예시를 포함한 일관성 있는 스킬 템플릿을 제공.
skill-forge
WilliamSaysX
Automated skill creation workshop with intelligent source detection, smart path management, and end-to-end workflow automation. This skill should be used when users want to create a new skill or convert external resources (GitHub repositories, online documentation, or local directories) into a skill. Automatically fetches, organizes, and packages skills with proactive cleanup management.
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
build-free-types
paulirish
This skill should be used when the user asks to "set up types without a build step", "use vanilla JS with types", "configure erasable syntax", or mentions "JSDoc type checking". It provides instructions for modern type safety using JSDoc in browsers and native TypeScript execution in Node.js.
vscode-ext-commands
github
Guidelines for contributing commands in VS Code extensions. Indicates naming convention, visibility, localization and other relevant attributes, following VS Code extension development guidelines, libraries and good practices
project-bootstrapper
mhattingpete
Sets up new projects or improves existing projects with development best practices, tooling, documentation, and workflow automation. Use when user wants to start a new project, improve project structure, add development tooling, or establish professional workflows.