guardrails

guardrails is a cursor rule for Cursor from louisbrulenaudet/monorepo-template. It costs 865 tokens per session, scanned A, original, Apache-2.0.

A set of rules that tells a coding agent which actions are never allowed, such as committing secrets or deleting files without permission.

In plain words
What is it for?
It helps review code changes, protect keys and private files, and require approval before risky Git or file operations.
Why use it?
It prevents unsafe changes and pauses the work when an action could destroy data or expose credentials.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: reads .claude/ paths; mentions AGENTS.md.

Good fit It helps review code changes, protect keys and private files, and require approval before risky Git or file operations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/louisbrulenaudet/monorepo-template/guardrails
Install

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.

Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Cursor.

Wrote 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.

agentmods badge for guardrails

README.md
[![agentmods](https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/guardrails/github.svg)](https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/guardrails)
Your own site
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/guardrails"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/guardrails/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.

agentmods 80×15 button for guardrails

Your own site · 80×15
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/guardrails"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 865 This file is loaded in full into every session.
When invoked 865 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00865 $0.00865
Opus 5 $0.00432 $0.00432
Sonnet 5 $0.00173 $0.00173
Haiku 4.5 $0.00086 $0.00086

Measured 10d ago against content hash 3fb7cc4f4102, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

guardrails 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 10d 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.

.cursor/rules/core/guardrails.mdc · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Guardrails

Hard "don'ts" for every change. When one would be violated, stop and ask rather than proceed.

Enforcement for the first three sections lives in .claude/settings.json and hooks/ (hooks/AGENTS.md) - change the mechanism there, not only this wording.

Never commit secrets

Do not commit credentials, API keys, tokens, private keys, .dev.vars / .env* files, database dumps, or logs that contain any of those. A secret you generated for local use stays out of version control.

Enforced by hooks/settings - see hooks/AGENTS.md.

Destructive or irreversible actions - ask first

  • Do not run history-rewriting or working-tree-destroying commands (git reset --hard, git checkout -- <path>, git clean -f, git push --force, branch/tag deletion) unless the user asked for that exact operation. Prefer additive, reversible steps.
  • Commit or push only when asked, and never directly to the default branch.
  • Before deleting or overwriting a file you did not create, look at it first; if its contents contradict how it was described, surface that instead of proceeding.

Partly enforced by hooks/settings. "Never to the default branch" and "look before overwriting" are advisory.

Generated files are outputs, not sources

Never hand-edit generated artifacts (e.g. wrangler types output, Vite/Wrangler build output under dist/**, or any other build artifact). Change the source of truth and regenerate through the documented command (pnpm types, the app's build step, etc.).

Enforced by hooks/settings - see hooks/AGENTS.md.


Everything below is advisory - nothing enforces it. (pnpm boundaries covers the next two at package level only.)

Stay within the task's scope

A task scoped to configuration, rules, docs, or agent setup must not drift into application source, wrangler manifests, workflows, migrations, or infrastructure unless the user asks. Narrow the blast radius to what was requested.

Read the full file on GitHub · 66 lines

Changes

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.

  1. 10d ago First seen · 66 lines · 865 tokens per session scan A 3fb7cc4f4102

Subscribe to this mod's changes

guardrails is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 9d ago), licensed Apache-2.0. It adds 865 tokens to every session, about $0.0043 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.