From beagle-docs
Provides templates and patterns for API and symbol reference docs using scannable tables for parameters/returns, runnable examples, and consistent structure. Triggers on reference docs, API reference, parameters table.
How this skill is triggered — by the user, by Claude, or both
Slash command
/beagle-docs:reference-docsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reference documentation is information-oriented - helping experienced users find precise technical details quickly. This skill provides patterns for writing clear, scannable reference pages.
Reference documentation is information-oriented - helping experienced users find precise technical details quickly. This skill provides patterns for writing clear, scannable reference pages.
Dependency: Always use this skill in conjunction with docs-style for core writing principles.
Use this template when creating reference documentation:
---
title: "[Symbol/API Name]"
description: "One-line description of what it does"
---
# [Name]
Brief description (1-2 sentences). State what it is and its primary purpose.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `param1` | `string` | Yes | What this parameter controls |
| `param2` | `number` | No | Optional behavior modification. Default: `10` |
## Returns
| Type | Description |
|------|-------------|
| `ReturnType` | What the function returns and when |
## Example
```language
import { symbolName } from 'package';
// Complete, runnable example showing common use case
const result = symbolName({
param1: 'realistic-value',
param2: 42
});
console.log(result);
// Expected output: { ... }
## Writing Principles
### Brevity Over Explanation
- State facts, not rationale
- Avoid "why" - save that for Explanation docs
- Cut unnecessary words
**Do:**
```markdown
Returns the user's display name.
Avoid:
This function is useful when you need to get the user's display name
because it handles all the edge cases for you automatically.
Do:
| Name | Type | Description |
|------|------|-------------|
| `userId` | `string` | Unique user identifier |
| `options` | `Options` | Configuration object |
Avoid:
The first parameter is `userId`, which should be a string containing
the unique user identifier. The second parameter is `options`, which
is an Options object containing the configuration.
All reference pages for similar items should follow identical structure:
## Example
### Basic Usage
```typescript
const user = await getUser('user-123');
console.log(user.name);
const user = await getUser('user-123', {
includeMetadata: true,
fields: ['name', 'email', 'role']
});
### Include Setup and Context
```markdown
```typescript
import { Client } from '@example/sdk';
// Initialize client (required once per application)
const client = new Client({ apiKey: process.env.API_KEY });
// Now use the function
const result = await client.users.list();
### Use Realistic Values
**Do:** `userId: 'usr_a1b2c3d4'`
**Avoid:** `userId: 'foo'`
**Do:** `email: '[email protected]'`
**Avoid:** `email: '[email protected]'`
## Parameter Documentation Patterns
### Required vs Optional
Clearly indicate which parameters are required:
```markdown
| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `apiKey` | `string` | Yes | - | Your API key |
| `timeout` | `number` | No | `30000` | Request timeout in ms |
| `retries` | `number` | No | `3` | Number of retry attempts |
For object parameters, document the shape:
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `options` | `UserOptions` | No | Configuration options |
### UserOptions
| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `includeDeleted` | `boolean` | No | Include soft-deleted users |
| `fields` | `string[]` | No | Fields to return |
| `limit` | `number` | No | Maximum results (default: 100) |
Document allowed values clearly:
| Name | Type | Values | Description |
|------|------|--------|-------------|
| `status` | `string` | `active`, `pending`, `suspended` | User account status |
## Returns
`User` - The requested user object, or `null` if not found.
## Returns
| Property | Type | Description |
|----------|------|-------------|
| `data` | `User[]` | Array of user objects |
| `pagination` | `Pagination` | Pagination metadata |
| `total` | `number` | Total matching records |
## Errors
| Error | Condition |
|-------|-----------|
| `NotFoundError` | User does not exist |
| `UnauthorizedError` | Invalid or expired API key |
| `RateLimitError` | Too many requests |
## Endpoint
```http
GET /api/v1/users/{userId}
| Name | Type | Description |
|---|---|---|
userId | string | The user's unique identifier |
| Name | Type | Required | Description |
|---|---|---|---|
fields | string | No | Comma-separated list of fields |
| Name | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token |
X-Request-ID | No | Request tracking ID |
{
"id": "usr_a1b2c3d4",
"name": "Jane Smith",
"email": "[email protected]"
}
## Component/Props Reference
For UI components:
```markdown
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `variant` | `'primary' \| 'secondary'` | `'primary'` | Visual style |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
| `disabled` | `boolean` | `false` | Disable interactions |
| `onClick` | `() => void` | - | Click handler |
## Slots
| Name | Description |
|------|-------------|
| `default` | Button content |
| `icon` | Icon to display before text |
Always include links to related content:
## Related
- [createUser](/reference/create-user) - Create a new user
- [updateUser](/reference/update-user) - Modify user properties
- [deleteUser](/reference/delete-user) - Remove a user
- [User Authentication Guide](/guides/authentication) - How authentication works
Before considering a reference page complete:
npx claudepluginhub existential-birds/beagle --plugin beagle-docsGenerates API references, configuration guides, schema documentation, and technical references with parameter details, examples, and cross-references.
Provides docstring templates for Python (Google style) and JavaScript (JSDoc), README structures, and standards for technical documentation. Use when generating API docs, READMEs, or updating code comments.
Guides writing technical documentation including README files, API docs, user guides, and inline code documentation. Provides templates and best practices for clear, scannable docs.