write-fixture

A testing guide for using Fixture Monkey to write Java and Kotlin tests. It explains how to choose meaningful cases and set only the fixture properties that force each expected outcome.

In plain words
What is it for?
Use it when adding or editing tests with Fixture Monkey. It helps enumerate cases, choose inputs, and construct fixtures without modifying production sources.
Why use it?
It keeps tests focused and less fragile by leaving unrelated values random and preventing production-code changes during test work.

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/naver/fixture-monkey/write-fixture
Any agent
npx skills add naver/fixture-monkey --skill write-fixture
Clone the repo
git clone --depth 1 https://github.com/naver/fixture-monkey

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,735 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.00042 $0.07735
Opus 5 $0.00021 $0.03868
Sonnet 5 $0.00008 $0.01547
Haiku 4.5 $0.00004 $0.00773

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

Security

Grade A, and why

write-fixture 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 2d 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.

claude-plugins/fixture-monkey/skills/write-fixture/SKILL.md · 455 lines

How it starts

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

Writing tests with Fixture Monkey

Fixture Monkey generates test objects with random values. Two skills matter: choosing which cases to test, and knowing what not to set in each one.

Pin the properties that force the expected outcome. Leave everything else random.

A fixture that sets every field is a hand-rolled builder with extra ceremony — it breaks when an unrelated field is added, and it drags the test file into diffs it has nothing to do with.

Scope: tests only

Never modify production code. This work adds and edits tests. Production sources are read-only — read them to understand behaviour, never to change it.

That holds even when changing them would be easier:

Temptation Do instead
Add @ConstructorProperties, a no-arg constructor, or a setter so the type generates Choose a different introspector, or instantiate a specific constructor
Relax a validation annotation that keeps rejecting samples Pin the property to a valid value, or narrow the Arbitrary
Widen a field's visibility to reach it Reach it through the constructor or an existing accessor
Remove or weaken a @Nullable so defaultNotNull(true) reaches the field Leave the annotation alone: setNotNull the property, or empty the null-inject generator's nullable-annotation set — see Nullability comes first
"Fix" a bug the new test just exposed Report it and leave the failing test — see step 6

If a test genuinely cannot be written without a production change, stop and say so, naming the change and why it is needed. Let the user decide. A production edit smuggled in with a test is the one thing a reviewer will not be looking for.

Procedure

Steps 1–4 decide which tests to write. Steps 5–6 write each one.

1. Identify the method under test

Name the exact method. Read its body and the types it takes and returns. If the request is vague ("write tests for the order service"), narrow it to specific methods and say which ones you picked.

Read the full file on GitHub · 455 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 455 lines · 42 tokens per session scan A a27aa0ac08dc

Subscribe to this mod's changes

write-fixture is a skill published in the GitHub repository naver/fixture-monkey (697 stars, last pushed 9d ago), licensed Apache-2.0. It adds 42 tokens to every session and 7,735 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-30.

Related

Other skills, from other repositories

plugin-code-review-orchestrated

Orchestrates a code review of the spring-plugin repository through scope/context passes, routing, domain reviewer subskills, and per-artifact validation. Use when asked to review a PR, diff, commit, branch, module, or file set, to run a full orchestrated review, or to produce a validated review report.

explyt/spring-plugin · 72 tokens

review-async-lifecycle

Normative reviewer for EDT safety, coroutines, cancellation, read/write actions, disposal, listeners and async lifecycle in the explyt spring-plugin. Use during orchestrated code review when the diff touches threading, background tasks, read or write actions, listeners, MessageBus, Disposable ownership or progress…

explyt/spring-plugin · 66 tokens

review-findings-validator

Normative per-artifact validator: reads exactly one reviewer artifact, re-verifies every claim against real source code, classifies findings as TP, FP, or Need more data, and writes exactly one validated artifact. Use during the validation wave of an orchestrated code review, when asked to validate reviewer findings…

explyt/spring-plugin · 77 tokens

review-psi-vfs-indexing

Normative reviewer for PSI lifecycle, VFS, indexing, UAST, references, inspections, intentions and PSI performance traps in the explyt spring-plugin. Use during orchestrated code review when the diff touches PsiElement handling, VirtualFile processing, caches, indexes, completion contributors, inspections, line…

explyt/spring-plugin · 73 tokens

review-ui-platform

Normative reviewer for IntelliJ UI, Action System, ToolWindow, DialogWrapper, JCEF, accessibility and UI state consistency in the explyt spring-plugin. Use during orchestrated code review when the diff touches actions, tool windows, dialogs, settings panels, wizard steps, notifications, popups, renderers, icons or…

explyt/spring-plugin · 74 tokens

review-statistic-coverage

Usage-statistics coverage check for explyt/spring-plugin code reviews — verify that new user-visible features (quick fixes, intentions, gutter actions, completions, actions, tool-window controls, wizard steps) register usage via StatisticService and StatisticActionId. Use when reviewing a diff or PR that adds or…

explyt/spring-plugin · 85 tokens