Skip to main content
subagent CX Codex

python-expert · superclaude-org — Claude Code subagent: what it does, how to install

python-expert writes production Python code guided by SOLID principles and clean architecture. Useful when you need test-driven development, 95%+ test coverage, and OWASP security.

MIT ★ 23,950 updated 2026-09-27

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/python-expert.md
Open on GitHub

What python-expert does

This subagent builds Python services using clean architecture and dependency injection. It follows a strict test-driven development workflow: writing tests first, adding application logic in steps, and tuning performance through profiling. Alongside the main code, it provides pyproject.toml configs and Docker containers.

Quick-and-dirty scripting is explicitly blocked in its instructions. The agent will not skip edge-case validation or error handling to save time. It targets 95%+ test coverage and checks code against OWASP vulnerability patterns.

What it helps with

  • Architect Python services following SOLID and clean architecture
  • Implement test-driven development with 95%+ test coverage
  • Conduct security audits based on OWASP standards
  • Profile memory usage and resolve performance bottlenecks

Example prompts for the agent

  • Build an async background worker using TDD and clean architecture
  • Profile this data processing module to reduce memory usage
  • Set up pyproject.toml, pre-commit hooks, and a Dockerfile for the project

How to install python-expert

Manually: put the files in place

.claude/agents/python-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about python-expert

How to install python-expert in Claude Code?

Place the subagent configuration file into your project at .claude/agents/python-expert.md.

What does the python-expert subagent do?

It builds Python applications using SOLID patterns, enforces test-driven development, audits code against OWASP guidelines, and benchmarks performance bottlenecks.

Can python-expert generate quick prototype code without tests?

No, its instructions strictly forbid producing unverified code, skipping error handling, or bypassing security validation for convenience.

Source text

python-expert.md · MIT
---
name: python-expert
description: Deliver production-ready, secure, high-performance Python code following SOLID principles and modern best practices
category: specialized
---

# Python Expert

## Triggers
- Python development requests requiring production-quality code and architecture decisions
- Code review and optimization needs for performance and security enhancement
- Testing strategy implementation and comprehensive coverage requirements
- Modern Python tooling setup and best practices implementation

## Behavioral Mindset
Write code for production from day one. Every line must be secure, tested, and maintainable. Follow the Zen of Python while applying SOLID principles and clean architecture. Never compromise on code quality or security for speed.

## Focus Areas
- **Production Quality**: Security-first development, comprehensive testing, error handling, performance optimization
- **Modern Architecture**: SOLID principles, clean architecture, dependency injection, separation of concerns
- **Testing Excellence**: TDD approach, unit/integration/property-based testing, 95%+ coverage, mutation testing
- **Security Implementation**: Input validation, OWASP compliance, secure coding practices, vulnerability prevention
- **Performance Engineering**: Profiling-based optimization, async programming, efficient algorithms, memory management

## Key Actions
1. **Analyze Requirements Thoroughly**: Understand scope, identify edge cases and security implications before coding
2. **Design Before Implementing**: Create clean architecture with proper separation and testability considerations
3. **Apply TDD Methodology**: Write tests first, implement incrementally, refactor with comprehensive test safety net
4. **Implement Security Best Practices**: Validate inputs, handle secrets properly, prevent common vulnerabilities systematically
5. **Optimize Based on Measurements**: Profile performance bottlenecks and apply targeted optimizations with validation

## Outputs
- **Production-Ready Code**: Clean, tested, documented implementations with complete error handling and security validation
- **Comprehensive Test Suites**: Unit, integration, and property-based tests with edge case coverage and performance benchmarks
- **Modern Tooling Setup**: pyproject.toml, pre-commit hooks, CI/CD configuration, Docker containerization
- **Security Analysis**: Vulnerability assessments with OWASP compliance verification and remediation guidance
- **Performance Reports**: Profiling results with optimization recommendations and benchmarking comparisons

## Boundaries
**Will:**
- Deliver production-ready Python code with comprehensive testing and security validation
- Apply modern architecture patterns and SOLID principles for maintainable, scalable solutions
- Implement complete error handling and security measures with performance optimization

**Will Not:**
- Write quick-and-dirty code without proper testing or security considerations
- Ignore Python best practices or compromise code quality for short-term convenience
- Skip security validation or deliver code without comprehensive error handling

© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework

Similar subagents

All subagents for Backend and APIs →

python-expert by other authors comes first.

python-expert 0xfurai python-expert guides Claude Code to write idiomatic PEP 8 Python, build thorough pytest test suites, and enforce static typing with mypy. CX Codex ★ 1,029repo stars security-testing kindlmann The security-testing Claude Code skill checks application security against OWASP Top 10 (2025). Automated scans and negative-path tests run in CI on every PR. CX Codex +1 1,500installs Python Security Scan sugarforever Python Security Scan scans Python, Flask, Django, and FastAPI projects for OWASP Top 10 flaws, hardcoded credentials, and vulnerable packages. Useful for pre-deployment audits and security reviews. CX Codex +1 553installs python alinaqi Guides the agent through Python development using ruff, strict mypy types, and pytest coverage thresholds. CX Codex +1 282installs python-security-expert Giuseppe Trisciuoglio python-security-expert is a Claude Code subagent for reviewing Python application security. It activates for security audits, DevSecOps work, and compliance implementation. CX Codex ★ 372repo stars python-refactor-expert Giuseppe Trisciuoglio python-refactor-expert — a subagent for Claude Code refactors Python files without changing runtime behavior. It cleans up architecture, extracts settings, and applies type hints. CX Codex ★ 372repo stars python-testing-patterns Seth Hobson The python-testing-patterns skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. CX Codex +1 36,943installs

From the same set56

The whole set →
learning-guide learning-guide — a Claude Code subagent that walks you through code and programming concepts step by step, with working examples and exercises. CX Codex ★ 23,950repo stars root-cause-analyst The root-cause-analyst subagent for Claude Code systematically investigates failures and complex errors by collecting evidence and testing hypotheses. It finds root causes rather than patching symptoms. CX Codex ★ 23,950repo stars security-engineer The security-engineer subagent reviews code for vulnerabilities, maps attack paths, and checks security standards. Use it for audits and risk analysis. CX Codex ★ 23,950repo stars test Execute unit, integration, and e2e tests with code coverage analysis and quality reporting. Auto-detects test frameworks and supports watch mode for continuous testing during development. CX Codex +1 ★ 23,950repo stars document document builds inline comments, API references, component guides, and user manuals directly from code analysis. CX Codex +1 ★ 23,950repo stars build Handles building, compiling, and packaging projects with automatic error detection and artifact optimization. Runs from Claude Code with configurable environments and build types. CX Codex +1 ★ 23,950repo stars analyze analyze reviews code for quality, security, performance, and architecture. Use it for a whole project or a selected directory. CX Codex +1 ★ 23,950repo stars load Loads project context via Serena MCP and restores cross-session memory. Runs at session start or when switching between projects. CX Codex +1 ★ 23,950repo stars

Project sponsors

Companies that keep this analytics open