본문으로 건너뛰기
cccskills
무료GitHub에 공개

spring-boot-team-harness

Use when a team wants every developer's coding agent (Claude Code or Codex) to follow the same rules on a Maven Spring Boot 4 repository: setting up AGENTS.md, guardrails, shared agent settings, or build and CI checks that agents must pass before code merges. It adds ./mvnw verify gates that fail on null-safety bugs (NullAway with JSpecify), module-boundary breaches (Spring Modulith), unknown or deprecated Boot property keys, Spring mistakes that compile (ArchUnit) and unformatted code, Claude Code hooks that run those gates before a turn ends, and a CI workflow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace스타 80(GitHub 80 + cccskills 0)
연동 도구Docker

실행 점수 미검증

설치 방법 보기

포함된 파일(26)

  • SKILL.md13.2 KB
  • assets/pom/dependencies.xml236 B
  • assets/pom/managed-dependencies.xml355 B
  • assets/pom/modules-dependencies.xml269 B
  • assets/pom/plugins.xml2.0 KB
  • assets/pom/properties.xml471 B
  • assets/pom/rules-dependencies.xml268 B
  • assets/project-skills/add-module/SKILL.md1.5 KB
  • assets/project-skills/db-migration/SKILL.md1.6 KB
  • assets/project/.claude/hooks/guard.sh3.4 KB
  • assets/project/.claude/hooks/verify-on-stop.sh7.4 KB
  • assets/project/.claude/settings.json1.3 KB
  • assets/project/.github/workflows/verify.yml435 B
  • assets/project/.mvn/jvm.config644 B
  • assets/project/AGENTS.md6.9 KB
  • assets/project/CLAUDE.md11 B
  • assets/project/REVIEW.md1.2 KB
  • assets/tests/archunit.properties106 B
  • assets/tests/BuildSetupTests.java9.0 KB
  • assets/tests/CodeRulesTests.java34.0 KB
  • assets/tests/ConfigurationKeysTests.java9.1 KB
  • assets/tests/ModuleBoundariesTests.java479 B
  • assets/tests/UnusedCodeTests.java7.1 KB
  • scripts/apply_harness.py27.9 KB
  • scripts/baseline.py4.7 KB
  • scripts/report.py5.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Spring Boot team harness

The harness steers the agent in three places. AGENTS.md tells it how this repository works before it starts. Hooks check its work before a turn ends, so it fixes its own mistakes. ./mvnw verify in CI holds the same gates for every developer and every tool. Rules live in the build wherever they can: a gate holds whoever writes the code and costs no context.

