/selamy-skills:adaptive-estimationfrom selamy-skills
Use 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.
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 you are tracking a quantity you cannot observe directly — a true value that drifts slowly while your measurements are noisy — a fixed-window moving average and a static anomaly threshold are both crude. The window is either too short (jittery) or too long (laggy), and a static threshold cannot tell a real shift from ordinary noise. A Kalman-style recursive estimator solves both: it auto-tunes how much to trust each new measurement, and its prediction error is a built-in surprise detector.
Use this only when the preconditions hold; otherwise it is over-engineering:
This is an estimation layer: it smooths and tracks a value and flags surprises. It is not a forecaster of structural regime change, not a way to manufacture predictive signal where none exists, and not a substitute for a real model of the system. It cleans and tracks; it does not divine.
Maintain an estimate x and its variance P. Each step:
Predict (let the model drift; uncertainty grows by process noise Q):
x⁻ = x (or x = F·x if there is known drift dynamics)P⁻ = P + QUpdate with a new measurement z of measurement-noise variance R:
y = z − x⁻K = P⁻ / (P⁻ + R)x = x⁻ + K·yP = (1 − K)·P⁻K lives in [0, 1] and auto-tunes trust: when measurements are noisy
relative to the model (R ≫ P⁻), K → 0 and the estimate barely moves; when
the model is uncertain relative to a clean measurement (P⁻ ≫ R), K → 1 and
the estimate snaps to the observation. You set Q and R; the gain adapts on
its own. The vector form generalizes this with matrices F, Q, H, R and the
same predict/update structure.
The residual y has expected variance S = P⁻ + R. A normalized innovation
y / √S is, under the model's assumptions, roughly unit-variance. So:
Q/R are mistuned or the dynamics are not what you assumedYou get smoothing and anomaly detection from the same recursion, for free.
Q/R and never checking the innovations to see if the model holdsA slowly-varying latent value is tracked with a recursive estimator whose gain
auto-tunes trust between model and measurement using stated Q/R; the
normalized innovation is used as an adaptive surprise/anomaly signal; the model's
fit is sanity-checked via the innovation sequence; and any escalation to a
non-linear filter is justified by evidence, not chosen by default.
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-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./adversarial-reviewUse before claiming a high-stakes artifact done, verified, or merged. Have an independent grader adversarially review it — prompted to refute and find reasons not to ship, not to bless — and iterate to an explicit ship-or-revise verdict./agent-drives-uiUse when an agent operates a UI on the user's behalf through conversation, navigating, filling forms, updating live views, with real-time bi-directional state sync. Activates on conversational app control, agent drives the front end, agentic UX, or choosing an agent-to-app protocol./agentic-coding-loopUse when implementing code from a spec through a bounded build-test-fix loop with explicit acceptance criteria, automated checks, live verification when needed, and clear stop conditions./agent-otel-trajectoryEmit OpenTelemetry trajectory spans (tool-call, latency, token usage) as an agent works — vendor-neutral, via otel-cli wrapping shell tool-calls, exported to any OTLP backend.