Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

doc文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

11,256

周安装

469

GitHub Stars

318

下载量

3,752
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc(文档)
来源仓库:https://github.com/boshu2/agentops
仓库路径:skills/doc
安装命令:
npx skills add https://github.com/boshu2/agentops --skill doc
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/boshu2/agentops --skill doc

简介

doc 技能自动生成与验证项目文档,支持 API 说明、README 与运维手册编写。

  • 根据项目类型(编码/信息/运维)选择模板,提取公共函数与接口定义。
  • 保留已有事实与路径,不虚构命令或配置;对外文案需克制语气。
  • 建议结合版本控制与链接检查,确保文档与代码同步更新。
  • doc 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Doc Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Generate and validate documentation for any project.

Execution Steps

Given /doc [command] [target]:

Step 1: Detect Project Type

# Check for indicators
ls package.json pyproject.toml go.mod Cargo.toml 2>/dev/null

# Check for existing docs
ls -d docs/ doc/ documentation/ 2>/dev/null

Classify as:

  • CODING: Has source code, needs API docs
  • INFORMATIONAL: Primarily documentation (wiki, knowledge base)
  • OPS: Infrastructure, deployment, runbooks

Step 2: Execute Command

discover - Find undocumented features:

# Find public functions without docstrings (Python)
grep -r "^def " --include="*.py" | grep -v '"""' | head -20

# Find exported functions without comments (Go)
grep -r "^func [A-Z]" --include="*.go" | head -20

coverage - Check documentation coverage:

# Count documented vs undocumented
TOTAL=$(grep -r "^def \|^func \|^class " --include="*.py" --include="*.go" | wc -l)
DOCUMENTED=$(grep -r '"""' --include="*.py" | wc -l)
echo "Coverage: $DOCUMENTED / $TOTAL"

gen [feature] - Generate documentation:

  1. Read the code for the feature
  2. Understand what it does
  3. Generate appropriate documentation
  4. Write to docs/ directory

all - Update all documentation:

  1. Run discover to find gaps
  2. Generate docs for each undocumented feature
  3. Validate existing docs are current

Step 3: Generate Documentation

When generating docs, include:

For Functions/Methods:

## function_name

**Purpose:** What it does

**Parameters:**
- `param1` (type): Description
- `param2` (type): Description

**Returns:** What it returns

**Example:**

result = function_name(arg1, arg2)


**Notes:** Any important caveats

For Classes:

## ClassName

**Purpose:** What this class represents

**Attributes:**
- `attr1`: Description
- `attr2`: Description

**Methods:**
- `method1()`: What it does
- `method2()`: What it does

**Usage:**

obj = ClassName() obj.method1()

Step 4: Create Code-Map (if requested)

Write to: docs/code-map/

# Code Map: <Project>

## Overview
<High-level architecture>

## Directory Structure

src/ ├── module1/ # Purpose ├── module2/ # Purpose └── utils/ # Shared utilities

## Key Components

### Module 1
- **Purpose:** What it does
- **Entry point:** `main.py`
- **Key files:** `handler.py`, `models.py`

### Module 2
...

## Data Flow
<How data moves through the system>

## Dependencies
<External dependencies and why>

Step 5: Validate Documentation

Check for:

  • Out-of-date docs (code changed, docs didn't)
  • Missing sections (no examples, no parameters)
  • Broken links
  • Inconsistent formatting

Step 6: Write Report

Write to: .agents/doc/YYYY-MM-DD-<target>.md

# Documentation Report: <Target>

**Date:** YYYY-MM-DD
**Project Type:** <CODING/INFORMATIONAL/OPS>

## Coverage
- Total documentable items: <count>
- Documented: <count>
- Coverage: <percentage>%

## Generated
- <list of docs generated>

## Gaps Found
- <undocumented item 1>
- <undocumented item 2>

## Validation Issues
- <issue 1>
- <issue 2>

## Next Steps
- [ ] Document remaining gaps
- [ ] Fix validation issues

Step 7: Report to User

Tell the user:

  1. Documentation coverage percentage
  2. Docs generated/updated
  3. Gaps remaining
  4. Location of report

Key Rules

  • Detect project type first - approach varies
  • Generate meaningful docs - not just stubs
  • Include examples - always show usage
  • Validate existing - docs can go stale
  • Write the report - track coverage over time

Commands Summary

CommandAction
discoverFind undocumented features
coverageCheck documentation coverage
gen [feature]Generate docs for specific feature
allUpdate all documentation
validateCheck docs match code

Examples

Generating API Documentation

User says: /doc gen authentication

What happens:

  1. Agent detects project type by checking for package.json and finding Node.js project
  2. Agent searches codebase for authentication-related functions using grep
  3. Agent reads authentication module files to understand implementation
  4. Agent generates documentation with purpose, parameters, returns, and usage examples
  5. Agent writes to docs/api/authentication.md with code samples
  6. Agent validates generated docs match actual function signatures

Result: Complete API documentation created for authentication module with working code examples.

Checking Documentation Coverage

User says: /doc coverage

What happens:

  1. Agent detects Python project from pyproject.toml
  2. Agent counts total functions/classes with grep -r "^def \|^class "
  3. Agent counts documented items by searching for docstrings (""")
  4. Agent calculates coverage: 45/67 items = 67% coverage
  5. Agent writes report to .agents/doc/2026-02-13-coverage.md
  6. Agent lists 22 undocumented functions as gaps

Result: Documentation coverage report shows 67% coverage with specific list of 22 functions needing docs.

Troubleshooting

ProblemCauseSolution
Coverage calculation inaccurateGrep pattern doesn't match all code stylesAdjust pattern for project conventions. For Python, check for async def and class methods. For Go, check both func and type definitions.
Generated docs lack examplesMissing context about typical usageRead existing tests to find usage patterns. Check README for code samples. Ask user for typical use case if unclear.
Discover command finds too many itemsLow existing documentation coveragePrioritize by running discover on specific subdirectories. Focus on public API first, internal utilities later. Use --limit to process in batches.
Validation shows docs out of syncCode changed after docs writtenRe-run gen command for affected features. Consider adding git hook to flag doc updates needed when code changes.

Reference Documents

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.81%
按下载量换算1,456

Claude

27.06%
按下载量换算1,015

Cursor

18.2%
按下载量换算683

Gemini CLI

8.61%
按下载量换算323

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills