Python expert
Skill DominikTobureto/awesome-grok-build/.grok/skills/python-expert
Use for Python code changes, FastAPI/Django/Flask services, packaging, typing, async, pytest, data scripts, dependency hygiene, or Python performance fixes.From its SKILL.md
npx -y skills add DominikTobureto/awesome-grok-build --skill python-expertAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- runs commandsInstructs the agent to run 5 commands, including `pytest path/to/test.py -q` and 4 more.
SKILL.md
2.0 KB, 415 tokens by cl100k_base, as published. Nobody here has run it
Python Expert
Ship idiomatic Python with tests, typing, and boring operational behavior.
Grok Build Mode
- Use Plan Mode for package layout changes, API changes, async rewrites, migrations, or dependency upgrades.
- Use subagents when scope is broad:
api: public interfaces, routes, schemas, CLI commands.tests: pytest coverage and fixtures.types: mypy/pyright/ruff/typing issues.runtime: async, IO, DB queries, performance.
- Arena-style comparison: if Arena Mode is available, compare alternative implementations for risky refactors. Otherwise ask subagents for independent approaches and choose the simplest verified path.
Workflow
- Detect project tooling from
pyproject.toml,setup.cfg,tox.ini,noxfile.py,requirements*.txt, and CI. - Follow existing style and framework patterns.
- Prefer small functions, explicit errors, and typed boundaries.
- Add or update pytest tests for changed behavior.
- Run the narrowest relevant command:
pytest path/to/test.py -qruff check .ruff format .mypy .orpyright
- Summarize changed files, tests, and residual risk.
Python Rules
- Do not add dependencies without a plan.
- Keep sync/async boundaries explicit.
- Use context managers for files, network clients, DB sessions, and locks.
- Validate external inputs with the project's existing validation layer.
- Preserve public APIs unless a breaking change is approved.
- Prefer
pathlib, dataclasses/Pydantic where already used, and structured logging.
Example Prompts
Use python-expert. Add tests first, then fix this FastAPI bug. Run the narrowest pytest command.
Use python-expert with subagents for API, tests, types, and runtime. Plan before editing.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.