Index of every page on this site: llms.txt
All skills
jameskomo avatar

/spring-boot-conventions

@199c482
Run it yourself

House conventions for Spring Boot (Java) application code - controllers, services, DTOs, pagination and error responses. Use when writing, adding, refactoring or reviewing a Spring Boot controller, service, repository, DTO or REST endpoint in Java. Not for build files (Gradle, Maven), unit tests, or code outside Java such as TypeScript types, Vue or Pinia, even when that code describes the same API.

  • 1 file
  • 2 KB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/jameskomo/config-drift-checker/spring-boot-conventions

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈107 tokens for metadata: the name and description. ≈391 when used: this file.

Description uses 5.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈428 characters, or 5.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Spring Boot conventions (example house rules)

Follow these rules exactly. They are the conventions of an example team; adapt them to yours.

Dependencies

  • Lombok is not on the classpath. Never use it (@RequiredArgsConstructor, @Data, @Builder, etc.).

DTOs

  • Request and response shapes are Java records, grouped in a <Feature>Dtos holder class (e.g. ModerationDtos.ListingQueueItem).
  • Validate request bodies with jakarta.validation (@Valid, @NotBlank, @Positive).

Controllers

  • @RestController + @RequestMapping("/api/<area>"). Thin: parse/validate input, call one service method, wrap the result.
  • Every response is wrapped: ApiResponse.ok(body) or ApiResponse.ok(items, PageMeta.of(page, size, total)) for lists. Never return raw entities or bare lists.
  • Pagination is 1-based page and size query params. Clamp: int pageNo = Math.max(page, 1); int pageSize = Math.clamp(size, 1, MAX_PAGE_SIZE); with MAX_PAGE_SIZE = 100 as a private static final constant.

Services

  • Business rules and authorization checks live in the service, even when SecurityConfig already gates the route ("two locks on the door").
  • Services return records or small result types, never Map<String, Object>.

Errors

  • Throw domain exceptions; a @RestControllerAdvice handler maps them to ApiResponse.error(...). Do not try/catch in controllers.

Output format

When asked to write code, produce the complete Java file(s) with package and imports, then a two-line note on which convention decisions you applied.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 199c482. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 weeks ago

README badge

README badge for jameskomo/config-drift-checker/spring-boot-conventions