# Doc

> 当用户想加文档注释、写 docstring、给代码加说明时使用 — 自动生成文档注释，风格与项目一致

- **Type:** Skill
- **Install:** `agentstack add skill-lightpointventures-claude-code-starter-doc`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [lightpointventures](https://agentstack.voostack.com/s/lightpointventures)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [lightpointventures](https://github.com/lightpointventures)
- **Source:** https://github.com/lightpointventures/claude-code-starter/tree/main/skills/doc
- **Website:** https://github.com/lighthouse-strategy/claude-code-starter

## Install

```sh
agentstack add skill-lightpointventures-claude-code-starter-doc
```

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

## About

# 生成文档

为代码自动添加文档注释，省去手写文档的麻烦。

## 步骤

### 1. 确定文档目标

如果用户指定了文件或函数，直接读取。

如果没有指定，问：
> 你想给哪段代码加文档？可以告诉我文件名、函数名或类名。

### 2. 检查项目的文档风格

查看项目中已有的文档注释，了解：
- 使用的文档格式（Python: Google style / NumPy style / reStructuredText，JS/TS: JSDoc，Go: godoc）
- 文档语言（中文还是英文）
- 详细程度

如果项目没有已有文档，根据语言社区惯例选择最常用的格式。

### 3. 生成文档

为目标代码生成文档注释，包括：

- **简要描述** — 一句话说明这个函数/类做什么
- **参数说明** — 每个参数的名称、类型、含义
- **返回值** — 返回什么、什么类型
- **异常/错误** — 可能抛出什么异常（如果有）
- **使用示例** — 一个最简单的调用示例（仅对复杂函数添加）

规则：
- 文档要准确反映代码实际行为，不要写代码没做的事情
- 保持简洁，不要把显而易见的事情写进文档
- 与项目已有的文档风格保持一致

### 4. 写入

展示生成的文档，询问用户：
> 文档生成好了，要我写入文件吗？

用户确认后写入。

## Source & license

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

- **Author:** [lightpointventures](https://github.com/lightpointventures)
- **Source:** [lightpointventures/claude-code-starter](https://github.com/lightpointventures/claude-code-starter)
- **License:** MIT
- **Homepage:** https://github.com/lighthouse-strategy/claude-code-starter

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-lightpointventures-claude-code-starter-doc
- Seller: https://agentstack.voostack.com/s/lightpointventures
- 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%.
