write-tests

write-tests is a skill for Claude Code from hoblin/claude-ruby-marketplace. It costs 55 tokens per session (853 once invoked), scanned A, original, MIT.

A guide for writing and reviewing tests, which are checks that describe how an application's features should behave. It focuses on tests that use the same interface as callers and describe business behavior rather than internal implementation.

In plain words
What is it for?
It helps create new tests, change existing tests, and audit a test suite so tests catch regressions in application behavior.
Why use it?
It helps avoid tests that break during harmless refactoring, test dependencies instead of the application, or fail for reasons unrelated to a real feature problem. The result is a test suite whose failures are more useful.

Skill for Claude Code

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

Part of the rpi plugin — 17 skills, 12 agents, 1 hook shipped together

Good fit It helps create new tests, change existing tests, and audit a test suite so tests catch regressions in application behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoblin/claude-ruby-marketplace/write-tests
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 hoblin/claude-ruby-marketplace --skill write-tests
Clone the repo
git clone --depth 1 https://github.com/hoblin/claude-ruby-marketplace

Made for: Claude Code.

Or install rpi, the plugin that ships this one along with the rest of its 17 skills, 12 agents, 1 hook.

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 write-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/write-tests/github.svg)](https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/write-tests)
Your own site
<a href="https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/write-tests"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/write-tests/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 write-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/write-tests"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 853 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.00055 $0.00853
Opus 5.5 $0.00022 $0.00341
Sonnet 5.5 $0.00011 $0.00171
Haiku 4.5 $0.00006 $0.00085

Measured today against content hash 78d164c76299, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-tests 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 today.

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/rpi/skills/write-tests/SKILL.md · 35 lines

How it starts

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

A test describes a feature of our application: what it does, in the terms of its business logic. The description comes first and the code follows it. From then on the test keeps the feature to its description: its job is not to prove the feature works today but to catch the next change that breaks it.

Everything a test is follows from that. It describes our feature, so it describes our code only. A dependency's behaviour is not our feature: its interfaces change rarely, and when they do, the pull request that updates it is where that change is checked. A test that guards a dependency runs on every CI run to catch what happens once per upgrade. Nor is the absence of something: a test that it stays absent describes nothing.

It describes what the feature does, not how it is built, so it looks from outside, through the interface the feature's callers use, and a refactor that keeps the behaviour leaves it green.

And so it fails when the feature no longer does what it describes, and for no other reason. A failure that isn't a broken feature is a false alarm: it costs whoever merges next and teaches the team to distrust red.

Sandi Metz: "The Magic Tricks of Testing"

A unit test looks at its object from outside, along its edge. An object has an inside and an outside, and its behaviour is only what crosses the edge and matters to the rest of the application: what it answers when asked, the change it makes when told, and the commands it sends to others. What stays inside, its private methods and the questions it asks its collaborators, is how it is built, and a test that looks there fixes the implementation in place.

Each fact is proved in one place: in the test of the object that owns it. An answer is asserted where it is given, and a command's effect in the test of the object that carries it out. The object that sends a command proves only that it sent it, and trusts the receiver, whose own test proves the effect. Proving that effect again from the sender repeats the receiver's test and ties the sender to code it doesn't own.

Read the full file on GitHub · 35 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. today Changed · +2 lines 78d164c76299
  2. yesterday First seen · 33 lines · 55 tokens per session scan A 908bbe95f61e

Subscribe to this mod's changes

write-tests is a skill published in the GitHub repository hoblin/claude-ruby-marketplace (38 stars, last pushed today), licensed MIT. It adds 55 tokens to every session and 853 once invoked, about $0.0002 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-12-04.

Related

write-tests compared with skills from other repositories

write-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-testshoblin/claude-ruby-marketplaceSkill38todayMITA55Claude Code
railsericrisco/rsc-harnessSkill7072d agoMITA93Claude Code, Codex
Capybara TestingPramodDutta/qaskillsSkill2531mo agoMITA46Claude Code, Codex
projectmodu-ai/moai-coworkSkill3201mo agoApache-2.0A475Claude Code
doc-html-slidemodu-ai/moai-coworkSkill3201mo agoApache-2.0A438Claude Code
commerce-detail-page-copymodu-ai/moai-coworkSkill3201mo agoApache-2.0A330Claude Code
meta-skill-testermodu-ai/moai-coworkSkill3201mo agoApache-2.0A154Claude Code