Write, refactor, and review Python for clarity, explicit behavior, local reasoning, strong types, and minimal abstraction. Use when creating or changing nontrivial Python, simplifying object-heavy or helper-heavy code, evaluating whether code is Pythonic, or reviewing Python maintainability in Basic Memory repositories.
70
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Write Python that makes domain behavior obvious to human and AI readers. Apply a WWGD lens: choose the simplest correct design that feels native to Python and is easy to verify.
AGENTS.md or CLAUDE.md instructions.docs/ENGINEERING_STYLE.md when present.docs/DOMAIN_MODEL.md when the change touches domain language, ownership, identity,
source-of-truth rules, or lifecycle behavior.Let local project rules override generic style advice.
functools.partial when binding behavior is clearer than creating
another object.functools.singledispatch only when behavior genuinely varies by the first argument's
runtime type and open registration is an intentional extension point.Protocol for genuine replaceable behavior. Do not use property-only protocols to
describe internal result data; return a concrete frozen dataclass unless callers truly require
structural interoperability.Do not replace one class hierarchy with clever functional machinery. Prefer the form with the fewest concepts, hidden rules, and call hops.
_prepare_*, _resolve_*, _apply_*, and _build_* calls as a prompt to
reconsider the data flow or name one meaningful phase object.If extracting a helper makes the reader navigate more but understand no less, keep the logic local.
Any, broad casts,
speculative getattr, or unstructured dictionaries.Establish the contract and domain values first. Implement the direct path, then add only the abstractions required by real variation, state, or boundaries.
Preserve observable behavior, keep the diff focused, and add or update a regression test when the behavior is risky. Do not mechanically rewrite already-clear code to apply an idiom.
Report concrete readability, abstraction, typing, lifecycle, and domain-model risks. Explain the smallest practical improvement. Do not edit unless the user asks for fixes.
Run the narrowest command that proves the change, then widen according to risk:
Lead the final response with the outcome and verification. Explain design choices only when they are non-obvious or materially affect future work.
cb95e59
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.