/selamy-skills:interface-over-conditionalsfrom selamy-skills
Model behavioral variation as an interface with N implementations and select the right one for the context — instead of branching on a type/flag at every call site.
Ships in selamy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When behavior varies by some type/mode/flag, the reflex is if/elif/else (or switch) at each call site. That scatters the variation across the codebase, and every new variant means editing every branch. Instead: define one interface, write one implementation per variant, and inject/select the right implementation for the context. Having the right implementation IS the answer — the conditional disappears.
impl.do(x) — no branching.# instead of, at every call site:
if kind == "kalshi": ...elif kind == "coinbase": ...elif kind == "onchain": ...
# do:
strategy = REGISTRY[kind] # select once
strategy.execute(ctx) # call sites are branch-free
if kind == … ladder appears in MORE THAN ONE place → the variation is a missing abstraction.if. Don't manufacture an interface for one call site (that's over-engineering — respect the complexity budget).map-dispatch-over-conditionals. This skill is its sibling for behavioral polymorphism.The varying behavior lives behind one interface with one impl per variant; selection happens once at a boundary; call sites are branch-free; adding a variant is adding a class + a registry entry, touching nothing else.
Cross-link: map-dispatch-over-conditionals (data-driven dispatch) · pairs with the code-taste cluster (no-nullable-params, fakes-over-mocks, early-return-over-else, enums-codify-behavior, complexity-budgets).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.