Skip to content
Back to skills

Design Principles

ASecurity

Runs named systems-design checks (single writer, never reuse a name, converge on rerun, survive the rollout, implicit state machines, liveness, deadlock freedom, linearizability) when a change adds state, a new legal value of existing state, or a mechanism, touches lifecycle, delete, GC, lock, or migration code, changes a shape another process reads, or patches the same function twice. Use when the user says "triggers", "check single writer", or another principle name, or for design and lifec...

  • 4 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 25, 2026
ai-agentsgocode-reviewgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add wilbeibi/wilbeibi-skills --skill design-principles --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Principles?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Principles
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wilbeibi-design-principles/badge)](https://www.skillsdirectory.com/skills/wilbeibi-design-principles)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-principles
description: Runs named systems-design checks (single writer, never reuse a name, converge on rerun, survive the rollout, implicit state machines, liveness, deadlock freedom, linearizability) when a change adds state, a new legal value of existing state, or a mechanism, touches lifecycle, delete, GC, lock, or migration code, changes a shape another process reads, or patches the same function twice. Use when the user says "triggers", "check single writer", or another principle name, or for design and lifecycle review. Do NOT use for a general diff review (use code-review), tracing what a change breaks (use blast-radius), or naming and glossary work (use domain-modeling).
---

# design-principles

When an event below happens, run its check and put the result in the same message or commit, unasked. On "triggers", run every check against the current diff and design and report each as fired or not, with its result. Principle definitions: `references/principles.md`.

## Triggers

| Event | Check |
|---|---|
| A new case, mode, translation or knob | **YAGNI**: name the caller that needs it today. None → leave it out and make the gap visible (a refusal, or a count that holds the gate), not a path nobody runs. |
| New state or mechanism (table, field, status, flag, env var, process, queue, lock, retry, lease, fence) | Name its one job, the worst case without it, and the existing primitive tried first. A worst case of "slower" or "one more refetch" makes it an optimization: defer it. Never trims safety. For a queue, buffer, cache, pool, retry, or loop that outside input drives, also **name the limit**: cite the bound and the branch taken when it is hit, each as `path:line`, or name what upstream caps it, or say it runs forever by design. No answer is a finding to report; do not add a limiter unasked. For a queue, retry, or lease, also **liveness**: point to the mechanism that keeps the system making progress, or report starvation. |
| New transitional status or awaited attempt (`pausing`, `flushing`, a job a row waits on) | **attempt is not status**: name the attempt and the writer of every exit, failure included. Key exits on the attempt id; never fake a terminal status to pass an ordering rule. |
| Phase start or milestone | Restate non-negotiable invariants and a diff budget. Stop and ask when the diff passes it, or at the first placeholder, compat branch, or out-of-scope file. |
| Second fix to one function or predicate, a regression from the last fix, or a change spreading past the named files | Stop coding. In one sentence, name the missing owner, the name doing two jobs, or the right layer; offer one design-level alternative. If it changes design or scope, ask first. |
| An existing field gains a legal value or combination (non-null but empty, partly filled, two modes now mixed) | List every predicate that reads it, with `path:line`, and what each one assumed. Split the name, or fix each reader that assumed the old set. For each affected reader, exercise its predicate with the new value and assert the expected behavior. Show the case failing before the fix and passing after. |
| Reviewing lifecycle, storage, or status code | **implicit state machines**: for each mutable field, file, or map with no written transition table, list states and transitions with writer (`path:line`) and guard. Walk happy path, attempt failure, ambiguous timeout, crash at each step, late or duplicate executor, concurrent writer, delete mid-flight. Report states with no exit, transitions with two writers, fields whose readers disagree. |
| Several findings at once | Group by shared cause before fixing any, using the principles as classifier. Reproduce each at the real boundary or label it inference. |
| Delete, cleanup, unlink, GC, ack, or nak code | List every reader and writer of the name (late executors, crash restart, sweepers) and what proves each is done. If the name can later denote another object, fix naming first. |
| Periodic publisher, queue message, lock, or timed call | Write rate x hold time against the hard limit (queue cap, IOPS, library timeout) and the lock order. **Deadlock freedom**: cite the lock order at `path:line` and a concrete scenario that waits forever. If that order lets the scenario happen, it is a finding. |
| Concurrent storage or CAS API | **linearizability**: check a linearizable client-visible history of this system, not only of its dependencies. |
| Change to a shape another process or stored record reads | **survive the rollout**: walk old writer -> new reader, new writer -> old reader, rollback reading new data. State deploy order and the later contract step. Use blast-radius for the wider trace. |
| Tests for a new mechanism or fix | **fails at the boundary**: include one case at the real boundary (real responder, production-shaped data, a fake slower than the timeout, duplicate delivery). The [route-skill unlink test](https://github.com/wilbeibi/wilbeibi-skills/blob/dae23f6aba69173077077f89cebb0128c02fef81/skills/route-skill/scripts/test_route_skill.py#L139-L155) checks the filesystem after unlinking a skill. Its managed links disappear and an unrelated dangling symlink survives. |

## Output

One line per principle applied, in the final message or the commit body:

```
Principle: <name> → <decision it changed> → <cost accepted>
```

A name with no changed decision was not applied. When a trigger fired and no decision changed, write `Principle: none`.

Files in this skill

  • SKILL.md3.6 KB
  • references/principles.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.