Apply Google Style documentation standards to Python, Go, and Terraform code. Use when writing or reviewing code that needs docstrings/comments, when asked to "document this code", "add docstrings", "follow Google Style", or when improving code documentation quality. Supports Python docstrings, Go comments, and Terraform variable/output descriptions. Enforces consistent, professional documentation standards.
npx skills add https://github.com/jjmartres/opencode --skill code-docs
Apply Google Style documentation standards to Python (docstrings), Go (comments), and Terraform (descriptions). Ensures consistent, professional, and comprehensive code documentation across multiple languages.
Use this skill when:
Identify the programming language:
.py files, def, class keywords, type hints.go files, func, type, package keywords.tf files, resource, variable, module keywordsRead the corresponding reference file:
references/python_google_style.md for complete docstring standardsreferences/go_google_style.md for complete comment standardsreferences/terraform_style.md for complete description standardsApply documentation to all appropriate code elements:
Python:
Go:
Terraform:
Before finalizing, verify:
When reviewing code:
Always Document:
__init__ methods (explain parameters)Consider Documenting:
Don't Document:
Always Document:
Consider Documenting:
Don't Document:
Always Document:
Consider Documenting:
Don't Document:
When using type hints, docstrings can be more concise:
def add(a: int, b: int) -> int:
"""Add two integers.
Args:
a: First integer.
b: Second integer.
Returns:
The sum of a and b.
"""
return a + b
Type information is already in the signature, so Args and Returns can be brief.
Always document what errors a function can return:
// ReadConfig reads and parses the configuration file.
//
// Returns an error if the file cannot be read or contains invalid YAML.
func ReadConfig(path string) (*Config, error) {
// implementation
}
For complex logic, add inline comments AND comprehensive function documentation:
def dijkstra(graph: Graph, start: Node) -> dict[Node, float]:
"""Find shortest paths using Dijkstra's algorithm.
Implements Dijkstra's single-source shortest path algorithm
using a priority queue for O((V + E) log V) complexity.
Args:
graph: Weighted graph with non-negative edge weights.
start: Starting node for path calculations.
Returns:
Dictionary mapping each node to its shortest distance from start.
Unreachable nodes are not included in the result.
Raises:
ValueError: If graph contains negative edge weights.
Example:
>>> graph = Graph()
>>> graph.add_edge("A", "B", 4)
>>> graph.add_edge("A", "C", 2)
>>> distances = dijkstra(graph, "A")
>>> distances["B"]
4
"""
# Implementation with inline comments for complex parts
When adding documentation to code:
Complete Terraform documentation standard with:
Complete Python docstring standard with:
Complete Go comment standard with:
All code documentation must:
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.
GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
Take jjmartres/code-docs from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.