# Test With Subagent

> Use when tests need to be run with minimal output noise and delegated execution; routes test runs through the dedicated test-runner subagent and returns curated pass/fail evidence.

- Skill: `tomevault-io/test-with-subagent` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/test-with-subagent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/test-with-subagent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/test-with-subagent

---


# Test With Subagent

## Overview

Always run tests through the `test-runner` subagent to keep the main thread clean and high signal.

**Core principle:** Delegate test execution; keep only actionable results.

## Policy

- ALWAYS use this skill for running tests.
- ALWAYS dispatch the `test-runner` subagent before any direct test command.
- Do not bypass this flow unless the calling agent explicitly requires full raw logs for deep harness debugging.

## Required Pattern

1. Dispatch the `test-runner` subagent (never run tests directly first).
2. Give scope (`full suite` or specific target like file/package/crate).
3. Ask for curated output only: command source, command, PASS/FAIL, duration, relevant failures, short actionable excerpt.
4. Use the returned signal to decide next step.

## Prompt Template

```markdown
Run tests using the test-runner workflow.

Scope: <full suite | specific target>
Context: <optional reason, e.g. pre-commit check or regression verification>

Return only:
- Test command source (AGENTS.md or inferred)
- Command executed
- PASS/FAIL
- Duration if available
- If failing: failing tests and a 5-15 line actionable excerpt
```

## Failure Handling

- If failure is clear, fix code/tests and re-run via `test-runner`.
- If failure is ambiguous, request one additional run scoped to the failing target.
- Escalate to direct/manual execution only when curated output is insufficient.

## Red Flags

- Running raw `make test` in the main thread before delegation
- Posting full unfiltered test logs to the calling agent
- Ignoring AGENTS.md command guidance
- Switching away from Makefile-first inference without a clear reason

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/withakay) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

