harness-canary-authoring

harness-canary-authoring is a skill for Claude Code from Goldziher/basemind. It costs 9 tokens per session (534 once invoked), scanned A, original, MIT.

A guide for choosing test canaries: stable symbols or searches in real codebases that reveal scanner regressions. A canary is an early-warning test, and a lower-bound check requires at least a minimum result rather than an exact count.

In plain words
What is it for?
Use it when adding checks to the harden test harness, choosing symbols with many clear uses, setting minimum hit counts, and recording the results.
Why use it?
Poor canaries can become flaky or stop detecting meaningful problems as projects change. The guide helps choose tests with enough headroom and reliable results.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the basemind plugin — 15 skills, 10 commands, 6 agents, 2 hooks, 1 MCP server shipped together

Good fit Use it when adding checks to the harden test harness, choosing symbols with many clear uses, setting minimum hit counts, and recording the results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goldziher/basemind/harness-canary-authoring
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 Goldziher/basemind --skill harness-canary-authoring
Clone the repo
git clone --depth 1 https://github.com/Goldziher/basemind

Made for: Claude Code.

Or install basemind, the plugin that ships this one along with the rest of its 15 skills, 10 commands, 6 agents, 2 hooks, 1 MCP server.

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 harness-canary-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/basemind/harness-canary-authoring/github.svg)](https://agentmods.dev/skills/goldziher/basemind/harness-canary-authoring)
Your own site
<a href="https://agentmods.dev/skills/goldziher/basemind/harness-canary-authoring"><img src="https://agentmods.dev/badge/skills/goldziher/basemind/harness-canary-authoring/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 harness-canary-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/goldziher/basemind/harness-canary-authoring"><img src="https://agentmods.dev/badge/skills/goldziher/basemind/harness-canary-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00009 $0.00534
Opus 5 $0.00005 $0.00267
Sonnet 5 $0.00002 $0.00107
Haiku 4.5 $0.00001 $0.00053

Measured 11d ago against content hash 6bad29fe19e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

harness-canary-authoring 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 11d 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.

.ai-rulez/skills/harness-canary-authoring/SKILL.md · 41 lines

How it starts

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

Harness Canary Authoring

Use this when adding a new canary to tests/harden.rs. Canaries catch real regressions; bad canaries become flaky CI noise.

Pick a good canary

A canary symbol or query must be:

  • Call-site-dense in the target repo — at least 50× the threshold. If you assert >= 200 hits, pick a callee with ≥ 1000 actual call sites in the repo. Headroom absorbs upstream churn.
  • Stable across releases — pick a fundamental API (tokio::spawn, Django's get), not a freshly renamed one.
  • Unambiguous by name alone — basemind's reference search is name-only. get is fine inside Django (many call sites, all the same semantic). Inside React, get would match too many unrelated callees; pick useState instead.
  • Cheap to scanscan_cap = limit * 8 bounds work, but a hit-dense canary still has the lowest overhead.

Assertion shape

  • Always use lower bounds: assert!(hits >= N, "expected >= N, got {hits}").
  • Never assert equality on counts — upstream repo evolution breaks equality assertions silently.
  • Capture the canary count in the per-repo metrics struct so regressions are visible in the JSON log even when the assertion passes.

Steps

  1. Pick the target repo + symbol per the criteria above.
  2. Confirm the count locally: clone the repo, run basemind scan, call code mode references via the MCP, note the actual count.
  3. Set the threshold to actual / 2 rounded down — survives ~50% churn.
  4. Add to tests/harden.rs:
    • The canary call in the per-repo sweep.
    • The assertion next to the existing canaries.
    • The capture into the per-repo metrics struct (mirrors the existing spawn_hits, get_hits, useState_hits fields).
  5. Re-run the harness — confirm 8/8 green.

Pitfalls

  • Don't reuse the same canary symbol across repos unless the repo's domain makes it independently meaningful.
  • Don't pick a symbol that exists across the standard library — count will explode and the canary becomes uninformative.
  • Don't use a symbol that's only in a single file — it's a smoke test, not a canary.

Read the full file on GitHub · 41 lines

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. 11d ago First seen · 41 lines · 9 tokens per session scan A 6bad29fe19e4

Subscribe to this mod's changes

harness-canary-authoring is a skill published in the GitHub repository Goldziher/basemind (98 stars, last pushed today), licensed MIT. It adds 9 tokens to every session and 534 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

haiku-rag

Search, read and compute over the user's haiku.rag knowledge base through the haiku-rag MCP tools. Use whenever a request could be answered from the user's ingested documents, when asked to find, look up, check or cite something in their documents or knowledge base, or when the question is about the user's own…

ggozad/haiku.rag · 76 tokens

rag-vault

Use this when someone asks to "search documents", "query RAG", "ingest file", "ingest PDF", "save web page", "add to knowledge base", or mentions document search, semantic search, vector search, or RAG operations. Covers score interpretation ( 0.5 skip), query tips, and ingestion guidance for querydocuments…

RobThePCGuy/rag-vault · 90 tokens

hybrid-rag

Use when creating, updating, or querying a local Hybrid RAG database from PRISMA JSON metadata or PDF documents in a folder. Triggered by prisma-review (after Fase 4) or educational-pilot-design (to query evidence). Hybrid RAG combines dense vector search (sentence-transformers) and sparse retrieval — native FTS via…

giovannifrontera/academic-research-prisma-wiki-rag · 96 tokens

ingest-emails

Ingest emails from an IMAP mailbox into the legal RAG pipeline. Use when the user wants to add emails to the search index.

avocatt/legal-rag-toolkit · 33 tokens

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens