testing-patterns

testing-patterns is a skill for Claude Code from Jartan-LLC/grimoire. It costs 23 tokens per session (425 once invoked), scanned A, original, MIT.

A guide to integration testing, where a test checks that connected parts of an application work together through an observable interface such as an HTTP endpoint. It covers behavior-focused assertions, reusable fixtures, and markers for library internals.

In plain words
What is it for?
Use it when testing web endpoints, authentication, middleware, rate limits, emails, database side effects, or other behavior spanning multiple application parts.
Why use it?
It keeps tests focused on what users can observe instead of fragile implementation details, while reducing repeated setup code.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the praxis plugin — 16 skills, 7 agents shipped together

Good fit Use it when testing web endpoints, authentication, middleware, rate limits, emails, database side effects, or other behavior spanning multiple application parts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jartan-llc/grimoire/testing-patterns
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 Jartan-LLC/grimoire --skill testing-patterns
Clone the repo
git clone --depth 1 https://github.com/Jartan-LLC/grimoire

Made for: Claude Code.

Or install praxis, the plugin that ships this one along with the rest of its 16 skills, 7 agents.

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 testing-patterns

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/testing-patterns"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/testing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 425 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.00023 $0.00425
Opus 5.5 $0.00009 $0.00170
Sonnet 5.5 $0.00005 $0.00085
Haiku 4.5 $0.00002 $0.00042

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

Security

Grade A, and why

testing-patterns 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 1mo 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.

plugins/praxis/skills/testing-patterns/SKILL.md · 45 lines

What it actually says

Testing Philosophy

Integration Tests Verify Behavior, Not Internals

Integration tests must verify observable behavior through endpoints, not implementation details.

Good integration tests:

  • Drive endpoints with an HTTP client
  • Assert status codes and response bodies
  • Verify side effects (emails sent, database rows created, audit entries logged)
  • Test cross-cutting concerns (middleware, auth, rate limiting)

Bad integration tests:

  • Calling internal service functions for behavior already observable via HTTP
  • Using DB queries as the primary assertion surface (DB is for post-assertion verification)
  • Testing internal query functions or utility functions -- those belong in unit tests
  • Duplicating coverage already exercised by another test

Prefer Fixture Composition

If a test starts with boilerplate setup (register a user, log in, configure a setting), that belongs in a fixture. Test bodies should stay focused on what they're actually testing.

Build fixture stacks: user -> logged_in_user -> admin_user. Each level adds one concern. Tests request the level they need.

Canary Markers for Library Internals

When code depends on a library's private or poorly-documented internals, add a canary test that asserts the internal's shape directly -- don't rewrite production code to avoid the dependency when doing so would cost real accuracy or capability.

The canary turns an upstream rename or shape change into a loud test failure instead of a silent runtime bug.

Canary practices:

  • Assert the specific attribute/method and the shape of its return value -- not just "no exception raised"
  • Name the test so the failure message makes the breakage obvious (e.g., test_library_rate_limit_contract), since it'll likely be read by whoever just bumped a dep
  • Place it close to the module that uses the internal
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. 1mo ago First seen · 45 lines · 23 tokens per session scan A 57b9cd891ba9

Subscribe to this mod's changes

testing-patterns is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 425 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

qa

Exercise the delivered customer journey using real runtime or browser evidence. Use for functional acceptance testing after implementation, including failure paths.

suboss87/FDEOps · 26 tokens

test-go

Write, review, and improve Go test code for this project. Use whenever generating, reviewing, or modifying Go tests - including when invoked by the Tester agent, the /test prompt, or any test-related request. Covers table-driven tests, subtests, t.Parallel(), test helpers with t.Helper(), error assertions via…

sergeyklay/.agents · 109 tokens

test-ts

Write, review, and run TypeScript/React tests for this Next.js 16 App Router project. Use whenever writing or modifying .test.ts or .test.tsx files, adding test coverage to components, hooks, Server Actions, or utilities, setting up Vitest configuration, or asked about testing strategy. Covers Vitest (the project's…

sergeyklay/.agents · 139 tokens

bro-mcp-loop

Điều phối vòng lặp khép kín (Autonomous Multi-Agent Loop) giữa Lead Planner (Codex/Cursor), Executor (Antigravity) và Hội đồng Review Triad (Code, UI, QA) qua chuẩn bro-mcp. Kích hoạt khi cần lập plan, giao việc, code, test và review tự động sửa lỗi cho đến khi hoàn thành.

wedabro/bro-skills · 81 tokens

prove-checks

Prove a passing check was capable of failing before recording it as evidence. Use when a test, CI job, build-and-diff, smoke test or rehearsal comes back green and that green is about to be treated as proof - especially when the check depends on a setup mutation (a sed/awk rewrite, an env var, a secret, a fixture…

sergeyklay/.agents · 221 tokens

request-to-spec-issues

Use after a grill-change session is complete to turn the agreement record into an intent-first spec candidate and vertical TDD-ready issue briefs.

jsuvic/agent-profile · 33 tokens