targeted-testing

targeted-testing is a skill for Claude Code from ihabkhaled/AI-Psychiatry. It costs 24 tokens per session (216 once invoked), scanned A, original, MIT.

A method for choosing tests and validation commands based on the size and risk of a code change. It starts with focused checks and expands to broader checks when needed.

In plain words
What is it for?
Selecting unit, integration, end-to-end, lint, type-check, build, security, and repository checks, while classifying any failures.
Why use it?
It provides useful evidence without repeatedly running slow or unrelated test suites.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-psychiatry plugin — 55 skills shipped together

Good fit Selecting unit, integration, end-to-end, lint, type-check, build, security, and repository checks, while classifying any failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihabkhaled/ai-psychiatry/targeted-testing
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.

Any agent
npx skills add ihabkhaled/AI-Psychiatry --skill targeted-testing
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/AI-Psychiatry

Made for: Claude Code.

Or install ai-psychiatry, the plugin that ships this one along with the rest of its 55 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 targeted-testing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/targeted-testing"><img src="https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/targeted-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 216 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.00024 $0.00216
Opus 5 $0.00012 $0.00108
Sonnet 5 $0.00005 $0.00043
Haiku 4.5 $0.00002 $0.00022

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

Security

Grade A, and why

targeted-testing 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.

.ai/skills/targeted-testing/SKILL.md · 37 lines

What it actually says

Targeted Testing

Core principle

Test from smallest relevant proof to required global gate; schedule quality intelligently without lowering it.

Procedure

  1. Map the change to its closest unit or focused test.
  2. Run the failing or targeted proof first.
  3. Expand to relevant integration and E2E only as risk requires.
  4. Run lint, typecheck, build, and repository gates at the appropriate checkpoint.
  5. Classify failures as introduced, pre-existing, environmental, flaky, or unknown.
  6. Record what each command proves.

Required output

Test sequence, results, failure classification, and remaining mandatory gate.

Limits

Do not rerun full suites after every small edit unless policy requires it.

Common mistakes

Do not skip security or regression gates, or run commands without knowing the evidence sought.

Stop condition

Stop when the current checkpoint has sufficient proof and continue to the next unmet requirement.

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 First seen · 37 lines · 24 tokens per session scan A 6291071ece8d

Subscribe to this mod's changes

targeted-testing is a skill published in the GitHub repository ihabkhaled/AI-Psychiatry (3 stars, last pushed 25d ago), licensed MIT. It adds 24 tokens to every session and 216 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-31.

Related

Other skills, from other repositories

implement

Use when an approved plan and task list exist and it is time to turn them into working, tested code — the SDD phase after analyze and before verify. Enforces TDD: a failing test comes before the code that makes it pass, one task at a time, appended to a progress ledger that survives compaction. Delegates test tooling…

ericrisco/rsc-harness · 123 tokens

agent-eval

Use when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual recall) or agent trajectories (tool correctness, completion), or picking an eval framework. NOT building the agent loop, tools or RAG…

ericrisco/rsc-harness · 79 tokens

csharp-dotnet

Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST…

ericrisco/rsc-harness · 89 tokens

debug

Use when something is broken — a failing or flaky test, crash, wrong result or regression — and the root cause must be reproduced and proven before any fix. On-demand; callable mid-implement. NOT a feature to spec or build (that is specify/implement), NOT the lint/test gate (that is verify), NOT adversarial diff…

ericrisco/rsc-harness · 85 tokens

e2e-testing

Use when writing or stabilizing Playwright tests that drive a real browser through multi-step journeys — durable locators, web-first assertions, storageState auth, trace/retries, and flakes that only bite in CI. NOT in-process component tests (that is testing-web), NOT WCAG auditing (that is accessibility), NOT the…

ericrisco/rsc-harness · 79 tokens

github-actions

Use when authoring or fixing GitHub Actions CI/CD — workflows under .github/workflows, triggers, job matrix, caching, token permissions, OIDC cloud deploys, environment gates, reusable workflows. NOT the Dockerfile or image build strategy (that is docker), NOT the branching model (that is git-workflow), NOT release…

ericrisco/rsc-harness · 81 tokens