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.
npx agentmods add skills/helmedeiros/clean-code-skills/solid-dependency-inversionnpx skills add helmedeiros/clean-code-skills --skill solid-dependency-inversiongit clone --depth 1 https://github.com/helmedeiros/clean-code-skillsWrote 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.
[](https://agentmods.dev/skills/helmedeiros/clean-code-skills/solid-dependency-inversion)<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/solid-dependency-inversion"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/solid-dependency-inversion.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00051 | $0.00769 |
| Opus 5 | $0.00026 | $0.00385 |
| Sonnet 5 | $0.00010 | $0.00154 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
solid-dependency-inversion 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SOLID: Dependency Inversion Principle
Ensure that high-level modules do not depend on low-level modules — both should depend on abstractions. Abstractions should not depend on details; details should depend on abstractions.
When This Skill Applies
- High-level business logic imports database drivers, HTTP clients, or file system modules directly
- Changing an infrastructure detail requires modifying business logic
- Unit testing requires complex mocking of concrete dependencies
- The user mentions DIP, dependency inversion, or decoupling
- A module cannot be reused because it is coupled to specific infrastructure
Core Principle
Dependency Inversion flips the traditional dependency direction. Instead of high-level modules calling low-level modules directly, both depend on a shared abstraction (interface). The high-level module defines the interface it needs; the low-level module implements it. This makes the high-level module stable and reusable, while infrastructure details become swappable.
Workflow
Step 1: Identify the Dependency Direction
Draw the dependency arrows. If a domain/business class imports a concrete infrastructure class (database, HTTP, filesystem), the dependency points in the wrong direction.
Step 2: Define an Abstraction
Create an interface that the high-level module needs. Name it from the domain perspective: OrderRepository, not PostgresClient. The interface belongs to the high-level module's package.
Step 3: Implement the Abstraction
The low-level module implements the interface. The implementation lives in the infrastructure layer and imports the interface from the domain layer.
Step 4: Inject the Dependency
Pass the implementation to the high-level module through its constructor or a factory. The high-level module never creates the low-level dependency directly.
Step 5: Verify
The high-level module should compile and be testable without any infrastructure dependency. Tests use a simple in-memory or stub implementation.
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.
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.
- 3d ago First seen · 87 lines · 51 tokens per session scan A abbd59911574
solid-dependency-inversion is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 51 tokens to every session and 769 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
edu-math-tutorial
数学题分步讲解视频的领域知识。适用场景:(1) 用户给出一道数学题并要求做讲解/ 解题视频;(2) 用户说"讲解这道题"、"生成解题视频"、"make a math tutorial"; (3) 需要中文数学教学视频,涉及方程、公式或几何图形。本 skill 只提供领域 知识(题目拆解、讲解节奏、旁白文案规范、版式与 KaTeX 排版风格);画面、 配音与成片一律用 Creator 原生 Element 与工具从源头构建。.
offensive-vuln-classes
Exploit development curriculum covering core vulnerability classes with real-world CVE case studies: stack/heap buffer overflows, use-after-free, integer overflows, format strings, type confusion, and race conditions. Use when learning or teaching vuln classes, researching specific CVE patterns, or building exploit…
scientific-critical-thinking
Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…
offensive-osint-methodology
Structured OSINT methodology framework: target definition, source selection, collection workflows, data correlation, timeline reconstruction, and reporting. Use to guide systematic OSINT campaigns or teach OSINT methodology.
practice-cognition
触发:当你提出了方案、假设或判断,需要通过实践验证、试错迭代或复盘升级认知时调用;常见信号包括 experiment、prototype、validate、iterate、feedback loop。 English: Trigger when an idea, hypothesis, or plan must be tested in practice and improved through iteration. Use this skill to move from action to understanding and back to action in a spiral learning loop.
offensive-exploit-dev-course
Full exploit development course roadmap and syllabus: weekly topics, recommended reading, lab setup, and learning path from vulnerability classes through advanced exploitation. Use to structure exploit dev training or onboard new researchers.