python
Python Guidelines
Standards and best practices for Python development. Follow these guidelines when writing or modifying Python code.
Design Principles
Apply DRY, KISS, and SOLID consistently. Prefer functional methods where relevant; use classes for stateful behavior. Use composition with Protocol classes for interfaces rather than inheritance. Each module should have a single responsibility. Use dependency injection for class dependencies.
Code Style
- Naming: Descriptive yet concise names for variables, methods, and classes
- Documentation: Docstrings for all classes, functions, enums, enum values
- Type hints: Use consistently; avoid
Anyunless necessary - Imports: Avoid barrel exports in
__init__.py; prefer blank files
Type Annotations
- Use
dict,listinstead oftyping.Dict,typing.List - Use
str | Noneinstead ofOptional[str]
More from siviter-xyz/dot-agent
create-skill
Guide for creating effective skills following best practices. Use when creating or updating skills that extend agent capabilities.
2.0Kcursor-best-practices
Best practices for working with Cursor. Use when learning how to effectively use Cursor features or optimizing your workflow.
511software-engineer
Core software engineering principles for code style, documentation, and development workflow. Applies when editing code, working in software repositories, or performing software development tasks.
375create-agents-md
Create AGENTS.md files for project-specific inline rules. Use when adding small, project-specific instructions that should be committed in repos.
209frontend-engineer
Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.
197backend-engineer
Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability patterns (microservices, caching, sharding), DevOps practices (Docker, Kubernetes, CI/CD), and monitoring. Use when designing APIs, implementing authentication, optimizing database queries, setting up CI/CD pipelines, handling security vulnerabilities, building microservices, or developing production-ready backend systems.
183