# Document

> Use when the user wants to add documentation, JSDoc, docstrings, or API docs to existing code.

- **Type:** Skill
- **Install:** `agentstack add skill-huzaifa525-claude-code-optimizer-document`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [huzaifa525](https://agentstack.voostack.com/s/huzaifa525)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** https://github.com/huzaifa525/claude-code-optimizer/tree/master/templates/.claude/skills/document
- **Website:** https://www.npmjs.com/package/claude-code-optimizer

## Install

```sh
agentstack add skill-huzaifa525-claude-code-optimizer-document
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Document: **$ARGUMENTS**

## Steps

1. **Detect the language and doc style**
   - Check existing docs in the codebase for style
   - TypeScript/JavaScript → JSDoc or TSDoc
   - Python → Google-style docstrings
   - Go → godoc comments
   - Rust → `///` doc comments
   - Match whatever style already exists

2. **Read the code** thoroughly — understand every function, class, and type

3. **Add documentation for:**

   | Element | What to Document |
   |---------|-----------------|
   | Functions | Purpose, params, return value, throws, example |
   | Classes | Purpose, usage pattern |
   | Interfaces/Types | What it represents, field descriptions |
   | Constants | Why this value |
   | Complex logic | Step-by-step explanation |
   | Module/File | Top-level description of what this file does |

4. **Rules**
   - Document the WHY, not the WHAT (code already shows what)
   - Keep descriptions concise — one line if possible
   - Include `@example` for non-obvious usage
   - Don't document getters/setters or trivial functions
   - Match existing doc style in the codebase exactly

5. **Verify** — ensure no code was accidentally changed
   ```
   git diff --stat
   ```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** [huzaifa525/claude-code-optimizer](https://github.com/huzaifa525/claude-code-optimizer)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/claude-code-optimizer

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-huzaifa525-claude-code-optimizer-document
- Seller: https://agentstack.voostack.com/s/huzaifa525
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
