Awesome-omni-skill prnd-layered-python-code-reviewer
Review Python code changes with a focus on layered architecture boundaries, DI/DIP, configuration validation, typing quality (mypy/flake8 readiness), naming/docstring accuracy, and testability. Use when asked to “code review”, “PR review”, or “리뷰해줘” to prevent repeat feedback on architecture regressions and low-signal changes.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/prnd-layered-python-code-reviewer" ~/.claude/skills/diegosouzapw-awesome-omni-skill-prnd-layered-python-code-reviewer && rm -rf "$T"
skills/development/prnd-layered-python-code-reviewer/SKILL.mdLayered Python Code Reviewer
Overview
Provide a reusable code review workflow and checklist that applies across Python projects, especially ones that aim for layered architecture and dependency inversion. Produce actionable, concrete review comments (not vague style opinions).
Review Workflow
-
Identify the change scope
- Summarize touched modules and layers (example layers:
,domain/
,service/
,dataset/
,adapters/
).infra/ - Identify which changes are: (a) core policy/logic, (b) boundary I/O, (c) data shaping, (d) test-only.
- Summarize touched modules and layers (example layers:
-
Apply hard blockers first
- Dependency direction (DIP): low-level modules must not import high-level policy/service types.
- Public interfaces: avoid leaking raw
across layers; usedict
, dataclasses, or Pydantic models.TypedDict - Config correctness: validate invariants on load (range continuity, required keys, value bounds).
- Type/lint hygiene: fix
handling, unused variables, and anyNone
propagation caused by missing types.Any
-
Apply design-quality checks
- Composition root: wiring (ENV/config/I/O/client construction) stays at the boundary (
/entrypoint).create() - Separation of concerns: “build payload/message” vs “send request”, “decide” vs “orchestrate”.
- Test seams: time/randomness/I/O are injectable; core logic is deterministic.
- Composition root: wiring (ENV/config/I/O/client construction) stays at the boundary (
-
Write review output
- Group comments by:
,Architecture
,DIP/DI
,Typing
,Config
,Error handling
,Tests
.Naming/Docs - For each issue: state impact + preferred pattern + minimal change suggestion.
- Group comments by:
References
Load and apply:
for a project-agnostic checklist and comment templates.references/principles.md
for common “review-driven refactor” patterns (kept generic on purpose).references/review-themes.md
Optional Automation
If your project uses clear “layer folders” under a package root, run:
python scripts/check_layered_imports.py --root <package_root_dir> --package-name <top_level_package>
Use flags to match your project layout:
--layers domain,service,adapters,infra--forbid domain:service,adapters,infra--forbid adapters:service