pyhd
SKILL.md
Pyhd (Python Development)
Overview
This skill enforces a rigorous development workflow for Python projects, centering on the ruff linter and formatter. It ensures that all code changes are automatically formatted and linted to meet industry standards. It also provides guidance on accessing documentation.
Core Workflow
When editing Python files, you MUST follow this cycle for EVERY file modification:
- Read & Understand:
- Read the file content to understand the context.
- If using external packages, verify their API first (see "Documentation" below).
- Edit:
- Apply your changes using
smart_editorreplace.
- Apply your changes using
- Sanitize (Ruff):
- Immediately after editing, run the following commands to format and fix linting issues:
uv run ruff check --fix <filename> uv run ruff format <filename> - If
ruffreports errors that cannot be automatically fixed, you MUST fix them manually before proceeding.
- Immediately after editing, run the following commands to format and fix linting issues:
- Verify:
- Run tests to ensure your changes didn't break functionality.
Documentation
Before using a Python package or library, you MUST ensure you are using the correct API.
- Search Online: Use
google_web_searchto find the official documentation.- Query format:
python <package_name> documentationorpython <package_name> <function_name> usage.
- Query format:
- Inspect Installed Packages:
- If the package is installed, you can inspect it in the virtual environment (e.g.,
.venv/lib/python3.x/site-packages/<package>).
- If the package is installed, you can inspect it in the virtual environment (e.g.,
- Use
help():- You can run a one-off script to print help:
uv run python -c "import <package>; help(<package>.<symbol>)"
- You can run a one-off script to print help:
Best Practices
See best_practices.md for detailed coding standards and idiomatic Python patterns.
Weekly Installs
2
Repository
danicat/skillsGitHub Stars
3
First Seen
9 days ago
Security Audits
Installed on
opencode2
kilo2
gemini-cli2
antigravity2
windsurf2
claude-code2