Agent skill · writing content · juliusbrussee
context-canary
Install a per-turn canary signal (e.g. starting every reply with the user's name and a turn counter) so silent context degradation becomes visible the moment it happens, and run a recovery protocol when the canary trips. Use when the user mentions a "canary", "context canary", or "canary check", asks to detect context rot / compaction / drift, says "you stopped using my name" or "did you lose context", asks "how degraded is your context", or wants an early-warning system for long agent sessions.
Why this skill is useful
Adds a structured protocol for monitoring context degradation that the AI wouldn't generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-07-08. 144 stars on the source repository.
What this skill does
Context Canary A context canary is a trivially checkable standing instruction whose only job is to fail visibly. The classic form: "start every response with my name." The agent costs almost nothing to comply — so when the name disappears, that absence is data. The instruction didn't get harder; the agent's hold on its early-context instructions got weaker. Like the coal-mine canary, it dies first, before the failures you actually care about (forgotten constraints, ignored conventions, re-litigated decisions) start landing in your code. This works because context degradation is silent and gradual. Models don't announce that they've stopped attending to instructions from 80k tokens ago, and compaction summaries quietly drop standing instructions. The canary converts an invisible failure into a binary, per-turn, zero-effort check. The research behind why this happens — context rot, lost-in-the-middle, instruction drift, compaction loss — is in references/research.md. When to use this skill Installing a canary at the start of a long or high-stakes session. The user notices the canary stopped appearing and asks what happened. The agent itself realizes it can no longer find its canary contract in context. The user asks how trustworthy the current context still is. The canary contract When invoked, install the canary by stating the contract explicitly in one short message, then follow it. Default format — first line of every response from then on: Three fields, each probing something different: Field Example What its failure means --- --- --- Name Julius The standing instruction itself fell out of effective context — adherence drift or compaction dropped it. Turn counter t14 Increment by 1 every response. A reset, skip, or repeat means continuity broke — almost always compaction or a summarization boundary. Self-check ctx ok / ctx aging / ctx thin The agent's honest estimate. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills juliusbrussee/context-canary