inceptyon-labs/tenet-skills/tenet-solid

Claude Code and agent skill by inceptyon-labs/tenet-skills

Trust tier 3
  • community
Source check pending

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-solid

SKILL.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:

  1. S — Single Responsibility Principle (SRP): A class should have one reason to change
  2. O — Open/Closed Principle (OCP): Software entities should be open for extension but closed for modification
  3. L — Liskov Substitution Principle (LSP): Subtypes must be substitutable for their base types without breaking correctness
  4. I — Interface Segregation Principle (ISP): No client should be forced to depend on methods it does not use
  5. 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

yaml
support:
native: [typescript, javascript, python, java]
heuristic: [go, rust, kotlin, swift, ruby, php, c#, all others]
note: >
Native support uses AST-level understanding of class definitions,
inheritance, interfaces/protocols, and import graphs. Heuristic
support uses pattern matching on keywords, naming conventions,
and file structure.

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
ConditionSeverityRationale
Class has 3-4 distinct responsibility groupsminorCohesion is weakening; consider splitting on next change
Class has 5-6 distinct responsibility groupsmajorGod class emerging; actively harms maintainability
Class has 7+ distinct responsibility groupscriticalGod class; virtually untestable in isolation
File mixes domain logic with infrastructure concernsminorSeparation of concerns violation
Single function/method handles 3+ unrelated tasksminorFunction-level SRP violation

Responsibility detection method:

Group methods by semantic clusters based on naming patterns and behavior:

Cluster NameMethod Patterns
Data accessfetch*, load*, read*, query*, find*, get*FromDb, save*, persist*, insert*, update*, delete*, remove*
Presentationrender*, display*, format*, toString, toHTML, toJSON, print*, draw*
Validationvalidate*, check*, verify*, is*, has*, can*, assert*, ensure*
HTTP/APIhandle*, route*, middleware*, respond*, request*, endpoint*
Business logicprocess*, calculate*, compute*, apply*, execute*, run*, perform*
Notificationnotify*, send*, email*, alert*, publish*, emit*, dispatch*
Auth/Securityauthenticate*, authorize*, login*, logout*, encrypt*, decrypt*, hash*
Cachingcache*, invalidate*, evict*, memoize*, warm*
Logging/Monitoringlog*, trace*, metric*, track*, audit*, measure*
Configurationconfigure*, setup*, init*, bootstrap*, register*

A class with methods spanning 3+ clusters is flagged as an SRP violation.

OCP — Open/Closed Principle
ConditionSeverityRationale
Switch/if-else chain on type discriminator (3-4 cases) with behavior per caseminorShould use polymorphism; adding a new type requires modifying this code
Switch/if-else chain on type discriminator (5-7 cases)majorModification magnet; every new type touches this function
Switch/if-else chain on type discriminator (8+ cases)criticalExtreme OCP violation; refactor to strategy/visitor pattern
instanceof/typeof checks driving different behavior branchesminorType-checking anti-pattern; use polymorphism or pattern matching

Detection method:

  • Find switch statements and if/else if chains where the discriminant is a type field, enum, or instanceof/typeof/is/as check
  • Count the number of cases/branches
  • Exclude: exhaustive pattern matching in functional languages (Rust match, Haskell case), Redux reducers, serialization/deserialization code, factory functions (which are the OCP-compliant solution)
LSP — Liskov Substitution Principle
ConditionSeverityRationale
Override that throws NotImplementedError / UnsupportedOperationExceptionmajorBreaks substitutability — callers cannot rely on the base contract
Override that narrows parameter types (contravariance violation)majorSubtype rejects inputs the base type accepts
Override that widens return types or changes error semanticsminorSubtle contract breakage; may cause runtime surprises
Override that changes void to throwing or vice versaminorSide-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
ConditionSeverityRationale
Interface/protocol with 8-11 methodsminorInterface is getting large; clients may depend on methods they don't use
Interface/protocol with 12-15 methodsmajorFat interface; split into role-specific interfaces
Interface/protocol with 16+ methodscriticalMonolithic interface; severe coupling risk
Class implements interface but leaves methods as no-ops or throwsmajorISP 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
ConditionSeverityRationale
Domain/business module directly imports infrastructure concrete classminorCoupling domain logic to a specific implementation
Domain module instantiates infrastructure (new PostgresClient(), new S3Client())majorHard dependency on infrastructure; untestable without the real service
Multiple domain files import the same concrete infrastructure classcriticalSystemic 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 new instantiation 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
Read .healthcheck/toolchain/language-census.json

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:

# Look for conventional directory structures
Glob: **/domain/** **/core/** **/models/** **/services/** **/usecases/**
Glob: **/infrastructure/** **/infra/** **/adapters/** **/db/** **/repositories/**
Glob: **/presentation/** **/views/** **/controllers/** **/routes/** **/handlers/**
Glob: **/shared/** **/common/** **/utils/** **/lib/**

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:

  1. List all public methods
  2. Classify each method into a responsibility cluster (see table above)
  3. Count distinct clusters
  4. 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:

# Patterns to search
switch (*.type)
switch (*.kind)
if (x instanceof ...)
if (typeof x === ...)
if (x.type === ...)
if isinstance(x, ...)

For each match:

  1. Count the number of cases/branches
  2. Check if each branch contains distinct behavior (not just returning a value — simple value mappings are acceptable)
  3. If 3+ behavioral branches on a type discriminator, emit a finding
Step 5: Analyze for LSP Violations

For each class inheritance relationship:

  1. Identify overridden methods
  2. Check for NotImplementedError, UnsupportedOperationException, todo!(), panic("not implemented"), pass with a comment indicating non-support
  3. Check for signature mismatches between override and base
  4. Emit findings per rubric
Step 6: Analyze for ISP Violations

For each interface, protocol, or abstract class:

  1. Count required methods
  2. If count exceeds threshold, emit a finding
  3. 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:

  1. For each file in domain/business directories, read its imports
  2. Flag imports of concrete infrastructure classes
  3. Flag new instantiation of infrastructure classes
  4. 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 above
  • title: e.g., "SRP: UserService has 6 distinct responsibilities"
  • description: 2-4 sentences explaining the violation and its consequences
  • file: repo-relative path
  • line: line number of the class/interface/function definition
  • snippet: relevant code excerpt (max 500 chars)
  • fix_prompt: self-contained prompt following the template in shared/fix_prompt_template.md
  • confidence: one of native, 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/inceptyon-labs/tenet-skills/tenet-solid/badge)](https://verified-skill.com/skills/inceptyon-labs/tenet-skills/tenet-solid)

Something wrong with this skill or its page? Tell us.