clean-functions
Use when writing, fixing, editing, or refactoring Python functions. Enforces Clean Code principles—maximum 3 arguments, single responsibility, no flag parameters.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
---
name: "clean-functions"
description: "Use when writing, fixing, editing, or refactoring Python functions. Enforces Clean Code principles—maximum 3 arguments, single responsibility, no flag parameters."
license: "MIT"
---
# Clean Functions
## F1: Too Many Arguments (Maximum 3)
```python
# Bad - too many parameters
def create_user(name, email, age, country, timezone, language, newsletter):
...
# Good - use a dataclass or dict
@dataclass
class UserData:
name: str
email: str
age: int
country: str
timezone: str
language: str
newsletter: bool
def create_user(data: UserData):
...
```
More than 3 arguments means your function is doing too much or needs
a data structure.
## F2: No Output Arguments
Don't modify arguments as side effects. Return values instead.
```python
# Bad - modifies argument
def append_footer(report: Report) -> None:
report.append("\n---\nGenerated by System")
# Good - returns new value
def with_footer(report: Report) -> Report:
return report + "\n---\nGenerated by System"
```
## F3: No Flag Arguments
Boolean flags mean your function does at least two things.
```python
# Bad - function does two different things
def render(is_test: bool):
if is_test:
render_test_page()
else:
render_production_page()
# Good - split into two functions
def render_test_page(): ...
def render_production_page(): ...
```
## F4: Delete Dead Functions
If it's not called, delete it. No "just in case" code. Git preserves history.More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

