From devkit
Use when writing, editing, reviewing, refactoring, testing, packaging, or fixing diagnostics in Python codebases.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devkit:friendly-pythonThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write Python that is easy to read, easy to change, easy to test, and hard to misuse.
references/advanced-patterns.mdreferences/anti-patterns.mdreferences/boundary-layer-exceptions.mdreferences/diagnostic-workflow.mdreferences/examples.mdreferences/fix-patterns.mdreferences/package-layout-patterns.mdreferences/project-types.mdreferences/project-workflow.mdreferences/readability-contract.mdreferences/review-checklist.mdreferences/task-playbooks.mdreferences/tool-codes.mdWrite Python that is easy to read, easy to change, easy to test, and hard to misuse.
This skill optimizes for maintainability before cleverness. Tools, types, tests, and formatting exist to protect readable code. If code is unreadable, everything else is secondary.
Treat Python as engineering code, not a demo language. Dynamic typing is not permission to pass vague shapes around. Production Python should make concepts, boundaries, and failure modes explicit.
Style north star: direct, explicit Python engineering. Prefer clear modules, intentional public surfaces, concrete names, readable imperative flow, precise errors, and minimal magic. Clarity beats ceremony.
Use for any Python work:
.py / .pyi filesDo not use this to impose a new toolchain on a project unless the task is explicitly project setup or cleanup.
Before editing, build the minimum useful map:
uv.lock, poetry.lock, pdm.lock, Pipfile, tox.ini, noxfile.py, pyproject.toml, requirements*.txt.pyproject.toml, pyrightconfig.json, mypy.ini, ruff.toml, pytest.ini.references/project-types.md and the playbook from references/task-playbooks.md.Follow the project first. Improve quality inside the task boundary.
| Task | Path |
|---|---|
| Bug fix | Reproduce or locate failing behavior, make the smallest readable fix, add or update behavior test, verify regression path |
| Type/lint diagnostics | Classify errors, fix source types before symptoms, avoid Any/ignore spread, run native checker |
| Feature | Define observable behavior, add minimal test or acceptance check, implement cleanly, verify public surfaces |
| Refactor/cleanup | Preserve behavior, improve names/boundaries/control flow, keep diff scoped, run existing tests |
| New Python project | Choose the smallest viable toolchain, create clear package/CLI/test structure, add lint/type/test baseline |
| Library/API change | Protect public imports, compatibility, __all__, py.typed, changelog/docs, downstream ergonomics |
| Tests | Test behavior and boundaries, not private implementation trivia; remove duplicated setup noise |
Detailed paths live in references/task-playbooks.md.
Code is not done until the next maintainer can scan it safely.
Before delivery, Python code must be:
dict/tuple chains.Cleanliness rules:
utils.py.See references/readability-contract.md for examples and code smells.
These are defects unless there is an explicit project constraint:
Any, bare dict, bare list, or unstructured JSON through core logic.# type: ignore, bare # noqa, or broad suppressions.Prefer explicit, boring Python:
dataclass, TypedDict, Protocol, Literal, and small value objects for real concepts.X | None over Optional[X] when the project supports it.list[str], dict[str, int], tuple[str, ...].__init__.py.__all__ and docs.__init__.py when the project uses regular packages; remove only when namespace packages are deliberate.logger.info("Saved %s", path), not logging f-strings.Detailed typing and package guidance:
references/package-layout-patterns.mdreferences/advanced-patterns.mdreferences/boundary-layer-exceptions.mdChoose commands from the project, not from memory. Use references/project-workflow.md.
Verification ladder:
If dependencies or tools are missing, say what is missing and run the smallest honest check available, such as:
python -m compileall src
python -m pytest path/to/test.py
uv run pytest
poetry run pytest
Do not claim completion without reporting what was verified.
Before final response, run the review checklist in references/review-checklist.md mentally or explicitly for non-trivial Python changes.
When given diagnostics:
Use references/diagnostic-workflow.md and references/tool-codes.md.
Stop and restructure when you see:
Any or ignore.Use references/anti-patterns.md for unacceptable shapes that require return-to-work.
| Need | Reference |
|---|---|
| Identify project shape | references/project-types.md |
| Choose project commands | references/project-workflow.md |
| Pick a task path | references/task-playbooks.md |
| Judge readability | references/readability-contract.md |
| Stop-worthy anti-patterns | references/anti-patterns.md |
| Fix diagnostics | references/diagnostic-workflow.md, references/tool-codes.md |
| Package/import layout | references/package-layout-patterns.md |
| Boundary exceptions | references/boundary-layer-exceptions.md |
| Advanced typing | references/advanced-patterns.md |
| Fix examples | references/fix-patterns.md |
| Good/bad code examples | references/examples.md |
| Pre-delivery review | references/review-checklist.md |
npx claudepluginhub zhpeng24/devkit --plugin devkitProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.