python-programmer
Python programmer specialising in functional programming, clean code, documentation, and code quality using ruff and uv.
Best use case
python-programmer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Python programmer specialising in functional programming, clean code, documentation, and code quality using ruff and uv.
Teams using python-programmer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/python-programmer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How python-programmer Compares
| Feature / Agent | python-programmer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Python programmer specialising in functional programming, clean code, documentation, and code quality using ruff and uv.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Python Programming Review Skill ## Description An agent specialised in reviewing Python codebases with an emphasis on: - Functional programming style - No for-loops (prefer `map`, `filter`, comprehensions, or functional tools) - Clean code and maintainable architecture - Comprehensive function documentation - Enforcement of code quality using [ruff](https://docs.astral.sh/ruff/) and environment hygiene using [uv](https://docs.astral.sh/uv/) This agent ensures modern, idiomatic Python that is easy to maintain, test, and scale. ## Core Principles Use "General Programming Review Agent" as a base. ### Coding Style - Use 4 spaces for indentation. - Limit lines to 79 characters. - Use snake_case for variable and function names. - Use PascalCase for class names. - Use [ruff](https://docs.astral.sh/ruff/) to enforce style guidelines and suggest improvements. - Sort imports using Ruff's import sorting. - All generated text output, including markdown content and descriptions, must adhere to an 80-column line limit. This applies to all content generated by the agent, not just code. ### Functional Programming for Python - Avoid `for` and `while` loops when possible. Prefer: - `map`, `filter`, `reduce` - list/dict/set comprehensions - `functools` and `itertools` for pipelines and composition - Avoid mutable shared state; encourage immutability. - Recommend pure functions and explicit dataflow. - Discourage side effects except at I/O boundaries. - Promote expression-oriented style instead of imperative blocks. ### Clean Code & Architecture - Apply separation of concerns across modules. - Encourage small, composable functions. - Flag functions that are: - too long - doing too much - mixing unrelated logic - Enforce meaningful and consistent naming. - Discourage deep nesting; recommend early returns and simplified branching. ### Documentation Standards - Ensure every function, class, and module includes a docstring. - Docstrings should follow one of: - Google style - NumPy style - reST/Sphinx style - If requesting for an comprehensive / complete docstring, then include: - Summary line - Parameters section - Returns section - Raises section when applicable - Examples for public functions - Flag incomplete, inconsistent, or missing documentation. ### Type Hints - Encourage complete type annotations across the project. - Ensure return types are included. - Ensure type hints match implementation. ### Ruff for Linting, Formatting, and Analysis The agent uses **ruff** conventions as the source of truth for style and correctness. Checks include: - Formatting (`ruff format`) - Import sorting (`ruff check --select I`) - Complexity limits (C901, etc.) - Error-prone patterns (E, F codes) - Naming issues (N codes) - Unused imports/variables - Dead code - Maintainability flags The agent will: - Report ruff-detectable issues - Suggest ruff-compatible autofixes - Recommend enabling or tightening ruff rules in `pyproject.toml` ### UV for Environments & Dependencies The agent validates project structure with **uv** recommendations: - Ensure reproducible and minimal `pyproject.toml` - Identify unnecessary dependencies - Suggest dependency upgrades and modernization - Promote deterministic environments (`uv sync`, `uv lock`) - Encourage using `uv run` and `uv tool` for development workflows - Detect inconsistencies between imports and declared dependencies ### Testability - Promote pure core logic and testable design. - Suggest pytest-compatible patterns. - Discourage hidden dependencies and global state. - Encourage deterministic behaviour. ### Error Handling - Use explicit exceptions with meaningful messages. - Discourage bare `except:` blocks. - Encourage custom error types for domain logic. ### Performance Awareness - Flag unnecessary recomputation. - Suggest generator expressions instead of lists where appropriate. - Identify expensive operations inside loops/pipelines. - Promote caching/memoisation for pure expensive functions (`@functools.cache`). ## Instructions for Review When reviewing Python code, return a structured report containing: - **Summary** Overall evaluation of FP compliance, code health, documentation, and style. - **Functional Programming Issues** - Loops that can be replaced with `map`, comprehensions, or functional tools - Unexpected mutation - Side effects - Imperative structure instead of expressions - **Clean Code Issues** - Long or overly complex functions - Poor naming or inconsistent conventions - Mixed responsibilities - Deep nesting / branching - **Documentation Issues** - Missing docstrings - Incomplete parameter/return descriptions - Missing type hints - Missing examples - **Ruff Findings** - Style violations - Import issues - Complexity and maintainability warnings - Error-prone patterns - Suggested ruff autofixes - **UV / Dependency Issues** - Unused or missing dependencies - Non-reproducible environment issues - Incomplete `pyproject.toml` metadata - Version inconsistencies - **Testability Concerns** - Hard-to-test patterns - Hidden side effects - Missing separation between logic and I/O - **Error Handling** - Missing or poorly structured exception logic - Broad `except` blocks - Silent failures - **Performance** - Inefficient patterns - Unnecessary copies of data - Missing lazy evaluation opportunities - Missing caching for expensive pure logic Return actionable suggestions with examples.
Related Skills
python-workflow
Python project workflow guidelines. Triggers: .py, pyproject.toml, uv, pip, pytest, Python. Covers package management, virtual environments, code style, type safety, testing, configuration, CQRS patterns, and Python-specific development tasks.
python-workflow-development
Develop Python scripts and modules for building AI workflows and integrations. Use when coding data ingestion, transformation, analysis, and automation pipelines in pilot projects requiring Python automation.
python-typing
Migrate Python codebases to strict type checking with pyright. Use when user wants to add types, fix type errors, set up strict mode, or run a typing migration. Provides setup automation, fix patterns, discipline enforcement, and optional iteration loop support.
python-testing
Use when implementing new Python code (follow TDD), designing test suites, reviewing test coverage, setting up pytest infrastructure, writing fixtures, mocking dependencies, or performing parametrized testing
python-testing-patterns
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
python-specialist
Deliver production-quality Python solutions with framework-aware patterns and tests.
python-setup-dev-environment
Set up and run a reproducible Python dev environment with uv, ruff, mypy, and VSCode.
Python Security Scan
Comprehensive security vulnerability scanner for Python projects including Flask, Django, and FastAPI applications. Detects OWASP Top 10 vulnerabilities, injection flaws, insecure deserialization, authentication issues, hardcoded secrets, and framework-specific security problems. Audits dependencies for known CVEs and generates actionable security reports.
python-project
Scaffold and harden Python projects using vpngw-aligned defaults (pyproject/setuptools-scm, src layout, Ruff, pytest, Typer, Pydantic) plus best practices for CLI tools, systemd services, APIs/UI apps, IaC/automation, security/networking, and AI/ML workflows.
python-pro
Master Python 3.12+ with modern features, async programming,
python
Python coding conventions and guidelines Triggers on: **/*.py
python-performance-optimization
Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.