From python-clean-architecture
Review code against Python Clean Architecture principles
npx claudepluginhub mktoronto/python-clean-architecture --plugin python-clean-architecturepathBefore starting the review, use AskUserQuestion to ask: "Which review depth?" with these options: 1. **Standard** — "Reviews against built-in checklists. No extra permissions needed." 2. **In-depth** — "Loads detailed reference files for deeper analysis with refactoring recipes and pattern guidance." Then review the code at `$ARGUMENTS` (or the current working directory if no path given) against Python Clean Architecture principles. ## Review Process 1. **Read the code** — Find and read ALL Python files in the target path recursively. Read every `.py` file — do not skip any. Understand t...
/review-architecturePerforms architecture review on specified scope or path, evaluating patterns, SOLID principles, scalability, security, technical debt, and API design.
/review-architectureDeep architecture review — evaluate system structure, boundaries, and evolution path
/review-architecture<!-- AUTO-GENERATED by export-plugins.py — DO NOT EDIT -->
/review-architectureArchitecture review covering design quality, performance, scalability, and API contracts in a single pass
/review-architectureCheck structural integrity, pattern consistency, and coupling in code changes.
/review-architectureStructured architecture review using ATAM-inspired quality attribute analysis
Before starting the review, use AskUserQuestion to ask: "Which review depth?" with these options:
Then review the code at $ARGUMENTS (or the current working directory if no path given) against Python Clean Architecture principles.
Read the code — Find and read ALL Python files in the target path recursively. Read every .py file — do not skip any. Understand the project structure, imports, and relationships between files.
Check architecture layers — Verify the three-layer separation:
DataInterface Protocol, not concrete DB classesCheck the 7 design principles — For each file/class/function, evaluate:
Check code quality — Apply the 22 design rules:
Check Pythonic patterns — Are patterns implemented the Pythonic way?
Check code cleanup opportunities — Look for concrete refactoring targets:
Report findings — Structure the output in this order:
Classify every Python file into a layer, then show the dependency flows. Use a simple vertical list format — never multi-column ASCII art. Example:
Layers
──────
API: routers/booking.py, routers/customer.py
Logic: operations/booking.py, operations/customer.py
Database: db/db_interface.py, db/models.py, db/database.py
Unclear: utils/helpers.py (mixed concerns)
Dependency Flows
────────────────
routers/booking.py → operations/booking.py → db/db_interface.py ✓
routers/customer.py → operations/customer.py → db/db_interface.py ✓
routers/admin.py → db/models.py ⚠ layer skip
Layer Violations
────────────────
⚠ routers/admin.py imports db/models.py directly — should go through operations
Adapt to the actual project. If it does not follow the three-layer model, show the dependency flow as-is and note what a target architecture would look like. Keep it compact — group similar flows rather than listing every file individually if there are many.
Call out specific things the code does right. Reference files and patterns. Examples:
This section builds trust and avoids a purely negative tone. Be specific — cite actual files and lines, not generic praise.
Present issues organized by severity:
For each finding, include all of the following:
Prioritize actionable cleanup suggestions over architectural observations.
If the user chose in-depth, load the following reference files for deeper analysis with detailed refactoring recipes and pattern guidance:
${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/design-principles.md${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/code-quality.md${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/error-handling.md${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/pythonic-patterns.mdFor detailed pattern guidance (when explaining HOW to fix), consult the relevant files in ${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/patterns/.
If the user chose standard, use only the checklists above — do not load reference files.