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 instructions/lsampaioweb/ai-instructions/spring-boot-database-schemagit 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-database-schema)<a href="https://agentmods.dev/instructions/lsampaioweb/ai-instructions/spring-boot-database-schema"><img src="https://agentmods.dev/badge/instructions/lsampaioweb/ai-instructions/spring-boot-database-schema.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.01201 | $0.01201 |
| Opus 5 | $0.00600 | $0.00600 |
| Sonnet 5 | $0.00240 | $0.00240 |
| Haiku 4.5 | $0.00120 | $0.00120 |
Grade A, and why
ai-instructions spring-boot-database-schema.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 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 — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spring Boot Database-Schema Engine
Naming Conventions
- Use singular snake_case for table names; avoid generic tokens such as
tbl,data, orobj. - Name primary key columns as
<table_name>_id(never standaloneid). - Name foreign key columns as
<referenced_table_name>_id. - Name non-key columns with domain-qualified semantics (never standalone
name,value,type,status, ordate). - Name primary key constraints as
pk_<table_name>. - Name foreign key constraints as
fk_<source_table>_<target_table>. - Name unique constraints as
uq_<table_name>_<column_name>. - Name check constraints as
ck_<table_name>_<rule_name>. - Name non-unique indexes as
ix_<table_name>_<column_name>. - Name unique indexes as
ux_<table_name>_<column_name>. - For composite constraints or indexes, append column tokens in declaration order separated by underscores.
Rules
Clarification gates
-
When the user prompt does not specify lifecycle, retention, archival, or delete semantics for a new table or column, treat the schema design as unresolved and ask the user before generating DDL.
-
When a new relation introduces business-data deletion, retention, archival, or historical-movement consequences and the user prompt is silent, treat the delete behavior as unresolved and ask the user before finalizing the constraint action.
-
Use PostgreSQL as the default relational system-of-record for CRUD modules unless request constraints require a different store.
-
Default primary keys and row identifiers to
INTEGER. -
Use
SMALLINTonly for clearly bounded low-cardinality domains expected to stay below 32,767 rows for the full lifecycle. -
Use
BIGINTonly when stated scale expectations or lifetime cardinality can exceedINTEGERlimits. -
Declare integer primary keys using
GENERATED ALWAYS AS IDENTITY. -
Use
TEXTfor variable-length string columns with no business-rule length limit. -
Use
VARCHAR(n)only when the domain enforces a maximum character length. -
Use
NUMERIC(precision, scale)for monetary or decimal columns. -
Use
DATEfor calendar-day business fields. -
Use
TIMESTAMPTZ(timestamp with time zone) for event-time and audit fields. -
Model application-owned closed-set domains through lookup/reference tables plus foreign-key columns in business tables.
-
Keep a stable domain code column in each lookup/reference table for idempotent seed data and application mapping.
-
Mark required columns with
NOT NULL. -
Leave optional columns nullable by design.
-
Keep delete mode, retention window, historical-table strategy, and archival behavior as explicit design decisions for every new business table.
-
Add
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()andupdated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()to every business table. -
Omit
created_atandupdated_ataudit columns only for pure lookup or reference tables with no lifecycle. -
Declare columns in this order within every table: primary key, required foreign keys, business columns, optional foreign keys, audit columns (
created_at,updated_at) last. -
Keep SQL DDL idempotent.
-
Add succinct SQL comments before each business table, lookup/reference table, idempotent seed-data block, and non-obvious index.
-
Place SQL DDL schema files under
src/main/resources/sql/db/. -
Place SQL query files (XML property sources) directly under
src/main/resources/sql/. -
Keep seed-data statements idempotent and stable across reruns, including lookup/reference seeds.
-
Keep primary, unique, and foreign key constraints explicit in SQL DDL.
-
Declare unique and check constraints as named
CONSTRAINTclauses (e.g.,CONSTRAINT uq_users_email UNIQUE (email)) rather than inline column keywords. -
Declare both
ON DELETEandON UPDATEactions on every FK constraint. -
Use
ON DELETE RESTRICTandON UPDATE CASCADEas the default FK action pair. -
Use hard delete (physical
DELETE) only when the user explicitly confirms there is no soft-delete, archival, or historical-retention requirement. -
Implement soft delete with a
deleted_at TIMESTAMPTZcolumn only when explicitly requested; document the retention and cleanup strategy alongside the schema change. -
Use
ON DELETE CASCADEonly for child records with no independent existence. -
Use
ON DELETE SET NULLonly for optional associations. -
Add a
CREATE INDEX IF NOT EXISTSfor every foreign key column in SQL DDL. -
Treat every non-foreign-key index as an explicit query-shape decision; when the user prompt does not justify that index, ask before generating it.
-
Declare the FK column as nullable for every optional association that uses
ON DELETE SET NULL. -
When adding a FK constraint to a table with existing data, use
NOT VALIDto add the constraint without scanning existing rows, then runVALIDATE CONSTRAINTin a separate transaction. -
For hierarchical or tree-structured data, declare a self-referencing FK on the parent column (e.g.,
parent_id REFERENCES same_table(id)) withON DELETE CASCADEwhen child nodes have no independent existence. -
Keep domain invariants enforced by explicit SQL constraints and relation actions.
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 · 70 lines · 1,201 tokens per session scan A 16d740a299fb
ai-instructions spring-boot-database-schema.instructions.md is an instructions file published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 13d ago), licensed MIT. It adds 1,201 tokens to every session, about $0.0060 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
lms-front CLAUDE.md
Claude Code instructions for guillermoscript/lms-front, covering claude.md, project overview, commands, architecture and multi-tenancy.
vespertide AGENTS.md
AGENTS.md instructions for dev-five-git/vespertide, covering vespertide knowledge base, structure, where to look, data flow and conventions.
seekstone CLAUDE.md
Claude Code instructions for shaqmughal/seekstone, covering claude.md, what this repo is, commands, the harness itself (run after npm install) and architecture.
rails_ai_agents AGENTS.md
AGENTS.md instructions for ThibautBaissac/rails_ai_agents, covering project configuration, tech stack, architecture, key commands and tests.
pg-dash CLAUDE.md
Claude Code instructions for indiekitai/pg-dash, covering pg-dash claude.md, 项目结构, 构建与测试, 发版纪律(强制) and 发版检查清单(每次 npm publish 前必须按序执行).
MCP-SqlServer CLAUDE.md
Claude Code instructions for Aron-Valenzuela/MCP-SqlServer, covering claude.md, project overview, setup (for each user), 1. install dependencies and 2. configure claude desktop.