Borrowing it
Nothing to install: this file belongs to lsampaioweb/ai-instructions. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lsampaioweb/ai-instructions/main/.github/instructions/spring-boot-repository.instructions.mdgit clone --depth 1 https://github.com/lsampaioweb/ai-instructionsWrote 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.
[](https://agentmods.dev/instructions/lsampaioweb/ai-instructions/spring-boot-repository)<a href="https://agentmods.dev/instructions/lsampaioweb/ai-instructions/spring-boot-repository"><img src="https://agentmods.dev/badge/instructions/lsampaioweb/ai-instructions/spring-boot-repository.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00890 | $0.00890 |
| Opus 5 | $0.00445 | $0.00445 |
| Sonnet 5 | $0.00178 | $0.00178 |
| Haiku 4.5 | $0.00089 | $0.00089 |
Grade A, and why
ai-instructions spring-boot-repository.instructions.md 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 4d 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 — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spring Boot Repository Engine
Naming Conventions
- Name repository interfaces with the
*Repositorysuffix (e.g.,HolidayRepository). - Name repository implementations with the
*RepositoryImplsuffix (e.g.,HolidayRepositoryImpl). - Name SQL configuration property records with the
*SqlConfigurationPropertiessuffix (e.g.,HolidaySqlConfigurationProperties). - Use resource entity names in repository identifiers (never
DataRepositoryorPersistenceRepository). - Name SQL property keys with the pattern
sql.<resource>.<operation>(e.g.,sql.holidays.find-by-id). - Name SQL column name constant classes with the
*SqlColumnssuffix (e.g.,UserSqlColumns,AccountSqlColumns).
Rules
- Defer the global ORM ban to
spring-boot-architecture.instructions.md. - Defer ORM dependency bans to
spring-boot-pom.instructions.md. - Use
findById,findAll,findBy*,save,update, anddeleteByIdas standard method name prefixes. - Keep method names consistent with operation semantics across all repositories.
- Keep JDBC or JdbcClient as the default for relational persistence modules.
- Use interface + implementation separation (
XyzRepositoryinterface +XyzRepositoryImpl) for modules with multiple persistence adapters or higher domain complexity. - Use a single
@Repositoryclass without a separate interface for focused modules with a single persistence adapter. - Allow non-relational repository implementations only when the module is explicitly scoped to an approved non-relational store.
- Declare SQL column name constants in a
*SqlColumnsutility class within the feature package. - Use
*SqlColumnsconstants as all named parameter keys in SQL method calls. - Declare SQL result-set column-label constants in the repository implementation and reuse them for all
ResultSetreads. - Return
Optional<T>from all single-resource lookup methods (e.g.,findById). - Keep business orchestration out of repository methods.
- Parameterize all SQL executed by repositories.
- Build SQL parameter containers to be null-tolerant by omitting null entries or binding typed null values explicitly.
- Accept pagination parameters (offset, limit, sort column) as explicit method parameters for paginated queries.
- Keep SQL statements straightforward and readable; prefer simple joins, predicates, and direct projections over expression-heavy control-flow in SQL.
- Implement sortable pagination in SQL only when the user explicitly requires database-side sorting or the expected data volume makes application-side sorting unsuitable.
- When the user prefers simpler SQL and data volume constraints do not require database-side sorting, perform sorting in Java after retrieval using an allowlisted set of sortable fields.
- Externalize SQL statements into
@PropertySource-backed XML property files, one file per feature. - Declare
@PropertySourceon the@Configurationclass that owns theJdbcClientbean. - Access SQL statements through a
@ConfigurationPropertiesrecord namedXyzSqlConfigurationPropertieswithin the feature package. - Register
XyzSqlConfigurationPropertiesusing one explicit pattern: either@Component+@ConfigurationPropertieson the record, or@EnableConfigurationPropertieson the owning@Configurationclass. - Annotate
*SqlConfigurationPropertiesrecords with@Validatedand annotate each SQL field with@NotBlank. - Validate generated-key fallback results explicitly and throw a deterministic data-retrieval exception when no key is returned.
- Use
Locale.ROOTfor case normalization in machine-parsed string comparisons (e.g., SQL error-message feature detection). - Catch SQL exceptions at the repository boundary and wrap them in a feature-scoped exception; services must not re-wrap the same SQL failure.
- Fall back from
INSERT/UPDATE ... RETURNINGonly when exception evidence indicates the database does not supportRETURNING. - Rethrow unrelated SQL grammar errors.
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.
- 4d ago First seen · 49 lines · 890 tokens per session scan A 57c0da8a52ed
ai-instructions spring-boot-repository.instructions.md is an instructions file published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 15d ago), licensed MIT. It adds 890 tokens to every session, about $0.0044 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-09-03.
Other instructions, from other repositories
plan-forge caching.instructions.md
Caching patterns for .NET — IDistributedCache, Redis, in-memory, cache-aside, TTL strategies.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).