| name | solid-review |
| description | Use when the user wants SOLID design-principles code review โ evaluating SRP / OCP / LSP / ISP / DIP compliance on a target file/directory/glob. Triggers on `/solid-review`, "SOLID review", "design review", "design principles", "SOLID ๊ฒ์ฆ", "๋์์ธ ๋ฆฌ๋ทฐ", "์์น ๊ฒ์ฆ", or auto-invocation by `/deep-test` as the Advisory Quality Gate (does not block). Review-only โ does NOT modify code. Saves results to `$WORK_DIR/solid-review.md` when in workflow mode. |
| user-invocable | true |
Invocation
์ด ์คํฌ์ ๋ ๊ฐ์ง ๊ฒฝ๋ก๋ก ํธ์ถ๋ฉ๋๋ค โ ์ด๋ ์ชฝ์ด๋ ๋ณธ SKILL ๋ณธ๋ฌธ์ ์ ์ฐจ๋ฅผ ๊ทธ๋๋ก ์คํํฉ๋๋ค:
- Claude Code ์ฌ๋์ โ ์ฌ์ฉ์๊ฐ
/solid-review [args...] ์
๋ ฅ (skill ์ user-invocable: true ๊ฐ ์ฌ๋์ ์ง์
์ ํ์ฉ).
- ํ ์์ด์ ํธ / Codex / Copilot CLI / Gemini CLI / SDK โ
Skill({ skill: "deep-work:solid-review", args: "..." }) ํํ๋ก ๋ช
์ invoke (cross-platform ํ์ค ๊ฒฝ๋ก).
๋ ๊ฒฝ๋ก ๋ชจ๋ args ๋ ๋์ผํ ํ ํฐ ๋ฌธ์์ด๋ก ์ ๋ฌ๋๋ฉฐ, ๋ณธ๋ฌธ ($ARGUMENTS ์๋ฆฌ) ์ ํ์๊ฐ ๋์ผํ๊ฒ ์ฒ๋ฆฌํฉ๋๋ค.
Inputs (skill args)
| ์ธ์ | ์๋ฏธ |
|---|
| (์์) | Auto-detect scope: ํ์ฑ ์ธ์
์ changed files, ์์ผ๋ฉด ํ์ฌ ๋๋ ํฐ๋ฆฌ |
<target> | File path / directory / glob pattern |
๋น args / ๋งค์นญ๋์ง ์๋ ํ ํฐ โ ๋ณธ๋ฌธ์ default ๋ถ๊ธฐ๋ก ์ง์
.
Prerequisites
์ด entry skill ์ deep-work-orchestrator (Phase dispatch) ๋ฐ deep-work-workflow (reference skill โ Phase ๊ท์ฝ/Exit Gate/M3 envelope) ์ ํจ๊ป ๋์ํฉ๋๋ค. ํ์ฑ deep-work ์ธ์
์ด ์์ ๋๋ ์ธ์
state file (.claude/deep-work.<SESSION_ID>.md) ์ ๋ณ์ (work_dir, current_phase, active_slice ๋ฑ) ๋ฅผ ์ฝ์ด ๋์ํ๋ฉฐ, ์ธ์
์ธ๋ถ์์๋ standalone ์คํ์ด ๊ฐ๋ฅํ ๊ฒฝ์ฐ ๋ณธ๋ฌธ์ ๋ถ๊ธฐ๋ฅผ ๋ฐ๋ฆ
๋๋ค.
Cross-platform self-containment: Claude Code ์์๋ sibling skill ์ด description ๋งค์นญ์ผ๋ก ์๋ ๋ก๋๋ฉ๋๋ค. Codex / Copilot CLI / Gemini CLI / Agent SDK ์์ Skill() ๋ก ํธ์ถ ์ sibling auto-load ๋ณด์ฅ์ด ์ฝํ ์ ์์ผ๋ฏ๋ก, ๋ณธ๋ฌธ์ self-contained ์ผ๋ก ๋ณด์กด๋์ด ์์ต๋๋ค โ state file ํด์, $ARGUMENTS ํ์ฑ, AskUserQuestion ๋ถ๊ธฐ, ์ถ๋ ฅ ํฌ๋งท์ด ์ธ๋ผ์ธ.
Quality Gate (v6.2.4) โ /deep-test๊ฐ Advisory Gate๋ก ์๋ ์คํํฉ๋๋ค. ํน์ ํ์ผ/๋๋ ํฐ๋ฆฌ์ ๋ํ ๋
๋ฆฝ SOLID ๊ฒ์ฆ์ด ํ์ํ ๋ ์ง์ ์ฌ์ฉํ์ธ์.
Standalone: /solid-review [target]
SOLID Design Review
You are performing a SOLID Design Review โ analyzing code against the 5 SOLID design principles to evaluate design quality and suggest improvements.
Language
Detect the user's language from their messages or the Claude Code language setting. Output ALL user-facing messages in the detected language. The display templates below use Korean as the reference format โ translate naturally to the user's language while preserving emoji, formatting, and structure.
Critical Constraints
- DO NOT modify any code files. This is a review-only operation.
- Read, analyze, and report findings.
- Save review results to file when in workflow mode.
Instructions
1. Determine operating mode
Resolve the current session's state file:
- If
DEEP_WORK_SESSION_ID env var is set โ .claude/deep-work.${DEEP_WORK_SESSION_ID}.md
- If
.claude/deep-work-current-session pointer file exists โ read session ID โ .claude/deep-work.${SESSION_ID}.md
- Legacy fallback โ
.claude/deep-work.local.md
Set $STATE_FILE to the resolved path.
Check if $STATE_FILE exists and has an active session (current_phase is not idle and not empty).
Workflow Mode (active deep-work session):
- Read
work_dir from the state file
- Set
WORK_DIR to the value of work_dir
- Read
$WORK_DIR/plan.md to extract the list of files to review (from "Files to Modify" section)
- Read
$WORK_DIR/research.md for architectural context (Executive Summary section only)
- Review scope: files listed in plan.md that were actually modified during implementation
Standalone Mode (no active session):
- If
$ARGUMENTS is provided: use as target (file path, directory, or glob pattern)
- If
$ARGUMENTS is empty: detect scope automatically:
- Check
git diff --name-only HEAD~1 for recently changed files
- If not a git repo or no changes, use current directory
- Review scope: all code files in detected scope (exclude node_modules, .git, pycache, build, dist, etc.)
2. Collect review targets
Gather the list of files to review. For each file:
- Read the file contents
- Skip files that are clearly not code (README.md, .json config, .env, etc.)
- Skip files smaller than 5 lines (trivial)
- Skip auto-generated files (migrations, lock files, bundled output)
If the total number of files exceeds 20, prioritize:
- Files with the most lines of code
- Files with class/interface definitions
- Files explicitly listed in plan.md (workflow mode)
Display progress:
SOLID ๋ฆฌ๋ทฐ ๋์: [N]๊ฐ ํ์ผ
- src/auth/service.ts (245 lines)
- src/models/user.ts (180 lines)
- ...
3. Analyze each principle
For each file (or logical group of related files), evaluate against all 5 SOLID principles.
Read ${CLAUDE_PLUGIN_ROOT}/skills/shared/references/solid-guide.md for the detailed checklist.
Analysis approach:
- Do NOT mechanically check every rule against every file
- Focus on violations that actually matter in the given context
- Consider the project's scale and maturity (KISS balance)
- A small utility script doesn't need DIP โ flag it only in core domain logic
For each principle, assign one of:
- ์ค์: No violations found, or principle is not applicable
- ๊ฐ์ ๊ถ์ฅ: Minor violations that would improve maintainability
- ์๋ฐ: Clear violations that will cause maintenance problems
4. Generate scorecard
Per-file scorecard (for each reviewed file):
### [filename] ([N] lines)
| ์์น | ์ํ | ์์ฝ |
|------|------|------|
| SRP | [status] | [1-line summary] |
| OCP | [status] | [1-line summary] |
| LSP | [status] | [N/A or finding] |
| ISP | [status] | [1-line summary] |
| DIP | [status] | [1-line summary] |
Overall scorecard:
## ์ข
ํฉ SOLID ์ค์ฝ์ด์นด๋
| ์์น | ์ ์ฒด ์ํ | ์๋ฐ ํ์ผ ์ | ํต์ฌ ๋ฐ๊ฒฌ |
|------|----------|-------------|----------|
| SRP | [status] | N/M | [most common issue] |
| OCP | [status] | N/M | โ |
| LSP | [status] | N/M | โ |
| ISP | [status] | N/M | [most common issue] |
| DIP | [status] | N/M | [most common issue] |
**์ด์ **: N/5 ์์น ์ค์
**ํ์ **: ๊ฐ์ ๊ถ์ฅ (Advisory โ ์ํฌํ๋ก์ฐ ์ฐจ๋จ ์์)
5. Generate refactoring suggestions
For each violation or improvement finding, provide a concrete refactoring suggestion. Limit to top 5 suggestions sorted by impact:
## ๋ฆฌํฉํ ๋ง ์ ์
### 1. [SRP] PlayerController.cs โ ์ฑ
์ ๋ถ๋ฆฌ
**ํ์ฌ**: ์ด๋, ์
๋ ฅ, UI ์
๋ฐ์ดํธ๊ฐ ํ ํด๋์ค์ ํผ์ฌ
**์ ์**: PlayerMover, PlayerInput, PlayerUI๋ก ๋ถ๋ฆฌ
**์ฐ์ ์์**: ๋์
### 2. [DIP] AuthService.ts โ ์ถ์ํ ๋์
**ํ์ฌ**: `new DatabaseClient()` ์ง์ ์์ฑ
**์ ์**: `IDatabaseClient` ์ธํฐํ์ด์ค ์ถ์ถ, ์์ฑ์ ์ฃผ์
**์ฐ์ ์์**: ์ค๊ฐ
6. AI ํ๋กฌํํธ ๊ฐ์ ์ ์ (์ํฌํ๋ก์ฐ ๋ชจ๋, ์ ํ์ )
If running in workflow mode and clear SOLID violations were found, read ${CLAUDE_PLUGIN_ROOT}/skills/shared/references/solid-prompt-guide.md and suggest how plan.md could be improved:
## AI ํ๋กฌํํธ ๊ฐ์ ์ ์
๋ค์ plan ์์ฑ ์ ์๋ ์กฐ๊ฑด์ ์ถ๊ฐํ๋ฉด SOLID ์๋ฐ์ ์ฌ์ ์ ๋ฐฉ์งํ ์ ์์ต๋๋ค:
- "๊ฐ ํด๋์ค๋ ๋จ์ผ ์ฑ
์๋ง ๋ด๋นํ๋๋ก ๋ถ๋ฆฌํ ๊ฒ (SRP)"
- "์ ๊ธฐ๋ฅ ์ถ๊ฐ ์ ๊ธฐ์กด ์ฝ๋ ์์ ์์ด ํ์ฅ ๊ฐ๋ฅํ ๊ตฌ์กฐ๋ก ์ค๊ณํ ๊ฒ (OCP)"
- "๊ตฌ์ฒด ํด๋์ค ๋์ ์ธํฐํ์ด์ค์ ์์กดํ๋๋ก ๊ตฌํํ ๊ฒ (DIP)"
7. Save results
Workflow Mode:
- Write results to
$WORK_DIR/solid-review.md
- Display summary in terminal
Standalone Mode:
- Display full results in terminal
- Ask user: "๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ๋ฅผ ํ์ผ๋ก ์ ์ฅํ ๊น์? (๊ธฐ๋ณธ: ์๋์ค)"
- If yes, save to
./solid-review.md
8. Workflow integration (workflow mode only)
If called as a Quality Gate during Test phase:
- Record results in
quality-gates.md as Advisory entry
- Violations do NOT block the workflow โ record warning only
If called outside the Test phase:
- Still run the review
- Note: "deep-work ์ํฌํ๋ก์ฐ ํ์ฑ ์ํ โ ๊ฒฐ๊ณผ๊ฐ $WORK_DIR/solid-review.md์ ์ ์ฅ๋ฉ๋๋ค"