test-runner

A test-command wrapper that runs a project's existing test tool, such as pytest, Jest, or Go test, and converts its result into a standard exit status.

In plain words
What is it for?
It helps detect or load test-runner settings, execute tests in a target directory, and report whether they passed or failed.
Why use it?
It gives the tester one interface for different projects and supports project-specific test commands when needed.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/cintia09/codenook/test-runner
Any agent
npx skills add cintia09/CodeNook --skill test-runner
Clone the repo
git clone --depth 1 https://github.com/cintia09/CodeNook

Made for: Claude Code, Codex.

Per session 3 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00003 $0.01329
Opus 5 $0.00002 $0.00665
Sonnet 5 $0.00001 $0.00266
Haiku 4.5 $0.00000 $0.00133

Measured 2d ago against content hash 476f3f7c5202, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-runner 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (runner.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.

Runs shell commandslowCapability

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

`subprocess.run(..., shell=True)` inside the target directory. The
plugins/development/skills/test-runner/SKILL.md · 131 lines

How it starts

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

test-runner — plugin-shipped skill (development plugin)

Role

Wrap the workspace's actual test runner (pytest / jest / go test) so the tester role can issue a single command and parse a single exit code.

CLI

runner.py --target-dir <dir> [--config <path>] [--json]

--config is optional; when supplied, it overrides the marker detection and runs whatever command the config file defines (see Memory-first lookup, below).

Three-tier resolution (memory-first, ask-second)

Security / threat model

--config <path> is executed as a Python module (via runpy.run_path); the module-level TEST_CMD is then executed via subprocess.run(..., shell=True) inside the target directory. The Python execution gives the config full host privileges (it can import os; os.system(...) etc.) before any test even starts. This is intentional — the memory-first pattern needs full flexibility to wrap arbitrary test runners (pytest selectors, custom wrappers, env-var preludes, SSH-into-DUT, etc.). Consequences:

  • The caller is responsible for trust. Only point --config at: (a) a workspace-memory entry under .codenook/memory/knowledge/ that a human author wrote / reviewed; OR (b) a snippet just pasted by the current user via HITL.
  • Never load a --config file fetched over the network without human review first.
  • The skill makes no attempt to sandbox the config or the test runner — anything Python (and shell=True) can do, the config can do.
  • Memory entries shipped by plugins (under .codenook/plugins/<id>/) are not auto-trusted; they reach --config only after a human promotes the embedded snippet to a memory file.

This skill is environment-agnostic: it does not know about ADB, QEMU, SSH-into-board, JTAG, etc. Instead, it follows a three-tier resolution that lets the workspace's memory describe the target, with the user as the ultimate fallback:

  1. Marker detection inside <target-dir> (legacy v0.3 behaviour). If the directory contains pyproject.toml / setup.py / pytest.ini / tox.ini → run pytest. package.jsonnpm test. go.modgo test ./.... This is the fast path for pure-software targets.

Read the full file on GitHub · 131 lines

Files

What ships with it

1 file 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. 2d ago First seen · 131 lines · 3 tokens per session scan A 476f3f7c5202

Subscribe to this mod's changes

test-runner is a skill published in the GitHub repository cintia09/CodeNook (5 stars, last pushed 3mo ago), licensed MIT. It adds 3 tokens to every session and 1,329 once invoked, about $0.0000 per session on Opus 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-08-31.

Related

Other skills, from other repositories