Apply it

  1. Run the script from the project root. Preview with --dry-run first:

    python3 ${CLAUDE_SKILL_DIR}/scripts/apply_harness.py . --dry-run
    python3 ${CLAUDE_SKILL_DIR}/scripts/apply_harness.py .
    

    ${CLAUDE_SKILL_DIR} is this skill's folder. Codex doesn't set it, so there use the folder this SKILL.md is in. Run it in the Maven project's folder. When that folder is inside a larger repository (for example backend/ next to frontend/), the CI workflow, .claude/settings.json, the hooks and .gitattributes go to the repository root, where GitHub and Claude Code read them, and the root AGENTS.md gets a line pointing to the project's own. The Stop hook then reacts only to changes in that folder.

    Pass --no-modules when the base package's subpackages are layers (controller, service, domain) rather than modules; Spring Modulith would report them as cycles. Rerunning with --no-modules after a run without it removes ModuleBoundariesTests and the add-module skill unless they were edited, and names what to remove from AGENTS.md by hand.

    NullAway checks every class under the base package by default. On an existing codebase with many null findings, offer --nullaway marked: NullAway then checks only packages whose package-info.java has @NullMarked, so the team adopts null-safety one package at a time instead of marking classes @NullUnmarked across the codebase. The script reports how many packages are marked. With none, NullAway checks nothing, so mark at least the packages the team changes most. A rerun keeps the pom's mode unless --nullaway is passed again. Switch to --nullaway all once every package is marked.

    It adds only what the project lacks. In the pom, it skips any property, dependency or plugin that is already declared, so an existing Spotless or Spring Modulith setup stays as it is. It adds CLAUDE.md (one line, @AGENTS.md), .claude/settings.json and its two hook scripts, .mvn/jvm.config, the three tests, a CI workflow, and project skills in both .claude/skills/ and .agents/skills/. It merges its permissions, hooks and plugin into an existing .claude/settings.json, adds its CI workflow only when no workflow runs Maven (as harness-verify.yml if verify.yml is taken), appends its gate section to an existing AGENTS.md, skips the boundary test when a test already calls ApplicationModules.of(...), and never overwrites a file the team has edited. Rerun it after updating this plugin: it adds the pieces the project is missing and updates the files it owns (hooks, tests, project skills, its workflow) that nobody has changed since, which it tracks in .claude/harness.lock. It reports each edited one so you can merge the new version by hand. Don't copy harness files into a project by hand: rerun the script instead. A rerun also fills in template placeholders left in AGENTS.md, and reports an archunit.properties that allows store creation. If <build><plugins> already configures maven-compiler-plugin, it stops: merge that part of assets/pom/plugins.xml by hand and run it again.

  2. Run ./mvnw spotless:apply and commit the result on its own, so the reformat stays out of later diffs. On an existing codebase, add that commit's hash to .git-blame-ignore-revs so git blame skips it.

  3. Get ./mvnw verify green. New code must meet the gates; code that already fails them is recorded, not rewritten:

    • If there are only a few findings, fix them with the user. Each NullAway finding is a question about what a missing value means, so don't guess.
    • Otherwise run python3 ${CLAUDE_SKILL_DIR}/scripts/baseline.py .. It marks each class NullAway rejects today @NullUnmarked, and records today's CodeRulesTests violations in src/test/resources/archunit_store. New code is checked in full, and a fixed violation drops out of the record. Remove @NullUnmarked from a class once it's fixed. When an update of the harness adds rules, run baseline.py again: a rule the record doesn't list fails on existing code too, and the rerun records only the new rules' violations. Don't suppress warnings or skip tests to get green. The Stop hook only blocks on problems in files the agent changed, but until verify is green it can't fully check those either.
  4. Draft the Modules, Run and test and Team conventions sections of AGENTS.md from the code, then go through them with the user. Read the packages, the pom, compose files, the test setup, and repeated patterns such as error handling, DTO mapping and naming. Write only what an agent would get wrong without being told: one line per module, the commands and services the app needs, and the conventions the code follows. Mark each convention you inferred (inferred); the user confirms or deletes it. Leave out generic Spring advice and anything the code makes obvious, and keep the file short: every session reads all of it.

  5. Commit everything, including .claude/settings.json, the marked classes and archunit_store.

  6. On an existing codebase, find the files where comments make up a large share of the lines, often DTOs and records. Agents write comments as densely as the code they read, so the comment rule in AGENTS.md holds only once those files follow it. Offer to prune them module by module, each module in its own pull request, with code-reviewer's comment pass: it changes only comments.

What each piece does

