LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

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.

144stars10forksUpdated 8/6/2026
Developer Tools#reliability#context-management#observability#ai-agents#prompt-engineering

Security Assessment

Safe(96/100)
Security Score96/100

About context-canary

This skill installs a "context canary" — a trivially checkable standing instruction whose only purpose is to fail visibly when an AI agent's context degrades. The classic form is starting every response with the user's name; because compliance costs almost nothing, the moment the name disappears that absence becomes a reliable signal that the agent's hold on early-context instructions has weakened. It solves the problem that context degradation in long agent sessions is silent and gradual: models do not announce when they have stopped attending to instructions from tens of thousands of tokens ago, and compaction summaries quietly drop standing instructions, so failures surface only later as forgotten constraints and re-litigated decisions.

The canary contract is a byte-stable first line combining three fields: the user's name (tests whether the standing instruction is still in effect), a turn counter incremented every response (a reset, skip, or repeat signals a compaction or summarization boundary), and an honest self-check of context health (ok / aging / thin). The skill defines strict emission rules, distinguishes a session canary from a weaker standing canary written into CLAUDE.md or memory, and specifies a trip protocol for when the canary is missing, malformed, or discontinuous: stop trusting drifted state, checkpoint durable state to a file such as HANDOFF.md, re-anchor by re-reading project instructions, deliberately reset via a fresh session or compaction, and re-install the canary with the counter reset. It stresses that the test is one-sided — a missing canary is strong evidence of degradation while a present one is only weak evidence of health. A references/research.md file summarizes the supporting research on context rot, lost-in-the-middle, instruction drift, and compaction loss.

The target users are people running long or high-stakes agent sessions who want an early-warning instrument for context rot, and agents that need a self-monitoring protocol. It is a benign reliability and observability aid with no external actions beyond optionally writing a local checkpoint file.

FAQ

What is a context canary?

A trivially checkable standing instruction — classically 'start every response with my name' — whose only job is to fail visibly, converting silent, gradual context degradation into a binary, per-turn, zero-effort check.

What do the three fields track?

The name field tests whether the standing instruction is still in effective context, the turn counter detects continuity breaks from compaction or summarization boundaries, and the self-check (ok/aging/thin) is the agent's honest estimate of how well it still remembers earlier context.

What happens when the canary trips?

You follow a recovery protocol: stop trusting drifted state, checkpoint the durable state to a file such as HANDOFF.md, re-anchor by re-reading project instructions, deliberately reset with a fresh session or compaction seeded by the checkpoint, and re-install the canary with the counter reset.

Does a present canary mean the context is healthy?

No. The test is one-sided: a missing canary is strong evidence of degradation, but a present one is only weak evidence of health, because a cheap stylistic habit can survive while harder constraints quietly rot.

What is the difference between a session and a standing canary?

A session canary lives only in the conversation and tests whether conversation context survives compaction and drift; a standing canary written into CLAUDE.md or memory survives compaction by design and therefore measures a weaker signal. The skill defaults to the session canary.

All Files

2 files
SKILL.md6.4 KB
View
references/research.md6.7 KB
View

Install context-canary

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

juliusbrussee/skills

Related Skills

research

448

secops-detection-engineering

21,346

qdrant-monitoring

259

project-architecture

3