agent-harness-design
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
Keep each unit comprehensible while the code grows: deep modules over shallow ones, information hiding, honest names, small functions with one job, error handling that does not lose the error, DRY and orthogonality, design by contract, and not leaving broken windows. Merges
$ npx -y skills add AnastasiyaW/codex-claude-code-config --skill code-complexity --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/code-complexityContext preview
The summary Claude sees to decide when to auto-load this skill.
Keep each unit comprehensible while the code grows: deep modules over shallow ones, information hiding, honest names, small functions with one job, error handling that does not lose the error, DRY and orthogonality, design by contract, and not leaving broken windows. Merges
name: code-complexity description: > Keep each unit comprehensible while the code grows: deep modules over shallow ones, information hiding, honest names, small functions with one job, error handling that does not lose the error, DRY and orthogonality, design by contract, and not leaving broken windows. Merges module-complexity management with naming/function/error-handling discipline and the pragmatic meta-rules. Use when writing or reviewing a function, class or module; when an interface feels wide, a class feels shallow, or a change in one place forces edits in three; when the user says "this is hard to follow", "clean this up", "review this code", "is this a good abstraction", "too many parameters", "pass-through method", "duplicated logic", or asks about naming, comments, error handling or unit tests. Do NOT use to decide where a new module LIVES or which modules exist (use architecture-first), to plan capacity or storage (use system-and-data-design), to execute a named transformation on a file that is already too large (use refactoring-safely), or to strip over-engineering on request (use lean-code). This makes a unit comprehensible; it does not draw the system's boundaries.
Complexity is not how clever the code is. It is how much you must hold in your head to change one line safely. It accumulates by increments that each look acceptable, which is why it is never one bad commit's fault and always everyone's problem.
**Change amplification** — one decision, many edits. If changing a timeout means editing five files, that decision was not encapsulated anywhere.
**Cognitive load** — how much you must know to be safe. A function that is correct only if you know that the caller already took a lock has exported its complexity to everyone who reads it.
Both are properties of the *interface*, not the implementation. Which gives the rule:
A module's value is `functionality it provides ÷ interface you must learn`. Deep = small interface, substantial behaviour behind it. Shallow = large interface, little behind it.
negative value: it adds an interface without adding behaviour.
classes cost more total interface than a few deep ones.
use it?"
Every design decision that might change should be known to exactly one module. The inverse — **information leakage** — is when a decision shows up in two places: a file format known to both the reader and the writer, a status string parsed by three modules, a lock the caller has to remember.
Test: *if this decision changed, how many files would I edit?* More than one is leakage.
name it, you do not yet know what it does — that is information, not a naming problem.
booleans in a signature is a sign that several functions are hiding in one.
restates the code rots the moment the code changes. A comment that records a ceiling or a reason is the most durable thing in the file.
needs no error path); where you cannot, fail loudly and early. Silently swallowing is the failure that looks like success — the most expensive kind.
needs a comment to say what it proves is not proving it clearly.
decisions are not duplication. One decision expressed in two places is, even if the code looks different.
coupled through something you have not named.
assertion is executable documentation that cannot rot.
seams; a stack of half-built layers proves nothing.
than the design meeting suggests.
1. Does any interface require knowledge it did not give you? (leakage) 2. Would a change to one decision edit more than one file? (amplification) 3. Any pass-through methods, or classes whose interface is most of their content? 4. Any name that needs its comment? 5. Any error path that continues on failure without saying so? 6. Any duplicated *decision* — not duplicated text?
`complexity-symptoms.md`, `general-vs-special.md`, `strategic-programming.md`, `comments-as-design.md`
`error-handling.md`, `testing-principles.md`, `comments-formatting.md`, `code-smells.md`
`tracer-bullets.md`, `reversibility.md`, `broken-windows.md`, `estimation-portfolio.md`
A practical configuration kit for Claude Code, Codex, and other coding agents. It contains architectural principles, enforcement hooks, skills, drop-in rules, starter templates, and dynamic-workflow commands.
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
Use when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue…
Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах…
Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create…
Plan or review LoRA and edit-training work specifically for FLUX.2 Klein or Qwen-Image-Edit, including paired datasets,…
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an…