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.
git clone --depth 1 https://github.com/e-gov/cursor-promptsWrote 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/rules/e-gov/cursor-prompts/jooq-database-access)<a href="https://agentmods.dev/rules/e-gov/cursor-prompts/jooq-database-access"><img src="https://agentmods.dev/badge/rules/e-gov/cursor-prompts/jooq-database-access/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/e-gov/cursor-prompts/jooq-database-access"><img src="https://agentmods.dev/badge/rules/e-gov/cursor-prompts/jooq-database-access.svg" alt="Reviewed on agentmods" width="80" 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.01615 | $0.01615 |
| Opus 5.5 | $0.00646 | $0.00646 |
| Sonnet 5.5 | $0.00323 | $0.00323 |
| Haiku 4.5 | $0.00161 | $0.00161 |
Grade A, and why
jooq-database-access 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 1mo 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
jOOQ DSL and Database Access Conventions
Context
- Apply when writing or modifying database access logic using jOOQ, typically within service or repository classes.
- Focuses on consistent use of the jOOQ DSL and mapping.
- Retry Logic: Retry mechanisms are framework-specific. Refer to:
- Spring Boot:
mdc:rules/java-spring-boot/spring-retry-conventions.mdc - Micronaut:
mdc:rules/java-micronaut/micronaut-retry-conventions.mdc
- Spring Boot:
- Transaction Management: Managed by the specific framework (Spring/Micronaut). Refer to framework convention rules.
- Auditing: For conventions on using the
AuditLogger, seemdc:rules/java-common/audit-logging.mdc.
Requirements
- Database Interaction: Use jOOQ (
DSLContext) injected via constructor for all database operations. Avoid Spring Data JPA repositories or raw JDBC. - Type-Safe DSL: ALWAYS use the jOOQ type-safe DSL (generated tables/fields like
BOOK.TITLE) over constructing queries with raw SQL strings. - Mapping: Implement clear logic (e.g., dedicated private methods like
mapToXyz) to map jOOQRecordobjects to application DTOs/models (BookResponse, etc.). - Connection Handling: Rely on the framework's transaction management (Spring/Micronaut) and jOOQ integration for connection handling; do not manage connections manually.
Examples
// ... inside a service method (retry/transaction/audit handled by framework/other rules) ... public List findCheapBooks() { // The actual DB call might be wrapped by retry logic elsewhere (see specific retry rules) List cheapBooks = dsl.selectFrom(BOOK) .where(BOOK.PRICE.lt(BigDecimal.TEN)) // Type-safe condition .orderBy(BOOK.TITLE.asc()) .fetchStream() .map(this::mapToBookResponse) // Mapping function .toList();
// Auditing is handled separately (see mdc:rules/java-common/audit-logging.mdc)
// if (!cheapBooks.isEmpty()) { AuditLogger.logBatchOperation(...); }
return cheapBooks;
}
private BookResponse mapToBookResponse(BookRecord record) { // ... mapping implementation ... }
</example>
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.
- 1mo ago First seen · 154 lines · 1,615 tokens per session scan A e3c97186f15b
jooq-database-access is a cursor rule published in the GitHub repository e-gov/cursor-prompts (34 stars, last pushed 6mo ago), licensed MIT. It adds 1,615 tokens to every session, about $0.0065 per session on Opus 5.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
entity-class-conventions
A set of rules for Java classes that represent database records, called entities. It defines required annotations, automatic ID creation, lazy relationship loading, and field validation.
303-frameworks-spring-data-jdbc
Spring Data JDBC provides a simpler alternative to JPA, offering direct SQL control while maintaining Spring's repository abstractions. When combined with Java records, it creates clean, immutable data models perfect for modern Java applications.
entity-class-conventions
description: Sets the standards for entity class design including annotations, ID generation strategies, and relationship configurations for database interaction. globs: /src/main/java/com/example/entities/.java.
jdbc
PURPOSE: JDBC driver patterns for Java applications connecting to Snowflake.
entity-class-conventions
Sets the standards for entity class design including annotations, ID generation strategies, and relationship configurations for database interaction.
repository-class-conventions
Governs the structure and functionality of repository classes, emphasizing the use of JpaRepository, JPQL queries, and EntityGraphs to prevent N+1 problems.