add-test

add-test is a skill for Claude Code from wallieinformal201/pentest-mcp-server. It costs 41 tokens per session (3,215 once invoked), scanned A, a copy of add-test, Apache-2.0.

A guide for creating tests for an existing tool, service, or resource, using the project's established test layout and testing conventions.

In plain words
What is it for?
Use it when adding tests or improving coverage, especially for handlers that need success, failure, and edge-case checks.
Why use it?
It reduces the chance that normal cases, errors, or unusual inputs remain untested.

Skill for Claude Code

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

Part of the @cyanheads/pentest-mcp-server plugin — 31 skills shipped together

Good fit Use it when adding tests or improving coverage, especially for handlers that need success, failure, and edge-case checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wallieinformal201/pentest-mcp-server/add-test
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 wallieinformal201/pentest-mcp-server --skill add-test
Clone the repo
git clone --depth 1 https://github.com/wallieinformal201/pentest-mcp-server

Made for: Claude Code.

Or install @cyanheads/pentest-mcp-server, the plugin that ships this one along with the rest of its 31 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 add-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/wallieinformal201/pentest-mcp-server/add-test/github.svg)](https://agentmods.dev/skills/wallieinformal201/pentest-mcp-server/add-test)
Your own site
<a href="https://agentmods.dev/skills/wallieinformal201/pentest-mcp-server/add-test"><img src="https://agentmods.dev/badge/skills/wallieinformal201/pentest-mcp-server/add-test/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 add-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/wallieinformal201/pentest-mcp-server/add-test"><img src="https://agentmods.dev/badge/skills/wallieinformal201/pentest-mcp-server/add-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,215 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 89% copy Near-identical to another mod 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.00041 $0.03215
Opus 5 $0.00020 $0.01607
Sonnet 5 $0.00008 $0.00643
Haiku 4.5 $0.00004 $0.00321

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

Security

Grade A, and why

add-test 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 12d 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.

Origin

This is a copy

89% identical to add-test — 62 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/add-test/SKILL.md · 296 lines

How it starts

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

Context

Tests use Vitest and createMockContext from @cyanheads/mcp-ts-core/testing. If the repo already has tests, match the existing layout. If the repo has no existing tests, create a root tests/ directory that mirrors the src/ structure (e.g. tests/mcp-server/tools/definitions/echo.tool.test.ts for src/mcp-server/tools/definitions/echo.tool.ts).

For the full createMockContext API and testing patterns, read:

skills/api-testing/SKILL.md

Steps

  1. Identify the target — which tool, resource, or service needs tests
  2. Read the source file — understand the handler's logic, input/output schemas, error paths, and which ctx features it uses
  3. Create the test file in the repo's existing test layout — search for existing *.test.ts files to confirm whether tests are colocated with source or under a root tests/ directory
  4. Write test cases covering happy path, error paths, and edge cases
  5. Run bun run test to verify
  6. Run bun run devcheck to verify lint, types, and MCP definitions

Determining What to Test

Read the handler and identify:

Aspect Test Strategy
Happy path Valid input → expected output. Include at least one.
Input variations Optional fields omitted, defaults applied, boundary values
Error paths Invalid state, missing resources, service failures → correct error thrown
ctx.state usage Use createMockContext({ tenantId: 'test' }) to enable storage
ctx.elicit / ctx.sample Mock with vi.fn(), also test the absent case (undefined)
ctx.progress Use createMockContext({ progress: true }) for task tools
ctx.fail (typed contract) Definitions with errors[] need fail attached to the mock ctx — createMockContext({ errors: myTool.errors }) does it for you. Assert on data.reason (stable per-contract entry), not just code.
format function Test separately if defined — it's pure, no ctx needed. Verify it renders the IDs and fields the model needs, not just a count or title. For projection-style tools, test non-default field selections.
Sparse upstream payloads For third-party API integrations, build a fixture with omitted fields. Assert normalized output still validates and format() preserves unknown values instead of inventing facts.
Form-client payloads If handler has optional fields: test with empty-string inner values (form clients send "" instead of undefined). Assert handler doesn't break or produce invalid output.
Auth scopes Not tested at handler level (framework enforces) — skip

Read the full file on GitHub · 296 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. 12d ago First seen · 296 lines · 41 tokens per session scan A 1c346f1a9305

Subscribe to this mod's changes

add-test is a skill published in the GitHub repository wallieinformal201/pentest-mcp-server (2 stars, last pushed today), licensed Apache-2.0. It adds 41 tokens to every session and 3,215 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to add-test, differing in 62 lines, and is treated as a copy.

Related

Other skills, from other repositories

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens

workflow-patterns

Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.

wshobson/agents · 35 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens

agent-evaluation

Run one specified Test Agent on one specified Benchmark Case exactly once, privately score that execution, and return one protocol result.

Prism-Shadow/penguin-harness · 28 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens