test

test is a skill for Claude Code, Codex from nirelbaz/promptpit. It costs 43 tokens per session (375 once invoked), scanned A, original, MIT.

A guide for writing tests for new or changed code. Tests are small checks that confirm software behaves as expected.

In plain words
What is it for?
Use it after adding or changing code to identify testable behavior, write focused tests, and cover empty inputs, unusual values, errors, and state changes.
Why use it?
It helps catch regressions, error handling problems, and edge cases without tying tests to private implementation details.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/nirelbaz/promptpit/test
Any agent
npx skills add nirelbaz/promptpit --skill test
Clone the repo
git clone --depth 1 https://github.com/nirelbaz/promptpit

Made for: Claude Code, Codex.

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 test

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirelbaz/promptpit/test.svg)](https://agentmods.dev/skills/nirelbaz/promptpit/test)
Your own site
<a href="https://agentmods.dev/skills/nirelbaz/promptpit/test"><img src="https://agentmods.dev/badge/skills/nirelbaz/promptpit/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.00375
Opus 5 $0.00022 $0.00187
Sonnet 5 $0.00009 $0.00075
Haiku 4.5 $0.00004 $0.00038

Measured 5d ago against content hash cab239d5ff9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 5d 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.

.promptpit/skills/test/SKILL.md · 47 lines

What it actually says

Test

Write tests for the code you just wrote or changed.

Process

  1. Identify what changed: git diff --name-only or look at recent files
  2. For each changed file, determine what's testable
  3. Write tests that cover the behavior, not the implementation

Principles

  • Test what the code DOES, not how it does it. If you refactor the internals, the test should still pass.
  • One test, one assertion (when practical). A test called "works correctly" with 6 assertions is hiding 6 different behaviors.
  • Name tests by the behavior they verify: "returns empty array when no results found" not "test getResults"
  • Test the edges: empty input, null, zero, negative numbers, very long strings, special characters
  • If you fixed a bug, write a test that would have caught it. That's a regression test.

What to test

  • Public functions and methods (the contract other code depends on)
  • Error paths (what happens when things go wrong)
  • Boundary conditions (first item, last item, empty list, one item)
  • State transitions (before and after an action)

What NOT to test

  • Private implementation details
  • Third-party library behavior
  • Simple getters/setters with no logic
  • Configuration constants

Match existing patterns

Before writing tests, read 2-3 existing test files in the project. Match:

  • File naming convention
  • Import style
  • Assertion library and syntax
  • Setup and teardown patterns
  • Directory structure
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. 5d ago First seen · 47 lines · 43 tokens per session scan A cab239d5ff9c

Subscribe to this mod's changes

test is a skill published in the GitHub repository nirelbaz/promptpit (6 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 375 once invoked, about $0.0002 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

gsap-scrolltrigger

Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is…

calesthio/OpenMontage · 68 tokens

gsap-core

Official GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion). Use when the user asks for a JavaScript animation library, animation in React/Vue/vanilla, GSAP tweens, easing, basic animation, responsive or reduced-motion…

calesthio/OpenMontage · 128 tokens

threejs-geometry

Three.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use when creating 3D shapes, working with vertices, building custom meshes, or optimizing with instanced rendering.

calesthio/OpenMontage · 46 tokens

threejs-interaction

Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences.

calesthio/OpenMontage · 44 tokens

threejs-textures

Three.js textures - texture types, UV mapping, environment maps, texture settings. Use when working with images, UV coordinates, cubemaps, HDR environments, or texture optimization.

calesthio/OpenMontage · 41 tokens

playwright-recording

Record browser interactions as video using Playwright. Use for capturing demo videos, app walkthroughs, and UI flows for Remotion videos. Triggers include recording a demo, capturing browser video, screen recording a website, or creating walkthrough footage.

calesthio/OpenMontage · 53 tokens