python-expert-agent
v0.0.4
Published
Python Expert Agent pack for OpenCode - 10 skills, 4 subagents, production-ready FastAPI patterns
Maintainers
Readme
Python Expert Agent for OpenCode
A comprehensive Python agent pack for OpenCode with 10 skills, 4 subagents, and production-ready FastAPI patterns.
Features
- 1 Primary Agent -
python-expertwith intelligent skill loading - 4 Specialized Subagents - Code generation, review, testing, and exploration
- 10 On-Demand Skills - FastAPI, SQLAlchemy, pytest, asyncio, and more
- 3 Context Files - Standards, patterns, and security guidelines
- Production Ready - Targets Python 3.13+, FastAPI, Pydantic v2, SQLAlchemy 2.0
Installation
From npm (Recommended)
# Install globally
npm install -g python-expert-agent
# Install to current project
python-expert-agent init
# Install globally (for all projects)
python-expert-agent init --globalUsing npx (No install needed)
npx python-expert-agent initManual Installation
Copy the .opencode directory and AGENTS.md to your project root.
Quick Start
Install the agent pack:
npm install -g python-expert-agent python-expert-agent initStart OpenCode in your Python project:
cd /path/to/your/python/project opencodeThe
python-expertagent will be automatically detected.Use skills on-demand:
skill(name="python-fastapi") skill(name="python-backend")
Components
Primary Agent
| Agent | Description |
|-------|-------------|
| python-expert | Main agent with skill loading protocol, keyword detection, and task delegation |
Subagents
| Subagent | Type | Purpose |
|----------|------|---------|
| python-coder | general | Code generation and feature implementation |
| python-reviewer | general | Code quality and security review |
| python-tester | general | Test writing with pytest patterns |
| python-scout | explore | Context discovery and file finding |
Skills
| Skill | Triggers | Purpose |
|-------|----------|---------|
| python-fundamentals | *.py, python, dataclass | Core Python 3.13+ patterns |
| python-fundamentals-313 | 3.13, jit, free-threading | Python 3.13+ specific features |
| python-fastapi | fastapi, pydantic, endpoint | FastAPI production patterns |
| python-backend | sqlalchemy, database, orm | SQLAlchemy 2.0 async patterns |
| python-testing-general | pytest, test, mock | pytest fundamentals |
| python-testing-deep | hypothesis, property-based | Advanced testing techniques |
| python-asyncio | async, await, asyncio | Async/await patterns |
| python-type-hints | typing, mypy, pyright | Type system and validation |
| python-package-management | uv, pip, pyproject | UV package manager |
| python-tooling | docker, ci, cd | DevOps and CI/CD |
Usage Examples
Creating a FastAPI Endpoint
skill(name="python-fastapi")
Create a user registration endpoint with:
- Email validation
- Password hashing with bcrypt
- JWT token generationWriting Tests
skill(name="python-testing-general")
Write tests for the UserService class with:
- Happy path scenarios
- Edge cases
- Error conditionsDatabase Work
skill(name="python-backend")
Create an async SQLAlchemy model for:
- User entity with relationships
- Alembic migration
- Repository patternProject Structure
.opencode/
├── config.json # Agent selection
├── opencode.json # Schema reference
├── agent/
│ └── python-expert.md # Primary agent definition
├── subagents/
│ ├── python-coder.md # Code generation
│ ├── python-reviewer.md # Code review
│ ├── python-tester.md # Test writing
│ └── python-scout.md # Context discovery
├── skills/ # 10 Python skills
│ ├── python-fundamentals/
│ ├── python-fastapi/
│ ├── python-backend/
│ └── ...
├── context/
│ ├── navigation.md # Quick reference
│ └── python/
│ ├── standards.md # Code quality standards
│ ├── patterns.md # Common patterns
│ └── security.md # Security patterns
├── config/
│ └── agent-metadata.json # Agent registry
└── docs/ # DocumentationCLI Commands
python-expert-agent init [path] # Install to project
python-expert-agent init --global # Install globally
python-expert-agent init --force # Overwrite existing
python-expert-agent --version # Show version
python-expert-agent --help # Show helpTechnology Stack
| Layer | Technology | Version | |-------|-----------|---------| | Language | Python | 3.13+ | | Web Framework | FastAPI | 0.115+ | | Data Validation | Pydantic | 2.7+ | | ORM | SQLAlchemy | 2.0 (async) | | Database | PostgreSQL | 16 | | Testing | pytest | latest | | Package Manager | UV | latest | | Linting | ruff, mypy | latest |
Documentation
Full documentation is available in .opencode/docs/:
- Overview - System introduction
- Architecture - Component relationships
- Agents - Agent configuration
- Skills - Skill documentation
- Workflow - Development patterns
Requirements
- OpenCode CLI
- Node.js 18+ (for CLI installer)
- Python 3.11+ (for projects using this agent)
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE file for details.
Links
- OpenCode - The open source AI coding agent
- OpenCode Docs - Official documentation
- npm Package - npm registry
- GitHub - Source code
