Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Testing

ASecurity

Use when about to write, add or change a test in any project — a unit, component, API or E2E test, a regression test for a bug, or tests for a change just made. Preloaded into code-writing agents (implementation and bugfix) so the authoring core is in context before the first test file is written. Fires on "write a test for", "add a regression test", "add tests for this change", "cover this with a test", "write a Playwright spec for". Not for: planning or auditing a suite, choosing which test...

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsgobashtestingapifrontendbackend

Works with

api

Security Analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned 10/7/2026

$npx -y skills add yacb2/aidex --skill testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yacb2-testing/badge)](https://www.skillsdirectory.com/skills/yacb2-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: testing
description: 'Use when about to write, add or change a test in any project — a unit, component, API or E2E test, a regression test for a bug, or tests for a change just made. Preloaded into code-writing agents (implementation and bugfix) so the authoring core is in context before the first test file is written. Fires on "write a test for", "add a regression test", "add tests for this change", "cover this with a test", "write a Playwright spec for". Not for: planning or auditing a suite, choosing which tests to run, fixtures, the E2E environment or the testing profile (/aidex:coverage); the RED-first bug-fix procedure (/aidex:bugfix).'
allowed-tools: Bash Read Grep Glob Write Edit
---

# Testing

The write-time core: what to answer before a test is written, where it goes, what it
looks like and what to run. It is the single owner of the four questions and of the
one-owner rule; `coverage` owns the doctrine behind them (layers, selection, fixtures,
the E2E environment, the profile) and `bugfix` the RED→GREEN procedure.

## Before adding a test

Answer four questions; a missing answer means the test is not added yet.

1. What observable behaviour or contract does it protect?
2. What credible regression turns it red?
3. Why does no existing test already catch that? One contract has one owner test, at the
   layer the layer model assigns; extend that test or its table before adding a sibling.
4. Does it need an export, flag or hook no production caller needs? Then test at the real
   boundary instead.

A test that breaks under a behaviour-preserving refactor asserts implementation. A
change that opened no new way to fail needs no new test — say so instead of writing one.

## Layer

The lowest layer that can observe the failure, by the rubric in
`${CLAUDE_PLUGIN_ROOT}/skills/coverage/references/01-layer-model.md`: test the decision,
not the pixels — except when the browser is what decides. State the layer and a
one-sentence reason with the test.

## Shape

Read the project's `.context/profiles/testing.md`, take `testing_packs`, and open each
pack's `${CLAUDE_PLUGIN_ROOT}/skills/<pack>/SKILL.md`: its "Question -> file" table names
the test-shapes reference for the layer at hand. Follow the project's existing tests
next to the code. No profile, or a pack that is not installed: say so and follow
`${CLAUDE_PLUGIN_ROOT}/skills/coverage/SKILL.md` § Resolving the stack packs — never
improvise framework content from memory.

## What to run

The new or changed test alone, by the profile's single-test command for its leg
(`backend_test_cmd`, `frontend_test_cmd`, `e2e_test_cmd`, each taking `{path}`), then the
selection for the diff:
`${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/affected-tests.sh --command`. The full suite
is the integration-boundary gate, not a per-change one. A test that was never seen red
has not shown it can fail
(`${CLAUDE_PLUGIN_ROOT}/skills/coverage/references/15-green-that-proves-nothing.md`).

## Bug regressions

One regression test, once, at the layer that owns the failure — never the same scenario
replayed at unit, API and E2E. If an existing test should have caught the bug, fix or
extend that test (a new table row). RED first, then the fix: `bugfix` owns that procedure.

## Tests that earn nothing

The patterns that fail the four questions, the retention bar that keeps a test anyway,
and what to name before deleting one:
[references/16-tests-that-earn-nothing.md](references/16-tests-that-earn-nothing.md).

Attribution

yacb2yacb2
View sourceSee grades on GitHubMore from yacb2 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →