Architectural Code Quality Planning (LSP-Powered)
Analyze code quality using Claude Code's built-in LSP for semantic understanding. Generates architectural improvement plans.
Use the right tool:
- •Code quality improvements →
/code-quality-plan-creator(this command) - •New features/enhancements →
/plan-creator - •Bug fixes →
/bug-plan-creator
Arguments
File paths to analyze (one agent per file) OR a design file path:
- •Single file:
/code-quality-plan-creator src/services/auth_service - •Multiple files:
/code-quality-plan-creator src/agent src/hitl src/app - •Glob pattern:
/code-quality-plan-creator agent/* - •Design file:
/code-quality-plan-creator docs/designs/2025-01-15-auth-refactor-design.md
Tip: For complex refactoring or quality improvement efforts, use the brainstorming skill first to create a design document describing the quality goals and target files, then pass the design file path here.
Instructions
Step 1: Parse Input
The user invoked this skill with arguments: $ARGUMENTS
Determine the input type:
Design file detection — If the argument is a single file path ending in .md inside docs/designs/:
- •Use the Read tool to load the design file contents
- •Extract the list of target files from the design document
- •Proceed to Step 2 with the design file contents as additional context for each agent
File paths — Otherwise:
- •Extract file list from the arguments
- •Validate each path exists
Step 2: Launch Agents
For EACH target file, launch background agent:
If design file was provided:
Analyze code quality from design document: Target file: <file-path> Design document: <full design file contents>
REQUIRED Task tool parameters:
subagent_type: "code-quality-plan-creator-default" run_in_background: true prompt: "Analyze code quality from design document:\n\nTarget file: <file-path>\n\nDesign document:\n<full design file contents>"
If file paths were provided directly:
Analyze code quality: <file-path>
REQUIRED Task tool parameters:
subagent_type: "code-quality-plan-creator-default" run_in_background: true prompt: "Analyze code quality: <file-path>"
Launch ALL agents in a single message for parallel execution. Output a status message like "Analyzing N files..." and end your turn. The system wakes you when agents finish.
Step 3: Report Results
## Code Quality Analysis Complete (LSP-Powered) | File | Current | Projected | Issues | Changes Required | |------|---------|-----------|--------|------------------| | [path] | 6.8/10 | 9.2/10 | [N] | Yes | Plans: docs/plans/code-quality-*.md Next Steps: 1. Review plan files 2. Execute (loop or swarm are interchangeable): - `/plan-loop <plan-path>` or `/plan-swarm <plan-path>`
Example Usage
/code-quality-plan-creator src/agent src/hitl src/app /code-quality-plan-creator agent/* /code-quality-plan-creator src/services/auth_service /code-quality-plan-creator docs/designs/2025-01-15-auth-refactor-design.md