FileEffect
AGENTS.mdInstructions both Claude Code and Codex read. Says that done means ./mvnw verify passed, and how to fix each gate
CLAUDE.mdImports AGENTS.md for Claude Code versions that don't read it directly
REVIEW.mdAt the repository root, for reviewers: the failures the code doesn't show, which changes are high risk, what not to report, and how to report. The code-reviewer skill and Claude Code's GitHub review read it. Added only when missing; the team fills in the failures, one line each time a review misses a bug
.claude/settings.jsonLets ./mvnw run without prompts, blocks reading .env files, enables this plugin for every teammate with this marketplace set to update itself, and registers the hooks. For the other skills the team uses, each developer runs install.py from this marketplace once
.claude/hooks/verify-on-stop.shSessionStart and Stop hook. It records the code each session starts from. When a turn ends and the session has changed the code under src or pom.xml, committed or not, it formats the code and runs the gates that need no Docker (compile with NullAway, CodeRulesTests, ConfigurationKeysTests, BuildSetupTests, the module and ArchUnit tests). It blocks the turn only on errors in files the session changed, so Claude fixes its own mistakes and never code it didn't touch; when the build fails only elsewhere, it tells the user the change couldn't be fully verified. A formatting failure blocks too. It skips code that already passed, and gives up after one failed retry on the same code. A session that changes no code costs nothing; a check takes 25 to 75 s
.claude/hooks/guard.shPreToolUse hook. Refuses git push --force, git reset --hard, git clean -f, edits to a Flyway migration that is already on the main branch, edits to the ArchUnit freeze record, and edits to the rule tests (CodeRulesTests, ConfigurationKeysTests, BuildSetupTests, ModuleBoundariesTests, and progen's ArchUnitTests and ModularityTests). A developer changes a rule by hand
scripts/report.pySummarises what the hooks did in this clone: turns checked, passed and blocked, blocks by gate, how many the agent fixed, check times, and what the guard refused. Both hooks append one line per run to .git/harness/events.jsonl (no paths, commands or file contents; capped at 2000 lines). Run python3 ${CLAUDE_SKILL_DIR}/scripts/report.py . when the team asks whether the hooks are worth their time
scripts/baseline.pyFor an existing codebase: marks the classes NullAway rejects today @NullUnmarked and records today's CodeRulesTests violations, so verify passes while new code is held to the gates
ConfigurationKeysTestsFails on spring., management., server. and logging. keys that no dependency defines, or that are deprecated. Boot ignores those keys silently
BuildSetupTestsFails on shortcuts that pass the tests while production runs without the feature: a Boot starter or module in test scope, spring-boot-autoconfigure-classic, Flyway migrations without spring-boot-starter-flyway (Boot 4 doesn't run them with flyway-core alone), unless the app builds Flyway itself, and, when the project has migrations, ddl-auto set to create or update the schema or code that writes flyway_schema_history
UnusedCodeTestsFails on a non-private method that only tests call: dead code its tests keep alive, or an internal opened up so a test can look inside. Getters, Spring entry points, overrides and methods named in @PreAuthorize expressions are left out. It runs in verify but not in the Stop hook, because a service is often written and tested before anything calls it
ModuleBoundariesTestsSpring Modulith verify(): no use of another module's nested packages, no cycles
CodeRulesTestsArchUnit rules for mistakes that compile and pass most tests: a class calling its own @Transactional, @Async, @Cacheable or @Retryable method (the proxy is skipped), controllers that start transactions, use repositories, or take or return JPA entities, @Retryable or @ConcurrencyLimit with nothing switching them on, @ManyToMany fields that aren't a Set (with a List, removing one element rewrites every join row), @ManyToOne and @OneToOne without fetch = LAZY, enum columns stored by position, a @Transactional method calling an HTTP client, an HTTP interface or an AWS SDK client, directly or through the project's own classes (it holds a database connection for the whole call), RestClient.create(), WebClient.create(), new RestTemplate(), or the static builder() in a class that sets no request factory (no timeouts), proxy annotations on private, final or static methods, @Async or @Scheduled with nothing switching them on, services that throw ResponseStatusException, use the servlet API or return ResponseEntity, @Deprecated code outside controllers (update the callers and delete it), @Autowired fields, System.out, Jackson 2 (Boot 4 ignores it), Spring's deprecated nullness annotations, JUnit 4 tests (never run), and @Disabled tests. Each failure message says how to fix it. It uses the project's ArchUnit or Taikai, and adds ArchUnit only when neither is declared
.github/workflows/verify.ymlRuns ./mvnw verify on every pull request, so the gates hold for code nobody ran locally. Added only when no workflow already runs mvnw
pom gatesNullAway in JSpecify mode on main code at compile time (tests are excluded, since they routinely dereference response bodies), Spotless check
Project skillsadd-module (module layout and test, for module-based projects) and db-migration (Flyway naming and safe changes, when the pom uses Flyway). Each tool sees only their names and descriptions until one is used

Limits

  • Maven only. A Gradle build needs the same gates written as Gradle plugins.
  • Error Prone needs JDK 21.0.8 or later to build. Projects that set up the compiler plugin before the -XDaddTypeAnnotationsToSymbol=true argument was added need it added by hand to build on JDK 21.
  • The hooks are Claude Code only. Codex sessions get AGENTS.md, the project skills and the CI gates, and AGENTS.md tells them to run ./mvnw verify themselves.
  • The hooks are bash scripts. On Windows, Claude Code runs them with Git for Windows; without it they fail.
  • Tool versions are pinned in the pom properties. Update them together and rerun ./mvnw verify.

MCP servers

Add none by default. Each server's tool definitions take context in every session, and the gates above need none. If the team already runs SonarQube, its MCP server (sonarsource/sonarqube-mcp) can show issues and quality gates. It needs a SonarQube Cloud or Server token and Docker. Limit it with SONARQUBE_TOOLSETS=issues,quality-gates and SONARQUBE_READ_ONLY=true, and keep the token in each developer's environment, never in the repository.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Adds a new application module to this Spring Modulith project with the package layout the ModuleBoundariesTests gate expects, and a module-scoped integration test. Use when the user asks for a new module, bounded context, or feature area that doesn't belong in an existing module.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

Use when asked to review, check or diagnose Spring Boot code: a pull request, diff, module or file before it merges; a slow endpoint or query (N+1, unbounded reads, JPA and Hibernate performance); security, JSpecify null-safety, architecture boundaries or Boot 4 migration risks in existing code; or whether the tests would catch real bugs, proving each finding by running it. Not for Kotlin-only code, non-Spring frameworks, or generic review advice without code context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

Use when starting a new Spring Boot project or service: scaffolding or bootstrapping a backend, REST API, microservice or modular monolith; choosing how to structure it (layered, package-by-module, modular monolith, tomato, DDD-hexagonal); selecting Spring Boot 4 features; generating the base project with progen or Spring Initializr; or applying the bundled templates and references in this skill. Not for migrating existing projects or for isolated JPA/repository work without broader project-creation context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

Writes a Flyway database migration for this project following the team's rules for naming, editing and renaming, so migrations from different developers don't collide and deployed databases stay valid. Use whenever a change needs a new table, column, index or data fix, or the user mentions a schema change or migration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

Use when upgrading an existing Spring Boot application, for example from Boot 3.x to Boot 4 or to the latest Spring Boot and Java: dependency transitions and starter renames, test annotations such as @MockBean to @MockitoBean, Jackson 3 issues, Spring Modulith 2 or Testcontainers 2 upgrades, code that stops compiling after a version bump, or planning a phased migration. Not for greenfield project creation or isolated repository design.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

Use when writing or adding tests for Spring Boot code at a service's edges: HTTP clients that call other services (WireMock: 4xx and 5xx responses, timeouts, retries), Kafka or RabbitMQ listeners (redelivery, poison messages, dead-letter topics), events published to other services, or full-API tests against real databases with Testcontainers; also when a Boot 4 test needs the right imports, slices or container wiring. Supplies verified Boot 4.1 templates and the framework traps that make such tests pass without proving anything. Not for reviewing existing tests (see code-reviewer) or Boot 3 to 4 test migration (see springboot-migration).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a-pavithraa/springboot-skills-marketplace802026년 10월 27일 업데이트

a-pavithraa의 스킬 모두 보기

이 스킬의 문제 신고