architect
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.
$ npx -y skills add SethGammon/Citadel --skill doc-gen --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/doc-genContext preview
The summary Claude sees to decide when to auto-load this skill.
Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.
name: doc-gen license: MIT description: >- Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says. user-invocable: true auto-trigger: false trigger_keywords: - document - docs - docstring - jsdoc - readme - api docs last-updated: 2026-03-20
Mode auto-detected from target:
| Command | Behavior | |---|---| | `/doc-gen [file]` | Function-level docs for a file | | `/doc-gen [directory]` | Module-level README for a directory | | `/doc-gen --api [target]` | API reference for endpoints or exports | | `/doc-gen --mode [mode] [target]` | Force a specific mode | | `/doc-gen --dry-run [target]` | Show what would be documented without writing |
1. Read CLAUDE.md for doc conventions 2. Search for existing doc comments in the target area — note density, tone, tags used, and line length 3. Default when no existing docs: JSDoc (`@param`, `@returns`, `@throws`, `@example`) for TS/JS; Google-style for Python; idiomatic format for others
Apply detected style consistently across all generated docs.
For each function:
1. Read the full body, not just the signature 2. Classify:
3. Write using detected style
**Core rule:** every doc must add information beyond what the signature already says. If you cannot, skip it.
1. Read all files in the directory (one level deep) 2. Identify: problem space, key exports, internal files, external dependencies, and what imports this module 3. README schema: `# {Module Name}` | one-paragraph description | `## Key Exports` table (name, description) | `## Architecture` (only if non-obvious internal structure) | `## Usage` (real import paths) | `## Dependencies` (non-obvious only) 4. If a README already exists, update rather than replace — preserve sections not covered by your analysis
For HTTP endpoints: method + path, description, path/query/body params (with types), response shape and status codes, errors, auth level, and a curl/fetch example for non-trivial endpoints.
For exported libraries: name and kind (function/class/constant/type), description, parameters/properties with semantics, return type with guarantees, import and usage example.
Structure as a single reference document with a table of contents.
1. Apply detected style consistently 2. Function-level: insert doc comments above each function 3. Module-level: write or update README.md in the target directory 4. API reference: write to `docs/api/` or adjacent to route files 5. Run typecheck after writing (malformed JSDoc can cause TS errors)
Re-read every doc comment. For each: "Does this add information beyond the signature?" If not, delete it. Check accuracy: parameter names, return types, side effects, and that examples would actually compile/run.
**Disclosure:** "Generating documentation for [target]. Source files will be modified." **Reversibility:** amber — adds JSDoc/docstrings to source files; undo with `git checkout` on modified files. **Trust gates:**
=== Doc-Gen Report ===
Mode: {function-level | module-level | api-reference}
Target: {path}
Style: {detected style}
Documented: {N functions ({M} skipped as trivial) | README.md ({N} exports) | {N} endpoints}
Skipped: {item}: {reason}---HANDOFF---
- Generated {mode} docs for {target}
- Matched existing {style} convention
- {what was skipped and why}
- Reversibility: amber — undo with `git checkout` on modified source files
---An open-source operating layer for Claude Code and OpenAI Codex. Citadel routes requests, preserves repository state between sessions, coordinates parallel work, applies repository safeguards, and records evidence and handoffs around the coding agent you
Repo: SethGammon/Citadel
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Autonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across…
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed…
Intake-to-delivery pipeline. Processes pending items from .planning/intake/: briefs new ideas, executes approved work through research → plan → build → verify.…
Deep cost exploration and transparency. Shows real token usage, session costs, campaign spend, burn rates, and model breakdown. Reads Claude Code's native…
End-to-end app creation from a single description. Five tiers: blank project, guided, templated, fully generated, or feature addition to existing codebase.…