
Python
- 329 installs
- 20 repo stars
- Updated March 21, 2026
- siviter-xyz/dot-agent
python is a dot-agent skill that guides AI coding agents through Python development tasks for developers who need structured help writing scripts, modules, and backend code.
About
python is an agent skill published in the siviter-xyz/dot-agent repository that steers Claude Code, Cursor, and compatible assistants toward idiomatic Python development workflows. The skill activates when agents encounter Python-specific tasks such as writing modules, refactoring functions, debugging tracebacks, or scaffolding backend scripts without switching to generic language-agnostic prompts. Because dot-agent packages domain skills as installable SKILL.md instructions, python injects Python conventions, standard library usage patterns, and project-context awareness into agent turns during build work. Developers reach for python when an agent session needs explicit Python guidance—virtual environment assumptions, typing hints, package layout, or test-friendly module structure—rather than ad hoc generic coding advice. The skill complements other dot-agent language and framework skills and fits early-through-mid implementation phases where Python source files, requirements manifests, and CLI entry points are being created or modified.
- python
Python by the numbers
- 329 all-time installs (skills.sh)
- +3 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #1,231 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Jul 27, 2026 (Skillselion catalog sync)
npx skills add https://github.com/siviter-xyz/dot-agent --skill pythonAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 329 |
|---|---|
| repo stars | ★ 20 |
| Last updated | March 21, 2026 |
| Repository | siviter-xyz/dot-agent ↗ |
How do agents follow Python project conventions?
Use python for development tasks
Who is it for?
Developers using dot-agent who want agent sessions scoped to Python scripting, module design, and backend implementation instead of generic multi-language prompts.
Skip if: Teams needing deep framework-specific skills such as Django or FastAPI when those dedicated dot-agent skills exist, or non-Python language work.
When should I use this skill?
User asks the agent to write Python code, fix Python errors, refactor Python modules, or follow Python project conventions in a dot-agent workspace.
What you get
Python source files, refactored modules, and agent-guided fixes aligned with dot-agent Python development patterns.
- Python source modules
- Refactored Python functions
- Agent-guided traceback fixes
Files
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] - Include
from __future__ import annotationsat top of files with type hints - Prefer built-in types over typing module equivalents
Architecture
Dependency Injection
- Always inject dependencies via constructors or methods when using classes
- One service class per module (interface and class models allowed in addition)
- Use Protocol classes to define interfaces for dependency injection and testing
Module Organization
- Each module focuses on one concern with clear boundaries
- Extract reusable methods to avoid duplication
- Design for reusability across contexts
Environment Variables
- Use an
environment.pyfile with individual methods per variable (e.g.,api_key()forAPI_KEY,database_url()forDATABASE_URL) - Co-locate all environment access in one place per package for easier mocking in tests
Data Models
- Use Pydantic v2 for schemas, validation, and data models
- Leverage Pydantic's type validation, serialization, and configuration management
- Use Pydantic models for API request/response schemas, configuration objects, and data transfer objects
Testing
Structure
- Tests mirror
src/directory structure - Test methods start with
test_ - Use test class suites: for
def foo()createclass TestFoo - Keep names concise, omit class suite name from method
- Always check for appropriate unit tests when changing code
Quality
- Use AAA (Arrange, Act, Assert) pattern
- Tests should be useful, readable, concise, maintainable
- Avoid tests that create massive diffs or become burdensome
Tools
- Prefer
pytestoverunittest - Use
pytest-mockfor mocking - Use
conftest.pyfor shared fixtures - Use
tests/__test_<package_name>__for shared testing code
Implementation
When implementing Python code:
- Ensure code passes type checking and tests before committing
- Group related changes with tests in atomic commits
- Check for existing workflow patterns (spec-first, TDD, etc.) and follow them
References
- For adhoc Python scripts in uv-managed projects, see
references/uv-scripts.md. - For monorepo-specific patterns using uv and Hatch, see
references/uv-monorepo.md.
Python Monorepo Guidelines
Guidelines for Python monorepos managed by uv with Hatch as the build system.
Project Structure
Layout
- Root workspace at repository root
- Packages under
packages/directory - Shared config in root
pyproject.toml - Workspace tasks in root
justfile - Package tasks in individual
justfiles
Package Structure
Required structure for each package:
packages/<package-name-kebab-case>/
├── pyproject.toml # Config and dependencies
├── justfile # Package-specific tasks
├── src/
│ └── <package_name_snake_case>/ # Python module
│ ├── main.py
│ └── <submodule>/ # Submodules in snake_case
└── tests/ # Mirrors src structure
└── _integration/ # Integration tests (if package exposes API/CLI/interface etc)Naming: Directories use kebab-case; Python modules and submodules use snake_case
Build System
- Build backend: Hatch (pypa/hatch)
- Versioning: hatch-vcs (ofek/hatch-vcs) from git tags
- Package versions auto-derived from git tags
Dependency Management
- Tool: ALWAYS use
uv. NEVER use pip or other tools directly - Root dependencies: Available to all packages
- Sync: Use
uv syncto install/sync - Package dependencies: Specify in individual
pyproject.toml - Dev dependencies: Use
[dependency-groups]inpyproject.toml
Package Organization
Cross-Package Dependencies
- Reference workspace packages in
pyproject.toml - Extract common functionality into a shared core package
- Establish clear dependency hierarchy; avoid circular dependencies
Package Boundaries
- Each package is independently buildable and testable
- Expose only necessary APIs or CLIs through public interfaces
- Keep implementation details private within modules
- Place shared utilities in dedicated packages
Testing
Integration Tests
- Packages exposing APIs or CLIs should include integration tests
- Place integration tests in
tests/_integration/directory - Integration tests verify end-to-end behavior of public interfaces
- Keep integration tests in the package that exposes the functionality
- Integration tests with costs, or involved setup, should be enabled through an environment variable
uv Scripts Guidelines
Guidelines for adhoc Python scripts in uv-managed projects. Use uv's inline script metadata (PEP 723) to ensure dependencies are source controlled and scripts are executable.
Declaring Script Dependencies
Use uv add --script to declare dependencies inline in the script file:
uv add --script script.py 'requests<3' 'rich'This adds inline metadata at the top of the script:
# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///
import requests
from rich.pretty import pprint
# ... rest of scriptExecutable Scripts with Shebang
For executable scripts, use the shebang format that works with uv:
#!/usr/bin/env -S uv run --script
#
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///
import httpx
# ... rest of scriptMake scripts executable with chmod +x script.py, then run directly: ./script.py
Running Scripts
- Use
uv run script.pyto execute scripts (uv automatically manages the environment) - Scripts with inline metadata ignore project dependencies (no need for
--no-projectflag) - Use
uv lock --script script.pyto create a lockfile (script.py.lock) for reproducibility
Best Practices
- Always declare dependencies inline for adhoc scripts to ensure they're source controlled
- Use shebang (
#!/usr/bin/env -S uv run --script) for executable scripts - Lock dependencies using
uv lock --scriptfor reproducibility - Specify Python version in metadata if required:
requires-python = ">=3.12"
References
Related skills
FAQ
What does the python dot-agent skill do?
The python skill from siviter-xyz/dot-agent instructs AI coding agents to handle Python development tasks including writing modules, refactoring functions, and resolving tracebacks using Python-specific conventions instead of generic coding guidance.
When should I enable the python skill?
Enable the python skill when your agent session focuses on Python source files, backend scripts, or package layout in a dot-agent workspace and you want turns constrained to Python idioms and project structure.