context-canary

context-canary is a skill for Codex from GalaxyRuler/Galactic-skills. It costs 115 tokens per session (1,421 once invoked), scanned A, a copy of context-canary, MIT.

A small standing instruction that reveals when an AI assistant has lost track of earlier instructions during a long conversation. Its failure acts as an early warning for fading context.

In plain words
What is it for?
It helps monitor context loss, instruction drift, and compaction during extended agent sessions.
Why use it?
Long sessions can cause an assistant to forget constraints or decisions without saying so; the check makes that problem visible.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md.

Good fit It helps monitor context loss, instruction drift, and compaction during extended agent sessions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/galaxyruler/galactic-skills/context-canary
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add GalaxyRuler/Galactic-skills --skill context-canary
Clone the repo
git clone --depth 1 https://github.com/GalaxyRuler/Galactic-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-canary

README.md
[![agentmods](https://agentmods.dev/badge/skills/galaxyruler/galactic-skills/context-canary/github.svg)](https://agentmods.dev/skills/galaxyruler/galactic-skills/context-canary)
Your own site
<a href="https://agentmods.dev/skills/galaxyruler/galactic-skills/context-canary"><img src="https://agentmods.dev/badge/skills/galaxyruler/galactic-skills/context-canary/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-canary

Your own site · 80×15
<a href="https://agentmods.dev/skills/galaxyruler/galactic-skills/context-canary"><img src="https://agentmods.dev/badge/skills/galaxyruler/galactic-skills/context-canary.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,421 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00115 $0.01421
Opus 5.5 $0.00046 $0.00568
Sonnet 5.5 $0.00023 $0.00284
Haiku 4.5 $0.00012 $0.00142

Measured 2mo ago against content hash 42c8e8e7b7c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-canary scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to context-canary — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/context-canary/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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. 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.

Read the full file on GitHub · 65 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 65 lines · 115 tokens per session scan A 42c8e8e7b7c2

Subscribe to this mod's changes

context-canary is a skill published in the GitHub repository GalaxyRuler/Galactic-skills (5 stars, last pushed 2mo ago), licensed MIT. It adds 115 tokens to every session and 1,421 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to context-canary, differing in 2 lines, and is treated as a copy.

Related

context-canary compared with skills from other repositories

context-canary next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context-canaryGalaxyRuler/Galactic-skillsSkill52mo agoMITA115Codex
knowledge-ingestopenclaw/openclawSkill394ktodayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill69kyesterdayApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill71kyesterdayCC0-1.0A0Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill20k2d agoMITA184Claude Code
memoryopensquilla/opensquillaSkill7.1kyesterdayApache-2.0A44Claude Code, Codex
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex