spring-test-writing

spring-test-writing is a skill for Claude Code from JeonJe/claude-plugins. It costs 85 tokens per session (1,110 once invoked), scanned A, original, MIT.

A workflow for taking a coding task from requirements through research, planning, implementation, testing, review, and a final commit check. It selects more steps for complex or risky changes.

In plain words
What is it for?
It helps analyze multi-file changes, record research and plans, get plan feedback, review code independently, run tests and checks, validate end-to-end behavior when needed, and retry failed verification.
Why use it?
It makes verification explicit, helping catch missing requirements, design problems, regressions, and untested edge cases before a change is committed.

Skill for Claude Code

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

Part of the arch-patterns plugin — 3 skills shipped together

Good fit It helps analyze multi-file changes, record research and plans, get plan feedback, review code independently, run tests and checks, validate end-to-end behavior when needed, and retry failed verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeonje/claude-plugins/spring-test-writing
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 JeonJe/claude-plugins --skill spring-test-writing
Clone the repo
git clone --depth 1 https://github.com/JeonJe/claude-plugins

Made for: Claude Code.

Or install arch-patterns, the plugin that ships this one along with the rest of its 3 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 spring-test-writing

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeonje/claude-plugins/spring-test-writing.svg)](https://agentmods.dev/skills/jeonje/claude-plugins/spring-test-writing)
Your own site
<a href="https://agentmods.dev/skills/jeonje/claude-plugins/spring-test-writing"><img src="https://agentmods.dev/badge/skills/jeonje/claude-plugins/spring-test-writing.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,110 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.00085 $0.01110
Opus 5 $0.00043 $0.00555
Sonnet 5 $0.00017 $0.00222
Haiku 4.5 $0.00009 $0.00111

Measured 7d ago against content hash 8efb932b5404, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

spring-test-writing 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 7d 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/arch-patterns/skills/spring-test-writing/SKILL.md · 51 lines

How it starts

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

Spring Test Writing

Test-writing methodology for Java/Spring, distilled from a production multi-module codebase. Entry point: pick the test type, read its reference, and run the quality checklist before commit.

AI 테스트 작성 시 필수 확인

  1. given/when/then 주석 구조 사용
  2. @DisplayName 으로 비즈니스 의도 명시 (팀 언어로)
  3. @Nested 로 시나리오 그룹화
  4. @MockitoBean 사용 — @MockBean은 Spring Boot 3.4+에서 레거시
  5. Thread.sleep 금지@Transactional 자동 롤백과 관찰 가능한 조건 대기 활용
  6. 테스트 후 반드시 빌드 검증: ./gradlew :{module}:test --tests "ClassName"
  7. 테스트 데이터는 고정 날짜 사용 (LocalDate.of(...)) — LocalDate.now() 금지
  8. soft-delete 프로젝트라면 프로덕션 코드의 미삭제 조건 누락 여부를 테스트에서 확인
  9. 커밋 전 references/quality-check.md 실행

테스트 타입 선택

타입 문서 언제 사용
단위 테스트 references/unit-test.md Service, Domain 로직 (Spring Context 불필요)
컨트롤러 테스트 references/controller-test.md REST API 엔드포인트 + API 문서 자동 생성
DB 통합 테스트 references/testcontainers-db-test.md Mapper/Repository 쿼리 검증 — 실 DB 엔진으로
품질 검증 references/quality-check.md 작성 완료 후, 커밋 전

모듈별 베이스 클래스 원칙

테스트를 새로 쓰기 전에 그 모듈의 기존 베이스 클래스를 먼저 찾는다 (컨트롤러용 RestDocs 베이스, 통합 테스트 베이스, Testcontainers 베이스). 모듈마다 헬퍼 시그니처·Mock 구성이 다를 수 있으므로, 같은 모듈의 최근 테스트 1개를 열어 패턴을 확인한 뒤 동일하게 작성한다. 베이스 클래스가 없는 모듈에서 처음 만들 때만 인접 모듈 것을 참조해 신설한다.

도메인 테스트 퀵레퍼런스 (복잡 도메인 권장)

핵심 도메인(결제·예약·정산 등)은 테스트 가이드와 별도로 그 도메인 전용 퀵레퍼런스 문서를 유지한다. 새 사람(또는 새 세션의 AI)이 "이 도메인을 건드리면 무엇부터 테스트해야 하나"를 문서 하나로 파악하게 하는 것이 목적. 구성:

  1. 우선순위 매트릭스 — Critical(배포 전 필수) / High / Medium으로 시나리오를 분류. Critical은 "이게 깨지면 돈/데이터가 틀어지는 것"만.
  2. 진입점별 테스트 맵 — 커맨드 서비스의 공개 메서드마다 필요한 테스트 케이스 나열.
  3. 핵심 예외 시나리오 — 이 도메인 특유의 실패 경로 (중복 요청, 한도 초과, 역순 콜백 등).
  4. DB 검증 체크리스트 — 성공 케이스 후 테이블별 기대 상태 (어느 테이블에 몇 행, 어떤 컬럼 값). "응답 200"이 아니라 영속 상태가 성공의 정의다.
  5. 부수효과 검증 — 알림·이벤트·캐시 무효화가 발생/미발생해야 하는 조건.
  6. 패턴 체인 검증 — Factory/Strategy 등 분기 구조가 있으면 각 분기의 선택 조건 테스트.

Read the full file on GitHub · 51 lines

Files

What ships with it

4 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. 7d ago First seen · 51 lines · 85 tokens per session scan A 8efb932b5404

Subscribe to this mod's changes

spring-test-writing is a skill published in the GitHub repository JeonJe/claude-plugins (3 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 1,110 once invoked, about $0.0004 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

test-quality

Write high-quality JUnit 5 tests with AssertJ assertions. Use when user says "add tests", "write tests", "improve test coverage", or when reviewing/creating test classes for Java code.

decebals/claude-code-java · 45 tokens

java-unit-test

A code-generation guide for Java unit tests in Spring Boot projects. Unit tests check one small piece of code in isolation; Spring Boot is a Java framework for building web applications and services.

hashgraph-online/awesome-codex-plugins · 113 tokens

typescript

TypeScript strict mode with eslint and jest.

alinaqi/maggy · 10 tokens

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

java-regression-test-generator

Automatically generate regression tests for Java codebases by analyzing changes between old and new code versions. Use when users need to: (1) Generate tests after refactoring or code changes, (2) Ensure previously tested behavior still works in new versions, (3) Cover modified or newly added code paths, (4) Migrate…

ArabelaTso/Skills-4-SE · 111 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens