inceptyon-labs/tenet-skills/tenet-solid
Claude Code and agent skill by inceptyon-labs/tenet-skills
- community
Checking that the SKILL.md file is still in the repository.
Audits SOLID design risks: responsibility, substitution, interfaces, dependency direction.
Install
npx vskill@latest install inceptyon-labs/tenet-skills/tenet-solidSKILL.md
The same SKILL.md was published earlier as inceptyon-labs/tenet-skills/tenet-solid.
Tenet SOLID — Design Principles Audit
Evaluates adherence to the five SOLID design principles across the codebase. Identifies god classes, type-switching anti-patterns, contract violations, fat interfaces, and misplaced concrete dependencies.
Purpose
This skill assesses whether the codebase follows the SOLID design principles — five guidelines that, when followed, produce code that is easier to extend, test, and maintain:
- S — Single Responsibility Principle (SRP): A class should have one reason to change
- O — Open/Closed Principle (OCP): Software entities should be open for extension but closed for modification
- L — Liskov Substitution Principle (LSP): Subtypes must be substitutable for their base types without breaking correctness
- I — Interface Segregation Principle (ISP): No client should be forced to depend on methods it does not use
- D — Dependency Inversion Principle (DIP): High-level modules should depend on abstractions, not concrete implementations
SOLID violations make code rigid, fragile, and resistant to change. They are leading indicators of future bugs when requirements evolve.
Calibration — read first
Follow shared/scan-discipline.md (complete every step, enumerate rather than sample, and §2a: report only issues that actually exist), shared/verification.md (every finding is confirmed against the code before it ships; unconfirmed candidates are dropped, not demoted), and shared/severity.md (severity is confirmed impact, never a hedge for doubt).
A finding must exist in this codebase on a path that can run. Do not report hypotheticals, dead code, style preferences, or anything an upstream check already prevents. Zero findings for a step is the normal result on healthy code; do not fill a step to show you looked. Do not overthink it: read the code and its context, decide, move on.
Language Support Matrix
Toolchain Inputs
This skill does NOT consume toolchain output. All analysis is judgment-based, performed by reading source code and reasoning about design structure.
The only toolchain file consumed is:
.healthcheck/toolchain/language-census.json— to determine which languages are present and route analysis accordingly
Rubric
SRP — Single Responsibility Principle
| Condition | Severity | Rationale | |
|---|---|---|---|
| Class has 3-4 distinct responsibility groups | minor | Cohesion is weakening; consider splitting on next change | |
| Class has 5-6 distinct responsibility groups | major | God class emerging; actively harms maintainability | |
| Class has 7+ distinct responsibility groups | critical | God class; virtually untestable in isolation | |
| File mixes domain logic with infrastructure concerns | minor | Separation of concerns violation | |
| Single function/method handles 3+ unrelated tasks | minor | Function-level SRP violation |
Responsibility detection method:
Group methods by semantic clusters based on naming patterns and behavior:
| Cluster Name | Method Patterns | |
|---|---|---|
| Data access | fetch*, load*, read*, query*, find*, get*FromDb, save*, persist*, insert*, update*, delete*, remove* | |
| Presentation | render*, display*, format*, toString, toHTML, toJSON, print*, draw* | |
| Validation | validate*, check*, verify*, is*, has*, can*, assert*, ensure* | |
| HTTP/API | handle*, route*, middleware*, respond*, request*, endpoint* | |
| Business logic | process*, calculate*, compute*, apply*, execute*, run*, perform* | |
| Notification | notify*, send*, email*, alert*, publish*, emit*, dispatch* | |
| Auth/Security | authenticate*, authorize*, login*, logout*, encrypt*, decrypt*, hash* | |
| Caching | cache*, invalidate*, evict*, memoize*, warm* | |
| Logging/Monitoring | log*, trace*, metric*, track*, audit*, measure* | |
| Configuration | configure*, setup*, init*, bootstrap*, register* |
A class with methods spanning 3+ clusters is flagged as an SRP violation.
OCP — Open/Closed Principle
| Condition | Severity | Rationale | |
|---|---|---|---|
| Switch/if-else chain on type discriminator (3-4 cases) with behavior per case | minor | Should use polymorphism; adding a new type requires modifying this code | |
| Switch/if-else chain on type discriminator (5-7 cases) | major | Modification magnet; every new type touches this function | |
| Switch/if-else chain on type discriminator (8+ cases) | critical | Extreme OCP violation; refactor to strategy/visitor pattern | |
instanceof/typeof checks driving different behavior branches | minor | Type-checking anti-pattern; use polymorphism or pattern matching |
Detection method:
- Find
switchstatements andif/else ifchains where the discriminant is a type field, enum, orinstanceof/typeof/is/ascheck - Count the number of cases/branches
- Exclude: exhaustive pattern matching in functional languages (Rust
match, Haskellcase), Redux reducers, serialization/deserialization code, factory functions (which are the OCP-compliant solution)
LSP — Liskov Substitution Principle
| Condition | Severity | Rationale | |
|---|---|---|---|
Override that throws NotImplementedError / UnsupportedOperationException | major | Breaks substitutability — callers cannot rely on the base contract | |
| Override that narrows parameter types (contravariance violation) | major | Subtype rejects inputs the base type accepts | |
| Override that widens return types or changes error semantics | minor | Subtle contract breakage; may cause runtime surprises | |
| Override that changes void to throwing or vice versa | minor | Side-effect contract violation |
Detection method:
- Find class inheritance relationships (
extends,implements,:,<) - For each override, check if the method body contains
throw new NotImplementedError,raise NotImplementedError,panic("not implemented"), or similar - Check if override signatures differ from base class signatures in ways that break substitutability
ISP — Interface Segregation Principle
| Condition | Severity | Rationale | |
|---|---|---|---|
| Interface/protocol with 8-11 methods | minor | Interface is getting large; clients may depend on methods they don't use | |
| Interface/protocol with 12-15 methods | major | Fat interface; split into role-specific interfaces | |
| Interface/protocol with 16+ methods | critical | Monolithic interface; severe coupling risk | |
| Class implements interface but leaves methods as no-ops or throws | major | ISP violation evidenced by forced empty implementations |
Detection method:
- Find interface/protocol/abstract class definitions
- Count required methods (exclude default/provided implementations)
- Find implementations and check for no-op methods (
pass,return,{},throw)
DIP — Dependency Inversion Principle
| Condition | Severity | Rationale | |
|---|---|---|---|
| Domain/business module directly imports infrastructure concrete class | minor | Coupling domain logic to a specific implementation | |
Domain module instantiates infrastructure (new PostgresClient(), new S3Client()) | major | Hard dependency on infrastructure; untestable without the real service | |
| Multiple domain files import the same concrete infrastructure class | critical | Systemic DIP violation; infrastructure change ripples across domain |
Detection method:
- Identify domain/business-logic modules (directories:
domain/,core/,models/,services/,usecases/,business/,entities/) - Identify infrastructure modules (directories:
infrastructure/,infra/,adapters/,db/,database/,repositories/,external/,clients/) - Check if domain modules directly import from infrastructure modules
- Look for
newinstantiation of infrastructure classes within domain code - Common infrastructure classes:
*Client,*Repository(concrete, not interface),*Connection,*Pool,*Driver,*Adapter(concrete)
Info-Level Observations
The following do NOT affect the score but are reported as info:
- Classes with 2 responsibility clusters (approaching SRP threshold)
- Interfaces with 6-7 methods (approaching ISP threshold)
- Opportunities to introduce dependency injection
- Sealed/final classes that could benefit from an interface for testability
Procedure
Step 1: Read Language Census
Determine primary language, all languages present, and file counts.
Step 2: Identify Architectural Boundaries
Scan the directory structure to identify domain vs. infrastructure vs. presentation layers:
If no conventional structure is detected, infer layers from file contents and import patterns.
Step 3: Analyze Classes for SRP
For each class/module in the codebase:
- List all public methods
- Classify each method into a responsibility cluster (see table above)
- Count distinct clusters
- If 3+ clusters, emit a finding with severity per rubric
Also check for function-level SRP violations in non-OOP code: functions that mix I/O, computation, and side effects.
Step 4: Analyze for OCP Violations
Search for switch statements and if/else chains:
For each match:
- Count the number of cases/branches
- Check if each branch contains distinct behavior (not just returning a value — simple value mappings are acceptable)
- If 3+ behavioral branches on a type discriminator, emit a finding
Step 5: Analyze for LSP Violations
For each class inheritance relationship:
- Identify overridden methods
- Check for
NotImplementedError,UnsupportedOperationException,todo!(),panic("not implemented"),passwith a comment indicating non-support - Check for signature mismatches between override and base
- Emit findings per rubric
Step 6: Analyze for ISP Violations
For each interface, protocol, or abstract class:
- Count required methods
- If count exceeds threshold, emit a finding
- Also check implementations for no-op methods as evidence of ISP violation
Step 7: Analyze for DIP Violations
Using the architectural boundaries from Step 2:
- For each file in domain/business directories, read its imports
- Flag imports of concrete infrastructure classes
- Flag
newinstantiation of infrastructure classes - Count how many domain files share the same concrete dependency (for critical threshold)
Step 8: Classify Findings
Each finding MUST include:
dimension:"solid"severity: per rubric abovetitle: e.g., "SRP: UserService has 6 distinct responsibilities"description: 2-4 sentences explaining the violation and its consequencesfile: repo-relative pathline: line number of the class/interface/function definitionsnippet: relevant code excerpt (max 500 chars)fix_prompt: self-contained prompt following the template inshared/fix_prompt_template.mdconfidence: one ofnative,heuristic
Step 9: Compute Score
Apply the standard scoring formula:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tenet-solid/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/inceptyon-labs/tenet-skills/tenet-solid)