derive-tests

derive-tests is a command for Claude Code from phuryn/pm-skills. It costs 92 tokens per session (2,453 once invoked), scanned A, original, MIT.

A command that turns an app’s written requirements into a map of test coverage, showing existing tests, proposed cases, and unverified gaps.

In plain words
What is it for?
Use it after documenting the app to map tests for important user flows, permissions, backend functions, and automation, then choose a CI check before merging code.
Why use it?
It makes missing tests visible and separates checks that can be automated from those needing a protected live environment or a person’s review. It produces test cases and a map, not the finished test suite.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the pm-ai-shipping plugin — 3 skills, 5 commands shipped together

Good fit Use it after documenting the app to map tests for important user flows, permissions, backend functions, and automation, then choose a CI check before merging code.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/phuryn/pm-skills/derive-tests
About the project

phuryn/pm-skills is a marketplace of reusable skills, commands, and plugins that guide AI assistants through product-management work such as discovery, strategy, planning, metrics, launches, and growth. It is for product managers and teams using Claude Code, Cowork, or compatible assistants. The catalogue entries are the project's own workflows and extensions.

phuryn/pm-skills · 27,241 stars · on GitHub · productcompass.pm

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.

Clone the repo
git clone --depth 1 https://github.com/phuryn/pm-skills

Made for: Claude Code.

Or install pm-ai-shipping, the plugin that ships this one along with the rest of its 3 skills, 5 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 derive-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/phuryn/pm-skills/derive-tests/github.svg)](https://agentmods.dev/commands/phuryn/pm-skills/derive-tests)
Your own site
<a href="https://agentmods.dev/commands/phuryn/pm-skills/derive-tests"><img src="https://agentmods.dev/badge/commands/phuryn/pm-skills/derive-tests/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 derive-tests

Your own site · 80×15
<a href="https://agentmods.dev/commands/phuryn/pm-skills/derive-tests"><img src="https://agentmods.dev/badge/commands/phuryn/pm-skills/derive-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,453 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.00092 $0.02453
Opus 5.5 $0.00037 $0.00981
Sonnet 5.5 $0.00018 $0.00491
Haiku 4.5 $0.00009 $0.00245

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

Security

Grade A, and why

derive-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 10d 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.

pm-ai-shipping/commands/derive-tests.md · 153 lines

How it starts

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

/derive-tests -- Turn Intent Into Tests

The docs say what the system should do. An audit finds where the code doesn't. Tests are what stop that gap from reopening after the next AI edit. This command reads the documented intent, turns each load-bearing rule into a concrete test case, sorts them into what to automate, what needs a guarded live run, and what stays manual — then recommends the gate that keeps main honest: the one the repo's own instructions define, or a green-before-merge CI gate where they define none.

This produces a coverage map (tests.md) and concrete test cases, not a finished suite — you or the next agent implement the deterministic ones. If the repo already keeps a test-coverage file, under any name, that file is the map: update it rather than starting a second one (the shipping-artifacts skill's Locations and names rule).

Invocation

/derive-tests
/derive-tests the checkout flow
/derive-tests supabase/functions
/derive-tests check
/derive-tests check the checkout flow

A first argument of check runs check-only mode (below) on the scope that follows it, instead of the workflow.

Prerequisite: documented intent

Tests are derived from the docs, so the docs come first. If the system docs (in the repo's docs location, or documentation/ by default) are missing or thin, run /document-app (and /derive-tests reads flows.md, permissions.md, and automation.md most heavily). You cannot map coverage to rules you never wrote down — where intent is absent, say so rather than inventing rules to test.

The workflow

1. Read the intent — and the tests that already exist

Read the applicable system docs (architecture, flows, permissions, variables, and any of emails, cron, seo, automation that exist). Apply the shipping-artifacts skill for what each doc should contain, and the intended-vs-implemented skill for the discipline of treating docs as claims to verify, not proof.

Then inventory the existing test suite — the test files, what they actually assert, and what runs in CI today. The map you produce must distinguish coverage that exists now from coverage you're proposing; skipping this step yields a falsely-green map that claims rules are pinned when nothing checks them. If there are no tests, say so plainly — that is itself a finding.

Read the full file on GitHub · 153 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. 10d ago Changed · +38 lines · +37 tokens per session f3c7f591f017
  2. 1mo ago First seen · 115 lines · 55 tokens per session scan A d6727d5569b1

Subscribe to this mod's changes

derive-tests is a command published in the GitHub repository phuryn/pm-skills (27,241 stars, last pushed 5d ago), licensed MIT. It adds 92 tokens to every session and 2,453 once invoked, about $0.0004 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-08-30.