solid-principles-skill

solid-principles-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 22 tokens per session (3,044 once invoked), scanned C, original, Apache-2.0.

A guide to SOLID, a group of object-oriented design principles for keeping code easier to change, test, and maintain. It explains how to find violations and refactor them.

In plain words
What is it for?
Use it when writing or reviewing object-oriented code, refactoring difficult modules, planning architecture, teaching SOLID, or setting team coding standards.
Why use it?
It helps identify why classes, modules, or functions are difficult to modify without causing unrelated problems.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

Good fit Use it when writing or reviewing object-oriented code, refactoring difficult modules, planning architecture, teaching SOLID, or setting team coding standards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/solid-principles-skill
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 darellchua2/opencode-config-template --skill solid-principles-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: OpenCode.

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-principles-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/solid-principles-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/solid-principles-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/solid-principles-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/solid-principles-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00022 $0.03044
Opus 5 $0.00011 $0.01522
Sonnet 5 $0.00004 $0.00609
Haiku 4.5 $0.00002 $0.00304

Measured 4d ago against content hash e59aabe687f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

solid-principles-skill scanned grade C with 1 finding 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p
opencode_app/.opencode/skills/solid-principles-skill/SKILL.md · 466 lines

How it starts

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

What I do

I help you apply SOLID principles to write maintainable, flexible, and testable code:

  1. Analyze Code Structure: Evaluate classes, modules, and functions for SOLID compliance
  2. Detect Violations: Identify which SOLID principle is being violated with specific examples
  3. Provide Refactoring Guidance: Suggest concrete fixes with before/after code examples
  4. Apply at Multiple Levels: From class-level to architecture-level SOLID application
  5. Create Detection Questions: Provide questions to ask when reviewing code
  6. Generate Quick Reference: Create lookup tables for rapid SOLID assessment

When to use me

Use this skill when:

  • Writing new code and want to ensure SOLID compliance from the start
  • Refactoring existing code that feels "wrong" or hard to change
  • Reviewing code (peer review, PR review) for quality issues
  • Teaching or learning SOLID principles with practical examples
  • Diagnosing why a particular class or module is difficult to maintain
  • Planning architecture and want SOLID at the system level
  • Setting up coding standards for a team or project

Prerequisites

  • Understanding of basic object-oriented programming concepts
  • Code to analyze (existing or being written)
  • Willingness to refactor and improve code quality
  • Basic knowledge of dependency injection and interfaces

SOLID Principles Overview

SOLID helps structure software to be flexible, maintainable, and testable. These principles reduce coupling and increase cohesion.

S - Single Responsibility Principle (SRP)

"A class should have one, and only one, reason to change."

Problem It Solves

God objects that do everything - hard to test, hard to change, hard to understand.

How to Apply

Each class handles ONE responsibility. If you find yourself saying "and" when describing what a class does, split it.

Language-Agnostic Example:

# BAD: Multiple responsibilities
class Order:
    def calculate_total(self): ...
    def save_to_database(self): ...    # Persistence
    def generate_invoice(self): ...    # Presentation

Read the full file on GitHub · 466 lines

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. 4d ago First seen · 466 lines · 22 tokens per session scan C e59aabe687f3

Subscribe to this mod's changes

solid-principles-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 22 tokens to every session and 3,044 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

new-skill

Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…

hyhmrright/brooks-lint · 145 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

dorodango

Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.

athola/claude-night-market · 31 tokens

ring:exploring-codebases

Exploring a codebase across phases: scopes the target, detects architecture, components, and layers, deep-dives each discovered perspective, then synthesizes findings into actionable guidance with file:line evidence. Use to understand how a feature or system works before planning changes, or to orient on an unfamiliar…

LerianStudio/ring · 91 tokens