Agent skill

Context Canary

by JuliusBrussee in JuliusBrussee/skills

Install a per-turn canary signal (e.g. An agent skill from JuliusBrussee/skills.

MITAuto-check passedDevOps & Cloud

Install Context Canary

skills CLI
$ npx skills add JuliusBrussee/skills --skill context-canary -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JuliusBrussee/skills context-canary --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JuliusBrussee/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/context-canary .claude/skills/context-canary && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-canary
GitHub stars
162
Token cost
~1.6k tokens
SKILL.md length
905 words
Files
2 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Install a per-turn canary signal (e.g. An agent skill from JuliusBrussee/skills.

  • Works in 4 steps: Canary is the first line of every… → Increment the counter every response. If… → The self-check must be honest. Reporting… → …
  • The user mentions a canary
  • SKILL.md covers When to use this skill, The canary contract, Emission rules and Trip protocol, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Context Canary is an agent skill from JuliusBrussee/skills. 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.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/research.md`).

It sits in DevOps & Cloud, covering Deployment. The licence is MIT.

When your agent uses it

  • The user mentions a canary
  • Asks to detect context rot / compaction / drift
  • Says you stopped using my name
  • Did you lose context

Example prompts

  • “canary”
  • “context canary”
  • “canary check”
  • “/context-canary”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Canary is the first line of every response, including short ones, error reports, and responses after tool calls.
  2. Increment the counter every response. If unsure of the count, that uncertainty IS a signal — emit t? and flag it, never guess a plausible…
  3. The self-check must be honest. Reporting ctx ok by reflex defeats the entire instrument.
  4. If at any point the canary contract cannot be found in context (you only know about it from a summary, or not at all), declare a trip…

What it can do on your machine

Read from SKILL.md and the folder at commit 8470b26. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context Canary loads about 1.6k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 905 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JuliusBrussee/skills at commit 8470b26, republished under its MIT licence (© JuliusBrussee). 905 words, ~1,636 tokens.

Download SKILL.mdSave it as .claude/skills/context-canary/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
context-canary
description
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.

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:

**Julius · t14 · ctx ok**

Three fields, each probing something different:

FieldExampleWhat its failure means
NameJuliusThe standing instruction itself fell out of effective context — adherence drift or compaction dropped it.
Turn countert14Increment by 1 every response. A reset, skip, or repeat means continuity broke — almost always compaction or a summarization boundary.
Self-checkctx ok / ctx aging / ctx thinThe agent's honest estimate. aging: the session is long and early details are getting summarized in its own working sense of the task. thin: the agent is reconstructing earlier decisions instead of remembering them.

Use the user's actual name (ask if unknown). If the user wants the minimal version, name-only is fine — it's the original trick and still catches the big failures. Never explain, apologize for, or decorate the canary line; it must stay byte-stable so a human can pattern-match it in half a second.

Session canary vs. standing canary. A canary that lives only in the conversation tests whether conversation context survives (compaction, truncation, drift). A canary written into CLAUDE.md or agent memory survives compaction by design — which means it tests whether file-based instructions are being attended to, a different and weaker signal. Default to the session canary; that's the one that detects degradation. Offer the standing variant only if the user wants the habit across all sessions, and tell them what it no longer measures.

Emission rules

  1. Canary is the first line of every response, including short ones, error reports, and responses after tool calls.
  2. Increment the counter every response. If unsure of the count, that uncertainty IS a signal — emit t? and flag it, never guess a plausible number.
  3. The self-check must be honest. Reporting ctx ok by reflex defeats the entire instrument.
  4. If at any point the canary contract cannot be found in context (you only know about it from a summary, or not at all), declare a trip yourself — don't wait for the user to notice.
Show full SKILL.md (360 more words)Show less

Trip protocol

A trip is: the canary missing, malformed, a counter discontinuity, or an agent-side self-declaration.

Calibrate before alarming — one missed canary on an otherwise coherent response is a warning (note it, resume the canary, keep going). Two consecutive misses, a counter discontinuity, or the agent failing its own contract check is a confirmed trip. Then:

  1. Stop trusting drifted state. Do not barrel ahead on the current task using context you can no longer vouch for.
  2. Checkpoint. Write the durable state somewhere outside the conversation: current goal, decisions made and why, files touched, what's verified vs. in-progress, next step. A HANDOFF.md or notes file in the repo works.
  3. Re-anchor. Re-read the project instructions (CLAUDE.md, the original task statement) and the checkpoint. State back to the user, in three or four lines, what you believe the task and constraints are — so they can correct any drift cheaply.
  4. Reset deliberately. Recommend the user start a fresh session (or run an explicit compact) seeded with the checkpoint file, rather than limping on. Degraded context doesn't heal; it compounds.
  5. Re-install the canary with the counter reset to t1, noting the generation: t1 (gen 2).

Never silently resume the canary after a gap as if nothing happened — that destroys the instrument's credibility, which is all it has.

What the canary does and doesn't tell you

The test is one-sided. A missing canary is strong evidence of degradation. A present canary is weak evidence of health — a cheap stylistic habit can survive while harder constraints (architecture decisions, "never touch X") quietly rot, and a canary stuffed into memory files can outlive the context it was meant to monitor. Treat the canary as a smoke detector, not a structural inspection: when it fires, act; when it's quiet, stay reasonably suspicious in sessions past roughly 50% of the context window or after any compaction event.

Pair it with the cheap structural habits that reduce what the canary has to catch: keep durable decisions in files instead of chat, compact at deliberate boundaries instead of waiting for forced compaction, and prefer fresh sessions per task over one immortal session. Details and sources in references/research.md.

© JuliusBrussee, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/context-canary of JuliusBrussee/skills.

  • SKILL.md
  • references/research.md

Open the folder on GitHubat commit 8470b26

Compare with similar skills

Context Canary next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Canary compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Canary this skillJuliusBrussee/skills162—~1.6kAutomated safety check: PassMIT
Kubeshark Installerkubeshark/kubeshark12k—~3.6kAutomated safety check: NotesApache-2.0
GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb6.7k—~4kAutomated safety check: NotesApache-2.0
KubeSphere ServiceMesh Managerkubesphere/kubesphere17k—~2.4kAutomated safety check: PassCustom licence
Vercelremotion-dev/remotion63k—~1.2kAutomated safety check: PassCustom licence
AWS Cdk Developmentzxkane/aws-skills3672 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Kubeshark Installer

    kubeshark/kubeshark

    Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.

    12k GitHub stars~3.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • KubeSphere ServiceMesh Manager

    kubesphere/kubesphere

    Installs, checks and troubleshoots the KubeSphere ServiceMesh extension (Istio, Kiali, Jaeger), including grayscale release, sidecar injection, topology and tracing issues.

    17k GitHub stars~2.4k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Vercel

    remotion-dev/remotion

    Official

    Set up a Codex monitor for Vercel deployments and preview URLs.

    63k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • AWS Cdk Development

    zxkane/aws-skills

    AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python.

    367 GitHub starsUsed in 2 repos~2.5k tokens
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes

More from JuliusBrussee/skills

  • Junior To Senior

    JuliusBrussee/skills

    Adversarial senior-engineer review for agent-generated plans, designs, and architectures.

    162 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Interface Kit

    JuliusBrussee/skills

    Authoritative guide for implementing stunning, accessible, performant UI.

    162 GitHub starsUsed in 1 repo~5.3k tokens
    Auto-check passed
  • Loop Factory

    JuliusBrussee/skills

    Run a spec-driven agent loop where coding tasks live as markdown specs that move through inbox → active → archive, get implemented by Claude Code or Codex, and pass a review gate before they count…

    162 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Grill Me

    JuliusBrussee/skills

    Calibrated grilling session for stress-testing a plan, design, idea, or decision.

    162 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Deslopify

    JuliusBrussee/skills

    De-slop pass for any text. An agent skill from JuliusBrussee/skills.

    162 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Context Canary

What does Context Canary do?

Install a per-turn canary signal (e.g. An agent skill from JuliusBrussee/skills. Context Canary is an agent skill from JuliusBrussee/skills.g.

When should I use Context Canary?

Context Canary fits situations like: the user mentions a canary; asks to detect context rot / compaction / drift; says you stopped using my name; did you lose context.

How do I install Context Canary in Claude Code?

Run `npx skills add JuliusBrussee/skills --skill context-canary -a claude-code`. Or copy the skill folder (skills/context-canary in JuliusBrussee/skills) into .claude/skills/context-canary in your project. Claude Code loads it when a task matches its description.

How do I install Context Canary in Codex?

Run `npx skills add JuliusBrussee/skills --skill context-canary -a codex`. Or copy the skill folder (skills/context-canary in JuliusBrussee/skills) into .agents/skills/context-canary in your project. Codex loads it when a task matches its description.

Can I use Context Canary in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JuliusBrussee/skills --skill context-canary -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-canary, .gemini/skills/context-canary, .github/skills/context-canary and .opencode/skills/context-canary in your project.

What does Context Canary need to run?

SKILL.md names no scripts, command-line tools or credentials: Context Canary is instructions for the agent only.

Does Context Canary access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Context Canary safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context Canary use?

Context Canary is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context Canary use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Context Canary?

Skills that share tags, products or a category with Context Canary: Kubeshark Installer (kubeshark/kubeshark, 12k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), KubeSphere ServiceMesh Manager (kubesphere/kubesphere, 17k stars) and Vercel (remotion-dev/remotion, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Canary?

JuliusBrussee (a GitHub user) maintains it in JuliusBrussee/skills, which has 162 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 7, 2026.

Source: JuliusBrussee/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.