用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/arbazkhan971/godmode --skill docs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | docs |
| description | Docs. OpenAPI/Swagger, JSDoc, docstrings, README, runbook, API docs, stale docs audit, missing coverage. |
/godmode:docsIdentify what documentation is needed:
SCOPE DETECTION:
- API: Generate OpenAPI/Swagger specs or endpoint documentation
- CODE: Generate JSDoc, docstrings, type annotations, inline comments
- README: Generate or update project/module README files
- RUNBOOK: Create operational runbooks for deployment, incidents, maintenance
- AUDIT: Check existing docs for staleness, gaps, and quality issues
- ALL: Full documentation sweep
Survey the current state:
# Find existing documentation files
find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | sort
# Find OpenAPI/Swagger specs
find . -name "openapi*" -o -name "swagger*" | head -20
Present inventory:
DOCUMENTATION INVENTORY:
Documentation Status
| Category | Count | Coverage |
|--|--|--|
| README files | 3 | root, api, shared |
| API docs | 1 | OpenAPI 3.0 (partial) |
| Code docs | 47/120 | 39% of public exports |
| Runbooks | 0 | None |
| Architecture docs | 2 | ADRs only |
| Guides | 1 | Getting started |
For REST APIs, generate or update OpenAPI spec:
# Scan routes/controllers for endpoints
# For each endpoint, generate:
openapi: "3.0.3"
info:
title: <API name>
version: <version>
For each endpoint:
Analyze code and add documentation:
/**
* <Brief description derived from function name and body>
*
* @param <name> - <description from usage context>
* @returns <description from return statements>
* @throws <Error type> <when condition, from throw statements>
def function_name(param: Type) -> ReturnType:
"""<Brief description derived from function name and body>.
Args:
param: <description from usage context>
Rules for code docs:
@example blocks from test files when availableFor project or module READMEs:
# <Project/Module Name>
<One-paragraph description derived from package.json, pyproject.toml, or code analysis>
## Installation
<Derived from package manager config and lock files>
## Quick Start
<Derived from test files, examples directory, or main entry point>
## API Reference
<Summary table of public exports with links to detailed docs>
For operational documentation:
# Runbook: <Operation Name>
## Overview
<What this runbook covers and when to use it>
## Prerequisites
- <Access requirements>
- <Tools needed>
- <Environment setup>
## Procedure
### Step 1: <Action>
```command
<exact command to run>
Expected output: If it fails:
...
<Who to escalate to if this runbook doesn't resolve the issue>
Runbook sources:
- Deployment scripts and CI/CD configs
- Existing operational procedures (even if undocumented)
- Common incident patterns from git history
- Environment configuration files
### Step 7: Documentation Quality Audit
Check all existing documentation for issues:
QUALITY AUDIT: Documentation Health Report
| # | Issue | Severity | File |
|---|---|---|---|
| 1 | Stale: references removed API | HIGH | api.md:42 |
| 2 | Missing: no docs for /users | HIGH | (none) |
| 3 | Broken link: ./setup.md | MEDIUM | README:15 |
| 4 | Outdated example: uses v1 API | MEDIUM | guide.md:8 |
| 5 | Typo: "recieve" (x3) | LOW | multiple files |
Staleness detection strategies:
```bash
# Find docs referencing files/functions that no longer exist
# Extract code references from docs
grep -oP '`[a-zA-Z_]+\(\)`' docs/*.md | sort -u
# Cross-reference with actual codebase
# Flag any reference that doesn't match a real function/file
# Find docs older than their subject
# Compare doc modification date with code modification date
git log -1 --format="%ai" -- <doc-file>
git log -1 --format="%ai" -- <code-file>
git add docs/ README.md
git commit -m "docs: <scope> — <summary of what was documented>"
Never ask to continue. Loop autonomously until done.
IF doc coverage < 80% of public API: prioritize undocumented exports. WHEN doc modification date < code modification date: flag as stale. IF broken links > 0: fix before committing.
| Flag | Description |
|---|---|
| (none) | Interactive documentation generation |
--api | Generate API documentation only (OpenAPI/Swagger) |
--code | Generate code documentation only (JSDoc/docstrings) |
getUserById can
soft-delete check, cache-first, or throw specific errors. Describe actual behavior.git log -1 -- <file> to check recency.](./ and ](# references and verify each
target exists before committing.sk-test-xxx, user@example.com.1. Scan for doc configs: .jsdoc.json, typedoc.json, mkdocs.yml, sphinx conf.py, openapi.yaml
2. Check package.json/pyproject.toml for doc scripts. Count documented vs undocumented exports.
3. Detect framework (JSDoc/TSDoc, Sphinx, godoc, Javadoc). Match existing style.
4. Prioritize undocumented public APIs. Skip recently documented items.
After each docs skill invocation, emit a structured report:
DOCUMENTATION REPORT:
| Doc type | <API | code | runbook | README> |
|--|--|--|--|--|
| Files documented | <N> |
| Functions/endpoints | <N> documented / <N> total |
| Coverage | <N>% of public API documented |
| Stale docs found | <N> (modified code, unchanged docs) |
| Links validated | <N> valid / <N> broken |
| Examples included | <N> code examples |
| Verdict | PASS | NEEDS REVISION |
Log every documentation action for tracking:
timestamp skill target action coverage_pct stale_count status
2026-03-20T14:00:00Z docs src/api/ api_docs 85 3 needs_update
2026-03-20T14:10:00Z docs runbooks/ runbook_create 100 0 pass
| Failure | Action |
|---|---|
| Docs don't match code | Read source, check git blame, update docs |
| Doc generation fails | Check comment syntax, tool version, run verbose |
| Broken links | Run markdown-link-check/linkinator, update refs |
KEEP if: all links resolve AND doc matches code AND coverage increased
DISCARD if: broken links OR doc contradicts code OR describes deleted functions
STOP when: all public APIs documented + 0 broken links + 0 stale docs.
Guard: link-check passes. On failure: git reset --hard HEAD~1.
基于 SOC 职业分类