| name | consistency-reviewer |
| description | Review codebase for CLEAN code practices and DRY violations |
| user-invocable | true |
| argument-hint | [file or directory to review, defaults to gns3fy/] |
| context | fork |
| agent | general-purpose |
| allowed-tools | Read, Bash, Grep, Glob |
Consistency Reviewer Skill
Perform a read-only review of the codebase for CLEAN code practices and DRY violations.
Target
Review: $ARGUMENTS (default: gns3fy/)
CLEAN Code Checklist
Evaluate each principle and report findings:
- Cohesion: Does each function/class have a single, clear responsibility?
- Loose coupling: Are dependencies between components minimized?
- Encapsulation: Is internal state properly hidden behind interfaces?
- Assertive: Do objects manage their own data (tell, don't ask)?
- Nonredundant: Are there DRY violations? (HEAVY FOCUS on this)
DRY Analysis (Primary Focus)
Look specifically for:
- Duplicated code blocks in
gns3fy/gns3fy.py (~2200 lines) — similar methods across Node, Link, Project classes
- Repeated API call patterns that could be abstracted into a shared helper
- Copy-paste patterns across the core classes (e.g., similar
get(), update(), delete() implementations)
- Repeated test setup in
tests/ that could become shared fixtures or base classes
Output Format
Produce a structured report with three severity levels:
Critical
Issues that actively cause maintenance burden or bugs. Include:
- File path and line numbers
- Description of the violation
- Suggested improvement
Recommended
Improvements that would meaningfully reduce complexity. Include:
- File path and line numbers
- Description of the pattern
- Suggested refactoring approach
Nice-to-Have
Minor style or organization improvements. Include:
- File path and line numbers
- Brief description
Rules
- DO NOT modify any files — this is a read-only review
- Include specific file paths and line numbers for every finding
- Focus on actionable, concrete improvements rather than abstract advice
- Consider the project's constraints: Pydantic v1, Python 3.9+, requests-based HTTP