testability-canary

testability-canary is a skill for Claude Code from HetCreep/CoalMine. It costs 88 tokens per session (1,915 once invoked), scanned A, original, Apache-2.0.

A code review that checks whether software is split into manageable parts and can be tested with automated tests. It looks for hidden or fixed connections between parts, such as creating dependencies inside a class.

In plain words
What is it for?
Use it to review dependency injection, class responsibilities, global or static dependencies, time and environment access, and business logic that is hard to test.
Why use it?
It helps find design choices that make tests difficult to write, isolate, or maintain. The review points out where code is too tightly connected or has too many responsibilities.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Part of the coalmine plugin — 9 skills shipped together

Good fit Use it to review dependency injection, class responsibilities, global or static dependencies, time and environment access, and business logic that is hard to test.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hetcreep/coalmine/testability-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 HetCreep/CoalMine --skill testability-canary
Clone the repo
git clone --depth 1 https://github.com/HetCreep/CoalMine

Made for: Claude Code.

Or install coalmine, the plugin that ships this one along with the rest of its 9 skills.

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 testability-canary

README.md
[![agentmods](https://agentmods.dev/badge/skills/hetcreep/coalmine/testability-canary.svg)](https://agentmods.dev/skills/hetcreep/coalmine/testability-canary)
Your own site
<a href="https://agentmods.dev/skills/hetcreep/coalmine/testability-canary"><img src="https://agentmods.dev/badge/skills/hetcreep/coalmine/testability-canary.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,915 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 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.00088 $0.01915
Opus 5 $0.00044 $0.00958
Sonnet 5 $0.00018 $0.00383
Haiku 4.5 $0.00009 $0.00192

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

Security

Grade A, and why

testability-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 4d 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.

plugin/skills/testability-canary/SKILL.md · 78 lines

How it starts

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

Testability Canary (Decoupling & Mockability Audit)

Language: Generate EVERYTHING at runtime in the user's language — questions, answer options, menu labels, recommendations, report narrative. Detect from their messages; never default to English just because this file is English. English is allowed only for technical terms: commands, paths, code identifiers, severity labels (CRITICAL/HIGH/MEDIUM/LOW), and tier names (Light/Standard/Heavy).

Config reads — every config key, always the CASCADE, never the bare project file: ~/.claude/.coalmine.json first, then the project config (own agent dir → other known agent dirs → legacy <gitroot>/.coalmine.json), project wins per key. A bare project read is ABSENT on a machine configured only globally, so it silently yields defaults.

Audit code to ensure it is decoupled, modular, and easy to cover with automated tests.

Auditing Categories

  1. Hardcoded Constructors — instantiating deps inside classes (new DatabaseClient()) instead of injecting via constructor/factory (prevents mocking).
  2. SRP Violations — a class or method doing too many distinct duties (e.g. a service that also parses JSON and formats UI).
  3. Static Dependencies — reliance on global static methods or Singletons that make test isolation impossible.
  4. Time & Environment Coupling — direct DateTime.Now, fs, or process.env calls without an abstraction layer (fragile time/path-sensitive tests).
  5. Private Logic Gaps — complex business logic hidden in private methods that can't be tested directly (extract to testable helpers).

Per-stack patterns and the mock-strategy vocabulary: read references/checks.md before scanning.

Fix mode (choice-gated)

In Agent Context, after the report, present via ask_question:

  • Apply safe refactoring: extract hardcoded initializations into constructor params (DI) + add interface definitions. Each fix: checkpoint (git stash/commit in a git repo; else copy the file aside — never assume git) → apply → build + tests → auto-revert if newly red.
  • Let me pick: user selects specific refactoring moves.
  • Report only: exit unchanged.

Read the full file on GitHub · 78 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. 4d ago Changed · +2 lines b2571e5f66cd
  2. 8d ago First seen · 76 lines · 88 tokens per session scan A 8c4c199f7c26

Subscribe to this mod's changes

testability-canary is a skill published in the GitHub repository HetCreep/CoalMine (12 stars, last pushed 2d ago), licensed Apache-2.0. It adds 88 tokens to every session and 1,915 once invoked, about $0.0004 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

flockion_code_review

Reviews Flockion code, diffs, pull requests, generated files, and refactors for correctness, simplicity, maintainability, file size, type safety, accessibility, security, observability, and overengineering. Use for TypeScript, React, Python, APIs, agents, YAML, Bicep, GitHub Actions, and cloud automation code.

error505/Flockion_AI_Engineering · 77 tokens

agent-watchdog

Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, independently investigate the same…

BuilderIO/skills · 115 tokens

comet-verify

Comet Phase 4: Verify and Close. Invoke with /comet-verify. Verify implementation matches design, handle development branch.

rpamis/comet · 32 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

answer-reviewer-questions

For each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to "answer reviewer questions", "draft answers to PR questions", or "explain reviewer questions".

tobihagemann/turbo · 48 tokens

package-optimizer

Evaluate one existing package or bounded package family from recorded evaluator evidence and a capability profile, then propose retain, simplify, strengthen, retire, or inconclusive without editing. Use when optimizing a skill, agent, hook, rule, command, utility, or preset; evaluating whether package detail is…

Mathews-Tom/armory · 110 tokens