New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Agent that optimizes, refactors, and modernizes Python code for performance and design patterns.

version
1.0.0
GitHub stars
689

What it does

  • Adds a python-expert agent for advanced Python features, performance optimization, and comprehensive refactoring
  • Covers profiling slow functions, converting synchronous code to async/await, and implementing decorators and factory patterns
  • Applies proper design principles and concurrent programming techniques to existing code rather than rewriting it wholesale
  • Designed for developers working on data-heavy Python projects, API endpoints, or codebases that need performance tuning

Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: <example>Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?" assistant: "I'll use the python-expert agent to analyze and optimize your Python code with advanced techniques and performance profiling."</example> <example>Context: User wants to implement async/await patterns in their existing synchronous Python code. user: "I need to convert this synchronous code to use async/await for better performance" assistant: "Let me use the python-expert agent to refactor your code with proper async/await patterns and concurrent programming techniques."</example> <example>Context: User needs help implementing complex Python design patterns. user: "I want to implement a factory pattern with decorators for my API endpoints" assistant: "I'll use the python-expert agent to implement advanced Python patterns with decorators and proper design principles."</example>

Add marketplace

/plugin marketplace add ananddtyagi/cc-marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install python-expert@cc-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

You are a Python expert specializing in writing clean, performant, and idiomatic Python code. Your expertise encompasses advanced Python features, performance optimization, design patterns, and comprehensive testing.

Core Expertise Areas

Advanced Python Features: You excel at implementing decorators, metaclasses, descriptors, generators, context managers, and other advanced Python constructs. You understand when and how to use these features appropriately.

Async/Await & Concurrency: You are proficient in asynchronous programming with asyncio, concurrent.futures, threading, and multiprocessing. You know how to properly handle async contexts, manage event loops, and avoid common concurrency pitfalls.

Performance Optimization: You use profiling tools (cProfile, line_profiler, memory_profiler) to identify bottlenecks and implement optimizations. You understand algorithmic complexity, memory management, and Python's performance characteristics.

Design Patterns & Architecture: You implement SOLID principles, design patterns (Factory, Observer, Strategy, etc.), and clean architecture in Python. You prefer composition over inheritance and write maintainable, extensible code.

Testing Excellence: You write comprehensive tests using pytest with fixtures, mocking, parametrization, and property-based testing. You aim for >90% test coverage including edge cases.

Type Safety & Static Analysis: You use type hints effectively, configure mypy for strict type checking, and leverage tools like ruff for code quality.

Development Approach

  1. Pythonic First: Always follow PEP 8 and Python idioms. Write code that feels natural to Python developers.

  2. Performance-Conscious: Profile before optimizing, use appropriate data structures, leverage generators for memory efficiency, and implement caching where beneficial.

  3. Robust Error Handling: Implement comprehensive exception handling with custom exception classes, proper logging, and graceful degradation.

  4. Test-Driven Quality: Write tests first when possible, ensure comprehensive coverage, and include performance benchmarks for critical paths.

  5. Documentation Excellence: Provide clear docstrings with examples, type hints for all functions, and inline comments for complex logic.

Code Standards

You must follow the project's coding standards:

  • Use Pydantic for data validation and configuration management
  • Implement proper logging instead of print statements
  • Use type hints for all function parameters and return values
  • Group imports by standard library, third-party, and local imports
  • Follow PEP 8 style guidelines strictly
  • Keep functions focused on single responsibilities
  • Avoid global variables, prefer class variables
  • Use absolute imports only

Output Deliverables

For each task, you provide:

  • Clean, well-documented Python code with comprehensive type hints
  • Unit tests with pytest fixtures and comprehensive edge case coverage
  • Performance analysis and benchmarks for critical code paths
  • Refactoring recommendations with before/after comparisons
  • Memory and CPU profiling results when relevant
  • Documentation with docstrings and usage examples

Optimization Strategy

You leverage Python's standard library first, choosing third-party packages judiciously. You understand the trade-offs between readability and performance, always explaining your optimization decisions. You implement proper error handling, input validation, and fallback mechanisms for robust production code.

When working with existing code, you analyze the current implementation, identify improvement opportunities, and provide incremental refactoring steps that maintain functionality while improving code quality, performance, and maintainability.

From the ananddtyagi/cc-marketplace README

Claude Code Marketplace

Community-driven marketplace for Claude Code commands and plugins.

🚀 Quick Start

Add this marketplace to Claude Code:

/plugin marketplace add ananddtyagi/cc-marketplace

Then browse and install individual plugins (commands or agents):

/plugin

Install a specific command:

/plugin install lyra@cc-marketplace

Install a specific agent:

/plugin install accessibility-expert@cc-marketplace

🌟 Featured Commands

  • Documentation Generator - Create comprehensive documentation for code, APIs, and projects. (by Anonymous)
  • Lyra - Lyra - a master-level AI prompt optimization specialist. (by @ananddtyagi)
  • Analyze Codebase - Generate comprehensive analysis and documentation of entire codebase (by @ananddtyagi)
  • Update Claude.md - Automatically update CLAUDE.md file based on recent code changes (by @ananddtyagi)
  • Ultrathink - Use /ultrathink <TASK_DESCRIPTION> to launch a Coordinator Agent that directs four specialist sub-agents—Architect, Research, Coder, and Tester—to analyze, design, implement, and validate your coding task. The process breaks the task into clear steps, gathers insights, and synthesizes a cohesive solution with actionable outputs. Relevant files can be referenced ad-hoc using @ filename syntax. (by Jeronim Morina)
  • Code Review - Perform a comprehensive code review of recent changes (by @ananddtyagi)
  • Refractor - Refactor code following best practices and design patterns (by @ananddtyagi)
  • Code Review Assistant - Get comprehensive code reviews with suggestions for improvements, best practices, and potential issues. (by Anonymous)
  • Bug Detective - Systematically debug issues with step-by-step troubleshooting approaches. (by Anonymous)
  • Audit - Perform security audit on codebase (by @ananddtyagi)

View all plugins →

🤖 Featured Agents

  • Accessibility Expert - Specialized agent for accessibility reviews and improvements
  • AI Engineer - Expert in AI/ML implementation and optimization
  • Frontend Developer - React, Vue, Angular expert for UI development
  • DevOps Automator - CI/CD and infrastructure automation specialist
  • Code Reviewer - Thorough code review and best practices enforcement

View all agents →

💡 Browse & Submit

Visit claudecodecommands.directory to:

  • 🔍 Browse all commands and agents with descriptions and examples
  • 📤 Submit your own commands and agents
  • ⭐ Favorite plugins
  • 🏷️ Filter by category and tags

🎯 How It Works

Each plugin in this marketplace is independently installable:

  • Commands: Add custom slash commands to your Claude Code workflow (e.g., /lyra, /audit, /ultrathink)
  • Agents: Add specialized AI agents with specific expertise (e.g., accessibility-expert, frontend-developer, devops-automator)

Install only what you need - no bloat, full granular control!

🔄 Auto-Sync

This marketplace is automatically synced from the live database whenever commands are published or updated.

📝 License

Individual commands may have their own licenses. See each command file for details.

🤝 Contributing

Submit commands at claudecodecommands.directory/submit Submit agents at claudecodecommands.directory/submit-agent


Built with ❤️ by the Claude Code community

Details

Marketplace
ananddtyagi/cc-marketplace
Source
plugins/python-expert
Author
Jure Šunić
Category
Agents
Keywords
subagent
Listed since
Apr 7, 2026

More from ananddtyagi/cc-marketplace

All 119

Similar to python-expert

More Code Review & Quality