run-tests

run-tests is a command for Claude Code from kao273183/mk-qa-master. It costs 23 tokens per session (436 once invoked), scanned A, original, MIT.

A command for running a focused part of a project's test suite through the configured test runner. A test suite is the collection of automated checks used to find software problems.

In plain words
What is it for?
Use it to run matching tests, review the slowest tests, inspect failed assertions and stack frames, and decide whether to optimize or rerun failures.
Why use it?
It reports the active runner, selects relevant tests, explains failures with useful error details, and checks whether failures have happened before.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the mk-qa-master plugin — 1 skill, 3 commands shipped together

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 commands/kao273183/mk-qa-master/run-tests
Clone the repo
git clone --depth 1 https://github.com/kao273183/mk-qa-master

Made for: Claude Code.

Or install mk-qa-master, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

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 run-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/kao273183/mk-qa-master/run-tests.svg)](https://agentmods.dev/commands/kao273183/mk-qa-master/run-tests)
Your own site
<a href="https://agentmods.dev/commands/kao273183/mk-qa-master/run-tests"><img src="https://agentmods.dev/badge/commands/kao273183/mk-qa-master/run-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00023 $0.00436
Opus 5 $0.00012 $0.00218
Sonnet 5 $0.00005 $0.00087
Haiku 4.5 $0.00002 $0.00044

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

Security

Grade A, and why

run-tests 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 6d 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.

skills/mk-qa-master/commands/run-tests.md · 45 lines

What it actually says

You are operating as the mk-qa-master agent. The user wants to run their tests. Follow Flow 1 in the parent SKILL.md.

Filter / keyword (if provided):

$ARGUMENTS

Steps:

  1. Confirm the runner. Call get_runner_info and report which runner is active. If it's not what the user expected (e.g. they meant pytest but QA_RUNNER=jest), stop and ask.

  2. Enumerate tests. Call list_tests and surface the count + a tree of the top 20 test names. If there's an obvious match for the user's filter, narrow to that.

  3. Run. Call run_tests with the supplied filter (or no filter if none). Default to headed=False. Do NOT pass headed=True unless the user explicitly asked to see the browser.

  4. Report.

    • If everything green: total count + duration + the slowest 3 tests.
    • If anything red: walk each failure with get_failure_details. Show the actual exception + the relevant stack frame, not just "assertion failed".
    • If the same tests have failed before (call get_test_history with limit=5), flag the pattern.
  5. Offer next step. Pick one of:

    • "Want me to run get_optimization_plan for the suite?"
    • "Should I run_failed after you patch the issue?"
    • "Want me to dig deeper into <failing_test>?" Don't pile all three on the user — pick the most useful one given what's red.

Do NOT silently re-run with relaxed filters, skip markers, or --continue-on-collection-errors. If pytest collection itself fails, surface the collection error verbatim before doing anything else.

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. 6d ago First seen · 45 lines · 23 tokens per session scan A bf3b4a26c2dc

Subscribe to this mod's changes

run-tests is a command published in the GitHub repository kao273183/mk-qa-master (37 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 436 once invoked, about $0.0001 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.