component-review
Skill0 starsChanged 5 months agoMITView on GitHub
Review low-level component and class design — SOLID, cohesion, pattern correctness, interface design, method contracts, aggregate integrity, and domain-model health inside a PR, branch, namespace, or module. Make sure to use this skill whenever the user asks to review class design, check SOLID, audit a component, check if a pattern is used correctly, or says things like "component review", "class review", "prüfe das klassen design", "are these classes clean", "review the service", "solid check". Use this skill for DETAIL REVIEW only — module boundaries and dependency structure belong in `architecture-review`.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- LeonxLJX/web-engineer-skillstheir own version, first seen Sep 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- LeonxLJX/web-engineer-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-context-initSkill
- agent-context-updateSkill
- architecture-designSkill
- architecture-reviewSkill
- atom-operating-modelSkill
- branch-reviewSkill
- component-designSkill
- full-project-reviewSkill
- obsidianSkill
- oss-readinessSkill
- reproduce-first-debugSkill
- review-and-fixSkill
- session-handoffSkill
- tech-gazetteSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Check in order, stop at first hit:
- Distinctive: line 66
Never block on missing context — infer from surrounding code.
- Distinctive: line 72
Read nearby tests to understand the real contract
- Very specific: line 76
Use WebFetch or Context7 for version-sensitive rules:
- Distinctive: line 81
Don't apply generic OO dogma if the ecosystem has moved on.
- Very specific: line 85
Run each relevant check and record findings with file:line:
- Distinctive: line 99
Do subclasses honor the parent contract (no surprise throws, no empty overrides)?
- Distinctive: line 109
If a named pattern is used, is it used correctly?
- Distinctive: line 190
Read-only: Never modify source files.
- Very specific: line 191
Detail level only: If the findings are really about module boundaries, recommend architecture-review.
- Very specific: line 192
Evidence-based: Every finding needs a concrete file:line reference.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Component Review (Detail Level)
Audit class- and method-level design of a scoped target. Report findings — never modify code.
Scope
In scope: SOLID (per class), cohesion inside a class, pattern correctness, interface segregation, method signatures, aggregate invariants, error model, testability seams, naming that leaks abstractions.
Out of scope: module boundaries, dependency cycles, layer violations (→ architecture-review), code formatting, style, line-level null checks.
Examples
# Review a PR's component design
/component-review pr 42
# Review a branch
/component-review branch feat/order-service
# Review a specific namespace/module
/component-review namespace src/Order
# Review current uncommitted changes
/component-reviewWorkflow
flowchart TD
A["Parse target mode"] --> B["Load project context"]
B --> C["Detect stack + idioms"]
C --> D["Research current patterns"]
D --> E["Run checks"]
E --> F["Report findings"]Phase 1: Parse Target
From $ARGUMENTS:
pr <N>→gh pr diff <N>,gh pr view <N> --json headRefName,files, read files viagit show <branch>:<file>branch <name>→git diff main...<name>, read files from branchnamespace <path>→ recursive read under<path>- empty →
git diff HEADfor uncommitted changes
Phase 2: Load Project Context
Check in order, stop at first hit:
.agent-context/layer1-bootstrap.md,layer2-project-core.md.agent-context/decisions.json→ ADRs that constrain class designdocs/architecture/**/*.mdCLAUDE.md,AGENTS.md,CONTRIBUTING.md- Manifest files for stack detection
Never block on missing context — infer from surrounding code.
Phase 3: Detect Stack & Idioms
- Language, framework, version from manifests
- Existing patterns in surrounding files — the review baseline is the codebase's own conventions, not abstract ideals
- Read nearby tests to understand the real contract
Phase 4: Research Current Best Practices
Use WebFetch or Context7 for version-sensitive rules:
- Framework DI and lifecycle (Symfony, Spring, NestJS)
- Language-specific idioms (Go error wrapping, Rust ownership, Vue Composition API, Java sealed types)
Don't apply generic OO dogma if the ecosystem has moved on.
Phase 5: Checks
Run each relevant check and record findings with file:line:
1. Single Responsibility (per class)
- Can you describe the class in one sentence without "and"?
- Are private methods clearly serving one public contract?
2. Open/Closed & Extensibility
- Are new variants added via new types, or by editing the same class?
- Flag
switchon type tags or string enums that will keep growing.
3. Liskov & Interface Segregation
- Do subclasses honor the parent contract (no surprise throws, no empty overrides)?
- Are interfaces narrow enough that callers only depend on what they use?
4. Dependency Inversion
- Are collaborators injected, or instantiated with
new? - Are infrastructure concerns leaking into domain classes?
5. Pattern Correctness
- If a named pattern is used, is it used correctly? (Strategy without behavior variation = not a Strategy)
- Is there a simpler pattern or plain function that would do?
6. Cohesion Inside a Class
- Fields only used by some methods → hint of hidden class
- Temporal coupling (must call A before B) → signal for missing abstraction
7. Method Signatures
- Boolean flags that toggle behavior → two methods instead
- Primitive obsession → candidate for a value object
- Output parameters, tuple returns that should be a type
8. Aggregate / Invariant Integrity
- Can domain invariants be violated by calling methods in a legal order?
- Are mutations funneled through the aggregate root?
9. Error Model
- Exceptions vs. result types — consistent with the codebase?
- Are errors silently swallowed or generically re-thrown?
10. Testability Seams
- Can the class be tested without patching globals or network?
- Are seams (ports, factories) at sensible places?
11. Naming That Leaks
- Names that reveal the wrong abstraction (
OrderManager,UserUtil,DataHelper) → symptom of unclear responsibility
Phase 6: Report
Host-rendered findings (optional, in addition to the report below)
Some hosts render findings as a typed, clickable list (Claude Code: ReportFindings). Feature-detect it; if absent, skip silently and note host rendering: not available under Files reviewed.
Component findings qualify only when they name a file and line and a concrete failure scenario — an LSP violation that throws on a legal subtype, a mutable default that leaks state between calls. Pure design judgements (naming, cohesion, pattern fit) stay in the Markdown report. Never invent a failure scenario to make a design finding eligible. Emit once, most-severe first, after the checks are complete; do not repeat those entries as chat text.
Report
Output in the user's language:
## Component Review — <scope>
**Risk Level:** LOW | MEDIUM | HIGH | CRITICAL
**Detected stack:** <stack>
**Files reviewed:** <N>
## Critical (must fix)
- **<Title>** — `path/to/file.ext:line`
- Problem: <what is wrong>
- Principle: <SRP / LSP / DIP / …>
- Suggested direction: <high-level fix, not code>
## Warnings (should fix)
- ...
## Suggestions (nice to have)
- ...
## Patterns Observed
- <Pattern> — used correctly / misused / missing
## Suggested Next Steps
1. ...
2. ...Rules
- Read-only. Never modify source files.
- Detail level only. If the findings are really about module boundaries, recommend
architecture-review. - Evidence-based. Every finding needs a concrete
file:linereference. - Respect local idioms. Match the codebase's existing style — don't import dogma from another ecosystem.
- Severity over volume. Fewer high-signal findings beat many nitpicks.
- Ignore style. Linters and formatters own formatting.
- Fallback, don't block. Missing context layers → infer from code.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

