Home › Any stack › Universal vibe-coding guardrails

Universal vibe-coding guardrails

Always-on Cursor rules that keep any AI agent careful: plan first, small diffs, verify, never fake it.

CursorAny stack

How to use

Save this as .cursor/rules/guardrails.mdc in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

.cursor/rules/guardrails.mdcDownload  
---
description: Universal agent guardrails
alwaysApply: true
---

# Guardrails for AI coding agents

## Plan
- Restate the goal in one sentence. If requirements are ambiguous, ask before coding.
- For changes touching more than 3 files, write a short plan first.

## Edit
- Read the files you will change before editing them.
- Make the smallest diff that works. Don't refactor or rename unrelated code.
- Match existing patterns, naming, and libraries in the repo. Don't add dependencies silently.
- Never delete tests to make them pass. Never hardcode values to satisfy a test.

## Verify
- Run the project's lint, typecheck, and tests. Report real output, not assumptions.
- If you couldn't run something, say so plainly.

## Safety
- Never commit secrets or print `.env` contents.
- Ask before destructive actions: dropping data, force-pushing, deleting files, running migrations on shared DBs.

## Report
- End with: what changed, files touched, how it was verified, and any follow-ups.

Related rules

Astro content site rules

Cursor rules for Astro 5 sites with content collections, islands, and zero-JS-by-default pages.

CursorAstro

Chrome extension (Manifest V3) rules

Cursor rules for building Manifest V3 browser extensions with TypeScript and minimal permissions.

CursorChrome extensions

Next.js App Router (TypeScript) rules

Cursor project rules for Next.js 15 App Router apps with TypeScript, Server Components, and Tailwind.

CursorNext.js

Nuxt 3 + Vue rules

Cursor rules for Nuxt 3 / Vue 3 apps using the Composition API, script setup and Pinia.

CursorVue / Nuxt

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.