test-impact

test-impact is a skill for Claude Code from Borda/AI-Rig. It costs 84 tokens per session (5,246 once invoked), scanned A, original, Apache-2.0.

A static-analysis tool that identifies tests likely affected by a changed function or module. Static analysis examines code relationships without running the program.

In plain words
What is it for?
Use it to trace callers, imports, and mocks and produce a ready-to-run pytest command.
Why use it?
It narrows the tests to rerun after a change and avoids spending time running unrelated tests, while reporting known blind spots.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the codemap-py plugin — 6 skills shipped together

Good fit Use it to trace callers, imports, and mocks and produce a ready-to-run pytest command.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Borda/AI-Rig
Claude Code
/plugin install codemap-py

Made for: Claude Code.

Or install codemap-py, the plugin that ships this one along with the rest of its 6 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 test-impact

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/borda/ai-rig/test-impact"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/test-impact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 6
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00084 $0.05246
Opus 5.5 $0.00034 $0.02098
Sonnet 5.5 $0.00017 $0.01049
Haiku 4.5 $0.00008 $0.00525

Measured 17d ago against content hash 57b12e1a665e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-impact scanned grade A with 1 finding 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 17d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

diff = subprocess.run(["git", "diff", "--name-only", "HEAD", "--", "*.py"], capture_output=True, text=True, timeout=10)
plugins/codemap-py/claude-skills/test-impact/SKILL.md · 272 lines

How it starts

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

Find minimal tests affected by function/module change via Codemap static analysis; run no tests. Return ready pytest command for impacted tests only.

Two input modes:

  • Function-level (module::symbol) — reverse-call-graph BFS; all direct/transitive test callers + symbol mocks (mock_patches).
  • Module-level (bare module) — reverse-import-graph BFS; all tests importing through any chain + any module-symbol mocks.

not_covered: dynamic dispatch, hook callbacks, string-dispatch callers; same blind spot as fn-blast. Surface caveat; log gap.

NOT for: finding all callers of a function (use /codemap-py:query-code fn-rdeps <module::symbol> --exclude-tests); querying module deps or blast radius (use /codemap-py:query-code); running/executing tests (identified here, not executed).

  • $ARGUMENTS: <qname> [--no-mocks]
    • qname — module::symbol (function-level; a dotted module.symbol or a bare name defined once also resolves, while a module-name suffix or bare method name exits with candidates) or bare dotted module (module-level; an indexed module name always wins)
    • --no-mocks — exclude mock-only test files (no call/import path)
    • Omitted → inspect the working-tree change set in Step 1; use its union when multiple Python files changed (including unmapped files), otherwise AskUserQuestion

Step 0 — Ensure index

Text substitution guard: $ARGUMENTS and any AskUserQuestion answer are pasted into double-quoted Bash words below. If either contains a double quote ("), backtick (`), backslash (\), or $, do not run any block that substitutes that text: print ! Unsafe argument text — use a plain module::symbol or dotted module, with single quotes if quoting is needed. Re-invoke. and stop. Check each answer before substituting it into QNAME.

# timeout: 10000
PLUGIN_ROOT=$(python "${CLAUDE_PLUGIN_ROOT}/bin/resolve_plugin_root.py" --plugin-name codemap-py) || exit $?; export PLUGIN_ROOT
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
_CM_PROJ=$(git rev-parse --show-toplevel 2>/dev/null | xargs basename 2>/dev/null || basename "$PWD")

# dispatcher, not scan-query/scan-index aliases — aliases lease in-engine too but skip dispatcher's interpreter probe (exit 127), deprecated shims removed no earlier than 1.0.0
# PATH-literal invocation everywhere below — expansion-bearing form matches no bare-name allow prefix; plugin's absolute bin/codemap-py stays interactive fallback
command -v codemap-py >/dev/null 2>&1 || { echo "codemap-py not on PATH — install the codemap-py plugin, or invoke its bin/codemap-py launcher as one standalone command"; exit 1; }

# git-root-anchored, not CWD-relative — resolve_proj_index.py resolves the same pair the engine uses (index_paths.py); a hand-rolled path here disagreed from a subdirectory
python "$PLUGIN_ROOT/bin/resolve_index_env.py" --output-prefix "codemap-${_CM_PROJ}" 2>/dev/null
IFS= read -r INDEX < "${TMPDIR:-/tmp}/codemap-${_CM_PROJ}-resolve-index-${CSID}" 2>/dev/null || INDEX=""
[ -n "$INDEX" ] || { echo "! resolve_index_env.py failed — check Python availability and CLAUDE_PLUGIN_ROOT"; exit 1; }

[ -f "$INDEX" ] || echo "No index found — build requires SCAN_NO_AUTOBUILD != 1"

SCAN_NO_AUTOBUILD=1 opts out: use index unchanged; no refresh/full build. Echo build wall-time when run, separating build/query cost.

If $INDEX missing:

  • With SCAN_NO_AUTOBUILD=1: print ! codemap index missing and SCAN_NO_AUTOBUILD=1 — refusing to auto-build. Build it manually first: /codemap-py:scan-codebase; exit 1.
  • Otherwise run foreground codemap-py index; wait, then continue. Never invoke codemap-py:scan-codebase: disable-model-invocation:true, user-slash-only. Build through gated codemap-py index dispatcher.
# timeout: 400000
[ "${SCAN_NO_AUTOBUILD:-0}" = "1" ] && { echo "! codemap index missing and SCAN_NO_AUTOBUILD=1 — refusing to auto-build. Build it manually first: /codemap-py:scan-codebase"; exit 1; }
_CM_BUILD_T0=$(date +%s)
# forward only when user already overrode CODEMAP_INDEX_DIR — an unconditional export turns the
# engine's own git-root default into a flat-convention override (index_paths.py), same trap fixed
# below for the incremental-refresh branch
[ -n "${CODEMAP_INDEX_DIR:-}" ] && export CODEMAP_INDEX_DIR
codemap-py index --timeout 360 \
    && echo "[codemap] index built in $(( $(date +%s) - _CM_BUILD_T0 ))s" \
    || { printf "! codemap-py index failed — cannot proceed without an index\n"; exit 1; }

Read the full file on GitHub · 272 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. 17d ago Changed · +69 lines 57b12e1a665e
  2. 1mo ago Changed · -1 lines e404e0348c19
  3. 1mo ago Changed · -25 lines 7942a137a14c
  4. 1mo ago Changed f13fb53ae509
  5. 1mo ago Changed 25193b245862
  6. 2mo ago Changed · +29 lines ce8b76f8229a
  7. 2mo ago Changed 18b9960cfd07
  8. 2mo ago First seen · 200 lines · 84 tokens per session scan A 793c411fb1fb

Subscribe to this mod's changes

test-impact is a skill published in the GitHub repository Borda/AI-Rig (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 84 tokens to every session and 5,246 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

test-impact compared with skills from other repositories

test-impact next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-impactBorda/AI-RigSkill31yesterdayApache-2.0A84Claude Code
i18n-parityhoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA95Claude Code, Codex
file-headershoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA101Claude Code
productivity-scorehoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA67Claude Code, Codex
dashboard-statushoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA69Claude Code, Codex
dag-maphoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA65Claude Code, Codex
regression-watchhoangsonww/Claude-Code-Agent-MonitorSkill1.2kyesterdayMITA82Claude Code, Codex