# Generate Complete Code Documentation

Codebases often lack current API references, README files, comments, and diagrams. This skill analyzes project structure and produces documentation assets for Claude, Codex, and Claude Code workflows.

## Install

```bash
npx skillstore add dnyoussef/when-documenting-code-use-doc-generator
```

## Metadata

- Status: approved
- Slug: dnyoussef-when-documenting-code-use-doc-generator
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 85717073093bd869c1e2c83f8988b0ae0af67b9fe73a56937521b7eb3707cdee
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/documentation/when-documenting-code-use-doc-generator
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem, env\_access
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/dnyoussef-when-documenting-code-use-doc-generator
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-when-documenting-code-use-doc-generator/manifest

## Capabilities

- Analyzes source structure to identify functions, classes, APIs, dependencies, and documentation gaps.
- Generates API documentation formats such as OpenAPI, JSDoc, TypeDoc, and Python docstrings.
- Creates README content with installation, usage, configuration, testing, and contribution sections.
- Adds inline documentation guidance for JavaScript, TypeScript, Python, Java, Go, Rust, and C\# styles.
- Produces architecture and process diagrams using Mermaid or Graphviz patterns.
- Provides slash-command scripts for API docs, README generation, and inline documentation reports.

## Use Cases

- Document a Backend API: Generate OpenAPI-style references, endpoint summaries, authentication notes, and usage examples for a service repository.
- Refresh Project Onboarding Docs: Create a README with setup, configuration, testing, contribution, and support sections from repository metadata.
- Improve Code Comment Coverage: Identify undocumented functions and create inline comment guidance for supported language styles.

## Prompt Templates

### Generate Basic Docs

```
Use this skill to review the current repository and generate basic README and API documentation. Keep the output concise and list files changed.
```

### Create API Reference

```
Use this skill to document the REST API in this project. Include endpoints, request formats, response summaries, authentication notes, and validation warnings.
```

### Add Inline Comments

```
Use this skill to find undocumented public functions in src. Add or propose JSDoc, TSDoc, or Python docstrings, and avoid changing business logic.
```

### Build Full Documentation Set

```
Use this skill to generate README, API reference, architecture notes, inline comment recommendations, and a documentation gap report. Run in dry-run mode when possible and flag risky writes before editing.
```

## Limitations

- Generated content should be reviewed before committing or publishing.
- Route detection is heuristic and may miss custom framework patterns.
- Shell scripts write documentation files in the current project and may overwrite expected outputs.
- Some workflow hooks depend on external claude-flow tooling.

## Best Practices

- Run the skill in a clean branch and review generated files before merging.
- Provide the target documentation type, preferred format, and coverage goal.
- Keep secrets out of examples and replace placeholders before publishing.

## Anti Patterns

- Do not run generation scripts against repositories with uncommitted critical changes.
- Do not publish generated API details before checking authentication and data exposure.
- Do not assume examples are production-ready without validation.

## Security Audit

- Audited at: 2026-07-05T12:46:51.459\+00:00
- Summary: Most static findings are false positives from Markdown examples, generated documentation placeholders, or sample configuration names. The executable slash-command scripts are real shell entry points, and the larger concern is their unpinned npx execution of claude-flow plus default writes to repository documentation files.

## Stats

- Views: 230
- Downloads: 9
- Favorites: 0
- Popularity score: 0
