/selamy-skills:parameter-designfrom selamy-skills
Use when designing or reviewing a function, method, or constructor signature. Make calls unambiguous and misuse-resistant by splitting nullable/optional control switches, removing overload ladders, and keeping defaults behavior-neutral.
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.
Use this skill when defining or reviewing the signature of a function, method, or constructor. The signature is the contract: a caller should not be able to build an invalid or ambiguous call, and the parameter list should document what the operation needs. Push the cost of clarity onto the design, not onto every reader.
enums-codify-behavior); avoid positional-boolean traps where f(x, true, false) tells the reader nothing.A nullable parameter that gates behavior:
# smell: passing a key encrypts; passing nothing does not.
def save(data, key=None):
if key is None:
write_plaintext(data)
else:
write_encrypted(data, key)
# fix: two operations, each with exactly the inputs it needs.
def save_plaintext(data): ...
def save_encrypted(data, key): ... # key is required here, not optional
An overload ladder / optional grab-bag:
# smell: which combination is valid? the reader cannot tell.
def fetch(url, retries=None, timeout=None, cache=None, auth=None, stream=None): ...
# fix: required inputs explicit; optional tuning in one config object.
def fetch(request: Request, options: FetchOptions = FetchOptions()): ...
# Request carries the required url + auth; FetchOptions carries
# behavior-neutral tuning (retries, timeout, cache) with safe defaults.
A positional-boolean trap:
# smell: render(doc, true, false) — unreadable at the call site.
def render(doc, minify, inline_styles): ...
# fix: an explicit mode and named options.
def render(doc, mode: RenderMode, options: RenderOptions): ...
if param is None: (or if not param:) at the top
of a function to pick between behaviors.complexity-budgets).f(x, recursive=True)) where the name
at the call site is invisible — prefer an enum or a separate function.enums-codify-behavior).Cross-link: composes with enums-codify-behavior (types over flags),
interface-over-conditionals (behavioral variants behind one interface), and
complexity-budgets (cap parameter count before a signature sprawls).
What SKILL.md sets; muted values are Claude Code's defaults
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.Other plugins' skills for the same job