test-economy

test-economy is a skill for Claude Code from Arasz/ai-raccoon. It costs 127 tokens per session (1,760 once invoked), scanned A, original, MIT.

A test-running policy that chooses the smallest useful local test set and leaves the full suite to continuous integration, automated checks run after code is pushed.

In plain words
What is it for?
It helps select tests for modified code and dependent components, decide when CI is trusted, and handle projects whose CI is unavailable.
Why use it?
It avoids repeatedly running the same slow tests locally, in a hook, and again in CI while still checking changed code and its consumers.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event.

Good fit It helps select tests for modified code and dependent components, decide when CI is trusted, and handle projects whose CI is unavailable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arasz/ai-raccoon/test-economy
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 Arasz/ai-raccoon --skill test-economy
Clone the repo
git clone --depth 1 https://github.com/Arasz/ai-raccoon

Made for: Claude Code.

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 test-economy

README.md
[![agentmods](https://agentmods.dev/badge/skills/arasz/ai-raccoon/test-economy/github.svg)](https://agentmods.dev/skills/arasz/ai-raccoon/test-economy)
Your own site
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/test-economy"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/test-economy/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 test-economy

Your own site · 80×15
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/test-economy"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/test-economy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,760 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.00127 $0.01760
Opus 5.5 $0.00051 $0.00704
Sonnet 5.5 $0.00025 $0.00352
Haiku 4.5 $0.00013 $0.00176

Measured yesterday against content hash e57c5245fbb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-economy 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 yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/badger_store.py, scripts/debug_log.py, scripts/suite_economy_hook.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-badger/skills/test-economy/SKILL.md · 129 lines

How it starts

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

Test economy

A command, not a gate: this hook only ever adds additionalContext to a PostToolUse event. It never blocks, denies, or otherwise gates the tool call that triggered it — no decision, no permissionDecision, no continue field, on any code path (changelog 0.33.0: no third-party tool-call interception).

The economy

Normal flow runs each affected suite once: the modified surface's tests, plus the suites of anything that consumes the changed behavior — an API change pulls the frontend end-to-end that exercises it. The full suite is CI's job on push. The sequence to eliminate is the triple — the agent's manual full suite, then the gate's full suite, then CI's full suite, all three proving the same commit. The whole budget is one minimal manual run plus CI.

The CI variable decides what proves a push:

  • CI alive (public repos always; check gh run list, the repo's CI badge, or the project's workflow files): skip every slow local gate by design and treat CI's run as the verdict — then read it. Local work is the touched surface's suite, once.
  • CI dead or absent: run the project's hooked-up local gates once before push; when nothing is hooked up, one manual full-suite run before push is the gate.

Docs checks, comment and documentation discipline, and lint sit on no skip side of this trade — they run on every change, locally or via CI, in both branches.

A suite is never re-run to see whether it passes again. Repetition is measurement, and measurement belongs to a named diagnosis — flake triage runs a suite deliberately, in isolation, and reports the distribution. A re-run after a code fix is a new run, not a repetition.

What triggers it

After every shell-shaped tool call, the hook classifies the command: a test run names a known runner (pytest, python -m pytest/unittest, dotnet test, npm/yarn/pnpm/ bun test, npx jest/vitest/playwright, go test, cargo test, mvn test, gradle test, mix test, phpunit, rake test, swift test). It is filtered when the command carries a selector — a path, -k, --filter, --tests, -Dtest=, -run — and full otherwise (go test ./... counts full; an unrecognized flag never demotes a run to filtered).

Read the full file on GitHub · 129 lines

Files

What ships with it

4 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. yesterday First seen · 129 lines · 127 tokens per session scan A e57c5245fbb3

Subscribe to this mod's changes

test-economy is a skill published in the GitHub repository Arasz/ai-raccoon (7 stars, last pushed today), licensed MIT. It adds 127 tokens to every session and 1,760 once invoked, about $0.0005 per session on Opus 5.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-12-05.

Related

test-economy compared with skills from other repositories

test-economy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-economyArasz/ai-raccoonSkill7todayMITA127Claude Code
beevibe-verify-prbeevibe-ai/beevibeSkill341yesterdayApache-2.0A172Claude Code, Codex
release-db-config-syncPrismer-AI/PrismerCloudSkill1.4k1mo agoMITA91Claude Code
release-preflightPrismer-AI/PrismerCloudSkill1.4k1mo agoMITA76Claude Code
cartographer-kb-createBeppeTemp/cartographerSkill74yesterdayApache-2.0A53Claude Code, Codex
cartographer-kb-importBeppeTemp/cartographerSkill74yesterdayApache-2.0A51Claude Code, Codex
cartographer-kb-source-authorBeppeTemp/cartographerSkill74yesterdayApache-2.0A106Claude Code, Codex