본문으로 건너뛰기
cccskills
무료GitHub에 공개

solid

SOLID design review rules (SRP, OCP, LSP, ISP, DIP) for code reviews: what counts as a real design finding, what is only taste, how to cite it and how severe it is. Use when reviewing a diff, a pull request or recent changes for design problems, when asked for a "SOLID review", "design review", "is this class doing too much", or when a review checklist asks for SOLID. Pair it with the dry skill for duplication and with owasp-asvs for security.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

SOLID Review

A design finding is worth reporting only when the design already costs something or will on the next ordinary change — a bug, an inconsistency, a change that has to touch many places, a unit that cannot be tested. Style, naming taste, "could be more elegant" and textbook purity are never findings.

Scope

Review the changed code and what it calls, read whole — not only the diff hunks. Judge the change against the conventions the repository already follows (its AGENTS.md/CLAUDE.md, existing seams and patterns). A repo that keeps small scripts procedural is not violating SOLID by doing so.

Rules

SRP — Single Responsibility

One unit (function, class, module, service) has to change for two unrelated reasons. Name both reasons in the finding.

  • Finding: an HTTP controller that validates input, builds SQL, renders e-mail and spawns a child process; a Drupal form submit handler that also syncs to a remote API.
  • Not a finding: a long function that does one thing in several steps.

OCP — Open/Closed

Adding the next variant (a check, a backend, a provider, a content type) requires editing a switch/if chain in several places instead of one registration point (a map, a plugin type, a tagged service, an event subscriber).

  • Cite every place the next variant would have to touch.
  • Not a finding: a single match in one place that is the registration point.

LSP — Liskov Substitution

An implementation that throws, no-ops or silently changes meaning for part of the contract it claims, so that callers must know which concrete class they have (instanceof checks, "not supported" exceptions, a subclass that ignores an argument).

ISP — Interface Segregation

Callers are forced to depend on methods they never use, or implementers must stub out half an interface. Cite the unused methods and the stubbing implementers.

DIP — Dependency Inversion

Business logic hard-wired to a concrete I/O dependency (network, filesystem, database, clock, child process, a static \Drupal::service() call inside a class that supports injection) so that it cannot be tested or swapped without it — where the codebase already has a seam for that dependency elsewhere (DI container, an injected client, a clock service). Without an existing seam, report it only if it already blocks a test the change needs.

Severity

  • high — the design problem has already produced a bug or an inconsistency you can point to (two branches of an if chain disagree, a stubbed method is called in production).
  • medium — default: the next ordinary change will have to touch several places or cannot be tested without real I/O.
  • low — cleanup that would help but costs nothing today.

Reporting a finding

Each finding carries:

  • rule — SRP, OCP, LSP, ISP or DIP;
  • location — file:line (every location for OCP);
  • cost — one sentence: what breaks or what the next change has to do because of it;
  • fix direction — the smallest change that removes the cost, preferring a seam the codebase already has over a new abstraction.

Verify each finding against the code before keeping it: re-read the lines and confirm the cost is real. Fewer, true findings beat a long list. A disagreement with the overall approach of a change is one finding, not a rewrite.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Safe deployment workflow for Drupal 10/11 sites: pre-flight checks, backup, the correct update sequence (composer install, database updates, config import, cache rebuild), verification, and rollback plan. Use when deploying to any environment, releasing to production, or when the user asks to "push changes live", "update the server", or run a release. Also use for multisite releases where each site needs its own database update pass.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

Use this skill when authoring or editing Docker Compose files (compose.yaml / docker-compose.yml), running multi-container stacks, or containerizing a Drupal/PHP application — e.g. "set up a local Drupal stack with nginx and MariaDB", "add Redis to my compose file", "why won't my containers start", "split dev and prod compose configuration". Also trigger for compose commands (up, down, logs, exec, watch) and healthcheck/dependency issues between services.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

Use this skill when running local AI models with Docker Model Runner — the `docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model from the ai/ namespace", "connect my app to a local model", "use a local model as backend for the Drupal AI module", or when wiring the `models:` top-level element into a compose.yaml. Covers pulling/running models, OpenAI-compatible endpoints, and Compose integration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

Use for operational Drupal 11 workflows in DDEV environments, including safe updates, backup-first procedures, and troubleshooting commands.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

Use when creating or extending Drupal 11 custom modules, including scaffolding, service architecture, and dependency injection best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

Use when auditing Drupal 11 custom modules/themes for security issues such as unsafe input handling, XSS risks, SQL injection, and access control gaps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

siva01c/claude-plugins162026년 9월 26일 업데이트

siva01c의 스킬 모두 보기

이 스킬의 문제 신고