solid-interface-segregation

solid-interface-segregation is a skill for Claude Code from helmedeiros/clean-code-skills. It costs 48 tokens per session (676 once invoked), scanned A, original, MIT.

A design guide for the Interface Segregation Principle, which says that software interfaces should contain only closely related operations. An interface is a contract describing what a component can do.

In plain words
What is it for?
It helps find oversized interfaces, group operations by the clients that need them, and split them into smaller role-specific contracts.
Why use it?
It prevents components from depending on methods they never use, reducing unnecessary changes, empty implementations and test work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clean-code-skills plugin — 21 skills, 2 commands shipped together

Good fit It helps find oversized interfaces, group operations by the clients that need them, and split them into smaller role-specific contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helmedeiros/clean-code-skills/solid-interface-segregation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add helmedeiros/clean-code-skills --skill solid-interface-segregation
Clone the repo
git clone --depth 1 https://github.com/helmedeiros/clean-code-skills

Made for: Claude Code.

Or install clean-code-skills, the plugin that ships this one along with the rest of its 21 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solid-interface-segregation

README.md
[![agentmods](https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/solid-interface-segregation/github.svg)](https://agentmods.dev/skills/helmedeiros/clean-code-skills/solid-interface-segregation)
Your own site
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/solid-interface-segregation"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/solid-interface-segregation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for solid-interface-segregation

Your own site · 80×15
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/solid-interface-segregation"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/solid-interface-segregation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00676
Opus 5.5 $0.00019 $0.00270
Sonnet 5.5 $0.00010 $0.00135
Haiku 4.5 $0.00005 $0.00068

Measured 1mo ago against content hash 436d7ec5a39a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

solid-interface-segregation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/solid-interface-segregation/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SOLID: Interface Segregation Principle

Design small, focused interfaces so that clients depend only on the methods they actually use, avoiding forced dependencies on irrelevant functionality.

When This Skill Applies

  • An interface has methods that some implementors leave empty or throw NotImplementedException
  • Clients import an interface but only call a subset of its methods
  • The user mentions ISP, interface segregation, or fat interfaces
  • Changing one interface method forces recompilation or retesting of unrelated clients
  • Mock objects in tests implement many methods just to satisfy the interface

Core Principle

No client should be forced to depend on methods it does not use. Large, general-purpose interfaces create coupling between unrelated clients. When one client needs a change to the interface, other clients are affected even though they do not use the changed method. Split fat interfaces into smaller, role-specific ones.

Workflow

Step 1: Identify the Fat Interface

Find interfaces with many methods where different clients use different subsets. Look for implementors that leave methods empty or throw exceptions.

Step 2: Group Methods by Client

Identify which clients call which methods. Group methods that are always used together. Each group becomes a candidate for a separate interface.

Step 3: Define Role Interfaces

Create a focused interface for each group. Name each interface after the role it represents: Readable, Writable, Closeable instead of one FileOperations.

Step 4: Update Implementors

Classes that previously implemented the fat interface now implement the specific role interfaces they support. A class can implement multiple interfaces.

Step 5: Update Clients

Each client depends on the smallest interface that covers its needs. Update parameter types and dependency declarations.

Detection / Indicators

  • Interface with more than 5-7 methods
  • Implementors with empty method bodies or throw new NotImplementedException()
  • Tests that mock many methods but only exercise one
  • Clients that import an interface but call only 1-2 methods
  • Interface changes that cause unrelated code to recompile

Read the full file on GitHub · 76 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 76 lines · 48 tokens per session scan A 436d7ec5a39a

Subscribe to this mod's changes

solid-interface-segregation is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 7mo ago), licensed MIT. It adds 48 tokens to every session and 676 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens

sip

After you create or change an artifact or skill, taste-test it with our own skills instead of trusting your in-session judgment — recursive self-improvement, made automatic. Use right after writing or editing anything, before calling it done, committing, or handing it off.

LilMGenius/paperthin · 55 tokens

prism

Split one artifact — a claim, plan, or file — across 2 to 5 independent lenses, one per genuinely distinct failure mode (correctness, security, readability, cost, adversarial-user), and return their convergence: where they agree, where they disagree, and the single next question that resolves the disagreement. Use…

LilMGenius/paperthin · 98 tokens

hate

Attack a plan, design, or argument like you want it to fail before you commit real effort — return the single load-bearing objection and the cheapest experiment that would prove it matters, not a checklist. User-invoked on purpose: a hate-it reflex always in the agent's reach would bias it toward demolition. Weighs…

LilMGenius/paperthin · 79 tokens

load-pr-review

Load GitHub PR review comments into AI session — analyze, triage, plan. Default: analysis-only (no auto-fix). Use when: reviewing PR feedback, planning fixes, addressing review comments, replying to reviewers. Not for: creating reviews (use codex-review-fast), creating PRs (use create-pr), viewing PR status (use…

sd0xdev/sd0x-harness · 77 tokens

issue-analyze

GitHub Issue and PR review thread deep analysis with Codex blind verdict. Use when: analyzing issue root cause, classifying problems, investigation planning, triaging PR review comments for actionability. Not for: fixing bugs (use bug-fix), code exploration (use code-explore). Output: classified analysis + verdict…

sd0xdev/sd0x-harness · 73 tokens