skills/documentation/SKILL.md
Add comprehensive documentation including JSDoc/TSDoc, inline comments, README updates, and OpenAPI 3.0 API docs. Use when documenting code, generating docs, improving project documentation, adding docstrings, writing README files, creating API specifications, generating changelogs, or writing architecture decision records. Triggers on 'add docs', 'document this', 'write README', 'API spec', 'add docstrings', 'generate documentation'.
npx skillsauth add michelabboud/claude-code-helper skills/documentationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematic approach to adding comprehensive, maintainable documentation to any codebase.
/documentation src/utils/helpers.ts
/documentation src/services/
/documentation # Document current changes
/documentation api # Generate OpenAPI 3.0 API docs
/**
* Calculates the weighted average score across all expert dimensions.
*
* @param experts - Map of expert key to score data
* @param weights - Optional weight overrides per expert (default: equal weight)
* @returns Weighted average rounded to 1 decimal place
* @throws {ValidationError} If any score is outside 0-10 range
*
* @example
* ```ts
* const score = calculateOverallScore(experts);
* // => 7.6
* ```
*/
export function calculateOverallScore(
experts: Record<string, ExpertData>,
weights?: Record<string, number>
): number {
def calculate_overall_score(experts: dict, weights: dict | None = None) -> float:
"""Calculate the weighted average score across all expert dimensions.
Args:
experts: Map of expert key to score data.
weights: Optional weight overrides per expert. Defaults to equal weight.
Returns:
Weighted average rounded to 1 decimal place.
Raises:
ValidationError: If any score is outside 0-10 range.
Example:
>>> score = calculate_overall_score(experts)
>>> print(score)
7.6
"""
// CalculateOverallScore calculates the weighted average score across all expert dimensions.
//
// If weights is nil, all experts are weighted equally. Returns the weighted average
// rounded to 1 decimal place. Returns an error if any score is outside the 0-10 range.
func CalculateOverallScore(experts map[string]ExpertData, weights map[string]float64) (float64, error) {
/// Calculates the weighted average score across all expert dimensions.
///
/// # Arguments
/// * `experts` - Map of expert key to score data
/// * `weights` - Optional weight overrides per expert (default: equal weight)
///
/// # Returns
/// Weighted average rounded to 1 decimal place
///
/// # Errors
/// Returns `ValidationError` if any score is outside 0-10 range
///
/// # Examples
/// ```
/// let score = calculate_overall_score(&experts, None)?;
/// assert_eq!(score, 7.6);
/// ```
pub fn calculate_overall_score(
experts: &HashMap<String, ExpertData>,
weights: Option<&HashMap<String, f64>>,
) -> Result<f64, ValidationError> {
Add comments only where logic isn't self-evident:
// Scan first 15 lines because cwd field appears around line 3-4, not line 0
for (const line of lines.slice(0, 15)) {
// Fallback: naive decode (works when no hyphens in directory names)
return decodeProjectPath(encodedDir);
Do NOT add comments for obvious code:
// BAD: const port = 3000; // Set port to 3000
// GOOD: just write the code, it's self-explanatory
Every project/module README should include:
## POST /api/users
Create a new user account.
**Request Body:**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| email | string | Yes | User's email address |
| name | string | Yes | Display name |
| role | string | No | User role (default: "member") |
**Response:** `201 Created`
```json
{ "id": "usr_abc123", "email": "[email protected]" }
Errors:
400 - Invalid email format409 - Email already registered
## API Documentation
When invoked with `/documentation api`, generate OpenAPI 3.0 specifications for REST APIs.
```yaml
openapi: 3.0.0
info:
title: Your API Name
version: 1.0.0
description: Clear API description
servers:
- url: https://api.example.com/v1
paths:
/users:
get:
summary: List all users
parameters:
- name: limit
in: query
schema: { type: integer }
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
components:
schemas:
User:
type: object
required: [id, email]
properties:
id: { type: string }
email: { type: string }
| Language | Style | Tool |
|----------|-------|------|
| TypeScript | TSDoc (/** */) | TypeDoc |
| JavaScript | JSDoc (/** */) | JSDoc |
| Python | Google-style docstrings | Sphinx / pdoc |
| Go | Package comments + // | godoc |
| Rust | /// doc comments | rustdoc |
| Java | Javadoc (/** */) | Javadoc |
helloRespond with:
👋 Hello! I'm Documentation v1.2.0. Add comprehensive documentation including JSDoc/TSDoc, inline comments, README updates, and OpenAPI 3.0 API docs. Use
/documentation hello IDfor the full guide.
hello IDRespond with complete skill information:
/documentation [target] or /documentation api[target] | api | hello | hello IDapi-documentation skill into unified /documentation api subcommandAuthor: Michel Abboud License: Apache-2.0 Repository: claude-code-helper Issues & Discussions: GitHub Issues
development
Score a coding task by complexity (1-10) and recommend the right model (haiku/sonnet/opus) before invoking a language agent. Holds the per-language rubric for all language/framework experts.
tools
When the user asks about [TRIGGER WORDS], wants to [ACTION], or needs help with [TOPIC], use this skill to provide [CAPABILITY]
tools
Check if your claude-code-helper installation is up to date and apply updates. Reads the local manifest and compares against the latest component-versions index on GitHub. Supports checking all components, a single component by name, and applying updates with automatic backup.
testing
Comprehensive testing skill covering TDD, E2E, BDD, contract testing, mutation testing, and visual regression. Use when writing tests, designing test strategy, adding test coverage, fixing flaky tests, mocking services, setting up testing frameworks, or any testing task. Triggers on 'write tests', 'add test coverage', 'test strategy', 'fix flaky test', 'mock', 'E2E test', 'unit test', 'integration test'.