一键导入
doc-generate
Generate documentation from specs, code comments, and type definitions. Creates professional docs from SEA-Forge source.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate documentation from specs, code comments, and type definitions. Creates professional docs from SEA-Forge source.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends AI agent capabilities with specialized knowledge, workflows, or tool integrations.
Use when creating, scaffolding, or updating the repository AI harness in VS Code. Trigger on requests to bootstrap or refresh instructions, prompts, agents, hooks, skills, or memory layers while preserving useful existing structure and avoiding monolithic always-on context.
Canonical SEA-Forge release workflow for release preparation, validation, branch promotion, tagging, rollback, and release-gate evidence. Use when preparing a release, promoting dev to stage or stage to main, cutting a version tag, validating release readiness, handling hotfix forward-merges, planning rollback, or executing a full end-to-end release. Prefer existing just recipes and evidence-producing gates over ad hoc deployment steps.
Use when SEA work touches specs, generators, manifests, semantic fixtures, regeneration, `src/gen`, or behavior projected from ADR/PRD/SDS/SEA authority.
Use when a SEA context has valid specs and generated contracts but lacks handwritten logic, runtime wiring, persistence, integration, tests, or executable proof.
Create concise, copy-paste-ready bridge prompts between a repo-aware coding agent and an external strategic reasoning agent such as S1 ArchDevAgent. Use when the user wants to offload architecture, research, large refactor planning, migration design, plan critique, implementation-spec drafting, test-strategy design, whole-repo analysis, or diff review to an external agent while keeping repo inspection and implementation in the coding agent. Also use when the user says "use S1", "ask S1", "make a prompt for S1", "bridge this to my external agent", "prepare a context packet", or "validate this S1 response".
| name | doc-generate |
| description | Generate documentation from specs, code comments, and type definitions. Creates professional docs from SEA-Forge source. |
Use this skill when:
Generate documentation from SEA specs:
# Find spec files
find docs/specs -name "*.md" -type f
# Extract spec metadata
for spec in docs/specs/**/*.md; do
# Extract frontmatter
# Extract sections
# Generate documentation
done
Extract JSDoc/TSDoc comments:
/**
* User entity in the SEA-Forge system.
*
* @remarks
* Users are the core entity representing human participants
* in the organization compilation process.
*
* @example
* ```typescript
* const user = new User({
* id: "123",
* name: "John Doe",
* email: "john@example.com"
* });
* ```
*/
export class User {
// ...
}
Generate documentation from TypeScript types:
/**
* User preferences configuration
*/
export interface UserPreferences {
/** User's theme preference */
theme: 'light' | 'dark' | 'auto';
/** Notification settings */
notifications: {
/** Email notifications enabled */
email: boolean;
/** Push notifications enabled */
push: boolean;
};
/** Display density */
density: 'compact' | 'comfortable' | 'spacious';
}
# API Reference: {module}
## Overview
{description from module comments}
## Classes
### {ClassName}
{description from class comments}
#### Constructor
```typescript
constructor(options: {Options})
{description}
{methodSignature}
{description}
Parameters:
{param}: {description}Returns: {return type and description}
Throws: {exceptions}
Example:
{example code}
{description}
{property}: {type} - {description}{description}
### Spec Documentation Template
```markdown
# {Spec Title}
**Version:** {version}
**Status:** {status}
**Author:** {author}
## Overview
{from Context section}
## Requirements
{from Requirements section}
### Functional Requirements
{list of functional requirements}
### Non-Functional Requirements
{list of non-functional requirements}
## Design
{from Design section}
### Architecture
{architecture overview}
### API Surface
{API contracts}
### Data Model
{data structures}
## Implementation Notes
{from Implementation section}
## Related Specs
- [Related Spec 1](path/to/spec1.md)
- [Related Spec 2](path/to/spec2.md)
# Use TypeDoc to extract JSDoc
npx typedoc --out tmp/typedoc src/
# Extract from specs
python3 tools/extract_specs.py docs/specs/ > tmp/specs.json
# Extract types
npx ts-json-schema-generator --path src/types/ --out tmp/types.json
Convert extracted data to markdown documentation:
// tools/doc_generator.ts
import { extractJSDoc } from './extractors/jsdoc';
import { extractSpecs } from './extractors/specs';
import { renderMarkdown } from './renderers/markdown';
const docs = {
api: extractJSDoc('src/'),
specs: extractSpecs('docs/specs/'),
types: extractTypes('src/types/')
};
const markdown = renderMarkdown(docs);
await writeFile('docs/reference/api.md', markdown.api);
await writeFile('docs/reference/specs.md', markdown.specs);
Check generated documentation:
# Check all links resolve
npx markdown-link-check docs/reference/api.md
# Check markdown formatting
npx prettier --check docs/reference/**/*.md
# Build docs site (if using Docusaurus, etc.)
npm run docs:build
Generated from code comments and type definitions.
Generated from specs and design documents.
Generated from usage examples and comments.
Generated from development patterns and workflows.
docs/
├── reference/
│ ├── api.md # API reference
│ ├── types.md # Type definitions
│ ├── specs.md # Spec documentation
│ └── architecture.md # Architecture docs
├── guides/
│ ├── getting-started.md
│ └── tutorials/
└── site/ # Generated doc site
Create custom templates in .claude/templates/docs/:
<!-- .claude/templates/docs/api-page.hbs -->
# {{class.name}}
{{class.description}}
## Constructor
```typescript
constructor({{class.constructorParams}})
{{#each class.methods}}
{{this.signature}}
{{this.description}}
{{#if this.deprecated}}
⚠️ Deprecated: {{this.deprecationMessage}} {{/if}}
{{/each}}
## Generation Commands
```bash
# Generate all documentation
just docs
# Generate API reference only
just docs:api
# Generate spec documentation
just docs:specs
# Generate and serve docs locally
just docs:serve
# Validate documentation
just docs:check
docx skill for Word docscustom-doc-templates for custom formatsClaude invokes when:
After generation, output:
## Documentation Generated
**Output:** {path/to/docs}
**Files generated:** {count}
**APIs documented:** {count}
**Specs documented:** {count}
### Generated Files
- {file1}
- {file2}
- {file3}
### Validation
- Links: ✅/❌
- Formatting: ✅/❌
- Completeness: ✅/❌
### Next Steps
1. Review generated documentation
2. Add custom content if needed
3. Commit documentation changes