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.
npx agentmods add rules/cagridursun/ai-peer-live-coding-agent/spring-boot-patternsgit clone --depth 1 https://github.com/cagridursun/ai-peer-live-coding-agentWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00760 | $0.00760 |
| Opus 5 | $0.00380 | $0.00380 |
| Sonnet 5 | $0.00152 | $0.00152 |
| Haiku 4.5 | $0.00076 | $0.00076 |
Grade A, and why
spring-boot-patterns 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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spring Boot — Preferred Patterns & Conventions
Reference Code
When building a new service, look for proven patterns in your own practice projects or open-source Spring Boot examples:
- [EXAMPLE_PROJECT_PATH/URL] conversational / workflow APIs (state machines, step validation)
- [EXAMPLE_PROJECT_PATH/URL] CRUD REST APIs (standard controller → service → repository)
- [EXAMPLE_PROJECT_PATH/URL] OpenAPI-first services (codegen for interfaces and DTOs)
Consult those references for project structure, Maven config, test patterns, and error handling — adapt to the interview scope, not copy wholesale.
Architecture
- 3-layer max: Controller → Service → Repository
- Kotlin for entity/model classes only (no Lombok); Java for all other code — optional, use when the problem fits
- OpenAPI codegen for controller interfaces and DTOs (
interfaceOnly=true) — optional - JPA + H2 in-memory with
create-dropDDL — when persistence is required @RestControllerAdvicefor centralized error responsesBigDecimalfor monetary valuesConcurrentHashMapfor in-memory rate limiting or caches
Maven / Build
- Kotlin compiler plugins:
spring+jpa(allopen + noarg) — when using Kotlin entities kotlin-maven-noargdependency required for JPA entity no-arg constructors- Kotlin compiles before Java; OpenAPI generated sources in Kotlin
sourceDirs - Java
default-compilephasenone, customjava-compileafter Kotlin — when mixing Kotlin + Java - Set
maven.compiler.source,maven.compiler.target,maven.compiler.releaseexplicitly in<properties>for IDE compatibility - JaCoCo 0.8.14+ for Java 21+ (older versions may fail on newer class file versions)
- Exclude generated API packages from JaCoCo coverage reports
Error Handling
- Custom exceptions: NotFoundException (404), ConflictException (409), ValidationException (400), RateLimitException (429)
GlobalExceptionHandlermaps toErrorResponsewithcode,message,details(list ofFieldError)- Filter-thrown exceptions: inject
HandlerExceptionResolver, callresolveException()to route through@RestControllerAdvice - Always structured JSON, never plain text
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.
- 2d ago First seen · 56 lines · 760 tokens per session scan A 4870840e8950
spring-boot-patterns is a cursor rule published in the GitHub repository cagridursun/ai-peer-live-coding-agent (14 stars, last pushed 21d ago), licensed MIT. It adds 760 tokens to every session, about $0.0038 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.
Other cursor rules, from other repositories
backend
Backend Java — Spring Boot controllers/services, JUnit controller tests, MakeMe. Read this first for any backend work.
springboot-jpa-best-practices
Java Spring Boot + JPA 项目最佳实践,涵盖分层架构、注解、事务、异常处理、安全与代码风格等。.
component-parameter-key-no-dot
@ComponentParameter 的 key 禁止包含 ".",统一使用下划线 / 顶层扁平命名.
java-openapi-annotations
生成 REST 接口时自动补充 OpenAPI 3(springdoc)注解.
com-example-utils-StringParser
AI rules for com.example.utils.StringParser.
java-springboot-jpa-cursorrules-prompt-file
description: "Cursor rules for Java development with Springboot and JPA integration." globs: / alwaysApply: false.