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 skills/bybren-llc/safe-agentic-workflow/rls-patternsnpx skills add bybren-llc/safe-agentic-workflow --skill rls-patternsgit clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflowWrote 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/skills/bybren-llc/safe-agentic-workflow/rls-patterns)<a href="https://agentmods.dev/skills/bybren-llc/safe-agentic-workflow/rls-patterns"><img src="https://agentmods.dev/badge/skills/bybren-llc/safe-agentic-workflow/rls-patterns.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.00071 | $0.01385 |
| Opus 5 | $0.00036 | $0.00692 |
| Sonnet 5 | $0.00014 | $0.00277 |
| Haiku 4.5 | $0.00007 | $0.00138 |
Grade A, and why
rls-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 6d 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 — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RLS Patterns Skill
TEMPLATE: This skill uses
{{PLACEHOLDER}}tokens. Replace with your project values before use.
Purpose
Enforce Row Level Security (RLS) patterns for all database operations. This skill ensures data isolation and prevents cross-user data access at the database level.
When This Skill Applies
- Writing any database query (ORM or raw SQL)
- Creating or modifying API routes that access the database
- Implementing webhook handlers that write to the database
- Working with user data, payments, subscriptions, or enrollments
- Accessing admin-only tables
Critical Rules
NEVER Do This
// FORBIDDEN - Direct DB calls bypass RLS
const user = await db.user.findUnique({ where: { user_id } });
// FORBIDDEN - No context set
const payments = await db.payments.findMany();
Linting will block direct DB calls. See linting configuration for enforcement rules.
ALWAYS Do This
import {
withUserContext,
withAdminContext,
withSystemContext,
} from "{{RLS_IMPORT}}";
// CORRECT - User context for user operations
const user = await withUserContext(db, userId, async (client) => {
return client.user.findUnique({ where: { user_id: userId } });
});
// CORRECT - Admin context for admin operations
const webhooks = await withAdminContext(db, userId, async (client) => {
return client.webhook_events.findMany();
});
// CORRECT - System context for webhooks/background tasks
const event = await withSystemContext(db, "webhook", async (client) => {
return client.webhook_events.create({ data: eventData });
});
Context Helper Reference
withUserContext(db, userId, callback)
Use for: All user-facing operations
- User profile access
- Payment history
- Subscription management
- Enrollments and personal data
const payments = await withUserContext(db, userId, async (client) => {
return client.payments.findMany({ where: { user_id: userId } });
});
withAdminContext(db, userId, callback)
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 213 lines · 71 tokens per session scan A 696467578f03
rls-patterns is a skill published in the GitHub repository bybren-llc/safe-agentic-workflow (406 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 1,385 once invoked, about $0.0004 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 skills, from other repositories
jpa-patterns
JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.
build-feature-store
Build a feature store using Feast for centralized feature management, configure offline and online stores for batch and real-time serving, define feature views with transformations, and implement point-in-time correct joins for ML pipelines. Use when managing features for multiple ML models, ensuring training-serving…
entity-design
Design EF Core entities with navigation properties, value objects, Fluent API configuration, and audit fields. Use when creating new database entities, adding relationships, configuring owned types, designing a domain model for Entity Framework Core, or setting up table-per-hierarchy inheritance.
create-migration
Create and manage Entity Framework Core database migrations including schema changes, seed data, and rollback strategies. Use when adding or modifying EF Core entities, setting up a new DbContext, applying data seeding, running dotnet ef commands, or troubleshooting migration conflicts.
migration-helper
Guide safe database and code migrations with zero-downtime strategies.
kirby-content-migration
Plans and applies safe Kirby content migrations using runtime content tools, update schemas, and explicit confirmation. Use when users need to rename/move/transform fields, clean up content, or bulk-update pages/files across languages.