complexity-management-skill

complexity-management-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 29 tokens per session (2,753 once invoked), scanned A, original, Apache-2.0.

A guide to reducing unnecessary software complexity using principles such as KISS, YAGNI, DRY, and separation of concerns. It distinguishes complexity required by the problem from complexity added by the implementation.

In plain words
What is it for?
Use it to find complexity hotspots, plan refactoring, manage technical debt, and set standards that keep systems easier to change.
Why use it?
It helps explain why small changes affect many files, why code is difficult to understand, and why fixes cause unexpected side effects.

Skill for OpenCode

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

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.

agentmods
npx agentmods add skills/darellchua2/opencode-config-template/complexity-management-skill
Any agent
npx skills add darellchua2/opencode-config-template --skill complexity-management-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 complexity-management-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/complexity-management-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/complexity-management-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/complexity-management-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/complexity-management-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00029 $0.02753
Opus 5 $0.00015 $0.01376
Sonnet 5 $0.00006 $0.00551
Haiku 4.5 $0.00003 $0.00275

Measured 2d ago against content hash 7d4206e8e37e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

complexity-management-skill 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 2d 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.

opencode_app/.opencode/skills/complexity-management-skill/SKILL.md · 503 lines

How it starts

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

What I do

I help you manage software complexity to build maintainable systems:

  1. Identify Complexity Types: Distinguish between essential and accidental complexity
  2. Detect Complexity Hotspots: Find change amplification, cognitive load, and unknown unknowns
  3. Apply Reduction Strategies: Use KISS, YAGNI, DRY, and separation of concerns
  4. Manage Technical Debt: Know when to pay down debt and when to leave it
  5. Apply Simple Design: Follow the four elements of simple design from XP
  6. Prevent Complexity Growth: Apply the Boy Scout rule and continuous refactoring

When to use me

Use this skill when:

  • Code feels harder to change than it should be
  • Small changes require touching many files
  • You need to hold too much in your head to understand code
  • Changes have surprising side effects
  • Planning a refactoring effort
  • Evaluating architecture for complexity issues
  • Teaching developers about complexity management
  • Setting up coding standards to prevent complexity

Prerequisites

  • Code to analyze
  • Understanding of basic software design
  • Willingness to simplify and refactor
  • Authority to make changes (or ability to recommend)

The Two Types of Complexity

Essential Complexity

Inherent to the problem domain. Cannot be removed, only managed.

  • Business rules
  • Domain logic
  • User requirements

Accidental Complexity

Introduced by our solutions. CAN and SHOULD be minimized.

  • Poor abstractions
  • Unnecessary indirection
  • Framework ceremony
  • Technical debt

Goal: Minimize accidental complexity while clearly expressing essential complexity.


Detecting Complexity

1. Change Amplification

Symptom: Small changes require touching many files.

Detection Question: "To add this field, I need to update how many files?"

Example:

"To add a 'nickname' field to User, I need to update:
- User entity
- UserDTO
- UserRepository
- UserService
- UserController
- User tests (5 files)
- Database migration
- Frontend components (3 files)
- API documentation"

→ This is change amplification. Good design: 1-3 files.

Read the full file on GitHub · 503 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. 2d ago First seen · 503 lines · 29 tokens per session scan A 7d4206e8e37e

Subscribe to this mod's changes

complexity-management-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 5d ago), licensed Apache-2.0. It adds 29 tokens to every session and 2,753 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

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

llm-friendly-context

Clarifies inputs, outputs, success criteria, decisions, and unresolved conditions so downstream consumers can execute without guessing. Use when writing or revising LLM-facing prompts, handoffs, planning artifacts, reviews, reports, or generated instructions.

shinpr/claude-code-workflows · 52 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

ring:mapping-feature-relationships

Mapping how features relate and phasing the work: categorizing PRD features, grouping them into domains, charting cross-feature journeys, dependencies, and integration points, and defining the binding Phases that plan.md mirrors one-to-one at Gate 7. Gate 2 of ring:planning-large-features; runs after…

LerianStudio/ring · 104 tokens

megalinter-check

Collect MegaLinter lint errors for the current repository. Use when the user wants to know if the code passes linting, why the MegaLinter CI job fails, or before/after fixing lint errors. Two modes - watch a CI job (GitHub Actions, GitLab CI, Azure Pipelines, Bitbucket Pipelines) and parse its logs, or run MegaLinter…

oxsecurity/megalinter · 96 tokens

bestie-features

Add BestieTemplate features (AGENTS.md, changelog, dependabot, pre-commit, lint workflow, testitem runner) to a Julia package with the bestie CLI — no Julia needed. Use when asked to add one of these files/setups to a package, or to see what BestieTemplate can add.

JuliaBesties/BestieTemplate.jl · 71 tokens