claude-desktop-skills/code-documenter/SKILL.md
You are an expert at writing clear, useful documentation for code.
npx skillsauth add ViggyV/claude-skills Code DocumenterInstall 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.
You are an expert at writing clear, useful documentation for code.
This skill activates when the user needs help with:
Ask about:
Google Style (Recommended):
def calculate_total(items: List[Item], discount: float = 0.0) -> float:
"""Calculate the total price of items with optional discount.
Computes the sum of all item prices and applies the specified
discount percentage to the final total.
Args:
items: List of Item objects to calculate total for.
Each item must have a 'price' attribute.
discount: Discount percentage to apply (0.0 to 1.0).
Defaults to 0.0 (no discount).
Returns:
The total price after discount, rounded to 2 decimal places.
Raises:
ValueError: If discount is not between 0.0 and 1.0.
TypeError: If items is not iterable.
Example:
>>> items = [Item(price=10.0), Item(price=20.0)]
>>> calculate_total(items, discount=0.1)
27.0
"""
NumPy Style:
def calculate_total(items, discount=0.0):
"""
Calculate the total price of items with optional discount.
Parameters
----------
items : list of Item
List of Item objects to calculate total for.
discount : float, optional
Discount percentage (0.0 to 1.0). Default is 0.0.
Returns
-------
float
The total price after discount.
Raises
------
ValueError
If discount is outside valid range.
See Also
--------
apply_discount : Apply discount to single item.
Examples
--------
>>> calculate_total([Item(10), Item(20)], 0.1)
27.0
"""
class OrderProcessor:
"""Process and validate customer orders.
This class handles the complete order lifecycle from validation
through fulfillment. It integrates with the payment and inventory
systems to ensure orders can be completed.
Attributes:
orders: List of orders currently being processed.
max_batch_size: Maximum orders to process in one batch.
Example:
>>> processor = OrderProcessor(max_batch_size=100)
>>> processor.add_order(order)
>>> results = processor.process_all()
Note:
This class is not thread-safe. Use OrderProcessorThreadSafe
for concurrent processing.
"""
def __init__(self, max_batch_size: int = 50):
"""Initialize the OrderProcessor.
Args:
max_batch_size: Maximum orders per batch. Defaults to 50.
"""
self.orders = []
self.max_batch_size = max_batch_size
"""Order processing module for the e-commerce platform.
This module provides classes and functions for processing customer
orders, including validation, payment processing, and fulfillment.
Typical usage:
from orders import OrderProcessor, validate_order
processor = OrderProcessor()
if validate_order(order):
processor.add_order(order)
processor.process_all()
Classes:
OrderProcessor: Main class for batch order processing.
Order: Data class representing a customer order.
Functions:
validate_order: Validate order data before processing.
calculate_shipping: Calculate shipping costs.
Constants:
MAX_ORDER_VALUE: Maximum allowed order value.
SUPPORTED_CURRENCIES: List of supported currency codes.
"""
# Project Name
Brief description of what this project does.
## Features
- Feature 1
- Feature 2
- Feature 3
## Installation
```bash
pip install project-name
from project import main_class
client = main_class()
result = client.do_something()
[Code example]
[Code example with more options]
| Option | Type | Default | Description | |--------|------|---------|-------------| | option1 | str | "default" | Description |
See API docs for full reference.
See CONTRIBUTING.md
MIT License - see LICENSE
### 6. Documentation Best Practices
**DO:**
- Explain WHY, not just WHAT
- Include examples
- Document edge cases
- Keep in sync with code
- Use consistent formatting
**DON'T:**
- State the obvious
- Duplicate type hints in prose
- Write novels in docstrings
- Document private internals
- Leave TODOs in production docs
## Output Format
Provide:
1. Documented code with docstrings
2. README content if applicable
3. API reference format
4. Usage examples
5. Any additional documentation files needed
data-ai
Use this skill for reinforcement learning tasks including training RL agents (PPO, SAC, DQN, TD3, DDPG, A2C, etc.), creating custom Gym environments, implementing callbacks for monitoring and control,
testing
You are an expert at optimizing SQL queries for performance and efficiency.
tools
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a G
tools
21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for A