document
БесплатноБез исполняемых скриптовНе проверенGenerate or update documentation for code, APIs, or systems
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
Documentation Skill
Create clear, useful documentation that helps people understand and use your code.
Core Principle
Write for the reader, not for yourself.
Name
han-core:document - Generate or update documentation for code, APIs, or systems
Synopsis
/document [arguments]
Types of Documentation
1. README Files
Purpose: Help users understand what the project does and how to use it
Audience: New users, potential contributors
Key sections:
- What it does (one paragraph)
- Installation instructions
- Quick start example
- Common use cases
- Link to full documentation
- How to contribute
- License
2. API Documentation
Purpose: Help developers use your API correctly
Audience: Other developers integrating with your code
Key information:
- Endpoint/function signature
- Parameters and types
- Return values
- Error cases
- Authentication requirements
- Examples
3. Inline Comments
Purpose: Explain non-obvious decisions and complex logic
Audience: Future developers (including future you)
When to add:
- Non-obvious decisions ("why" not "what")
- Complex algorithms
- Workarounds
- Edge cases
- Performance considerations
- Security considerations
4. Technical Guides
Purpose: Teach how to accomplish specific tasks
Audience: Developers working with the system
Types:
- How-to guides (step-by-step)
- Architecture overviews (system structure)
- Integration guides (connecting systems)
- Troubleshooting guides (debugging help)
5. Architecture Decision Records (ADRs)
Purpose: Document important technical decisions and their rationale
Audience: Current and future team members
Key information:
- Context (what problem exists)
- Decision (what was chosen)
- Alternatives considered
- Consequences (trade-offs)
Documentation Principles
Good documentation:
- For the reader: Written for their level and needs
- Clear: No jargon unless necessary
- Concrete: Examples over abstract descriptions
- Complete: Answers the key questions
- Maintained: Updated when code changes
Bad documentation:
- Explains "what" instead of "why"
- Assumes too much knowledge
- No examples
- Out of date
- Too verbose or too terse
README Template
# Project Name
Brief description (one paragraph) of what this project does and why it exists.
## Features
- Feature 1
- Feature 2
- Feature 3
## Installation
```bash
npm install project-name
Quick Start
import { Thing } from 'project-name'
const thing = new Thing()
thing.doSomething()
// Output: ...
Usage
Basic Usage
[Most common use case with complete example]
Advanced Usage
[More complex scenarios]
API Reference
functionName(param1, param2)
Description of what the function does.
Parameters:
param1(string, required): Description of parameterparam2(number, optional): Description with default. Default: 42
Returns: string - Description of return value
Throws:
Error- When parameter is invalid
Example:
const result = functionName('hello', 10)
console.log(result) // "hello repeated 10 times"
Configuration
[How to configure, if applicable]
Troubleshooting
Error: "Cannot find module"
Cause: Package not installed Solution:
npm install project-name
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
License
MIT License - see LICENSE file for details.
## API Documentation Template
### REST API
```markdown
## POST /api/users
Create a new user account.
### Authentication
Requires admin access token in Authorization header.
### Request
**Headers:**
```json
{
"Content-Type": "application/json",
"Authorization": "Bearer <admin_token>"
}
Body:
{
"email": "[email protected]",
"name": "John Doe",
"role": "user"
}
Body Parameters:
email(string, required): Valid email address. Must be unique.name(string, required): User's full name. 2-100 characters.role(string, optional): User role. One of: "user", "admin". Default: "user".
Response
Success (201 Created):
{
"id": "abc123",
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"createdAt": "2024-01-01T00:00:00Z"
}
Error Responses:
400 Bad Request:
{
"error": "Invalid email format",
"field": "email"
}
401 Unauthorized:
{
"error": "Authentication required"
}
403 Forbidden:
{
"error": "Admin access required"
}
409 Conflict:
{
"error": "Email already exists",
"field": "email"
}
429 Too Many Requests:
{
"error": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60
}
Example
cURL:
curl -X POST https://api.example.com/users \
-H "Content-Type
Установить document в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGrepGlobBashFAQ
Что делает скилл document?
Generate or update documentation for code, APIs, or systems
Как установить скилл document?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл document запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic