vibe-guard
AGENTS.md2 starsChanged 8 months agoApache-2.0View on GitHub
Copy the relevant section below and provide it to your AI coding assistant (Claude Code, Codex, Cursor, etc.) as instructions for setting up VGuard in your project.
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- new-adapterSkill
- new-presetSkill
- new-ruleSkill
- releaseSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 155
After vguard init, your vguard.config.ts looks like:
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
VGuard — AI Agent Setup Instructions
Copy the relevant section below and provide it to your AI coding assistant (Claude Code, Codex, Cursor, etc.) as instructions for setting up VGuard in your project.
For Claude Code
I want you to set up VGuard, an AI coding guardrails framework, in this project.
1. Install the package:
npm install -D @anthril/vguard
2. Run the interactive setup:
npx vguard init
When prompted:
- Select presets that match the project's tech stack (e.g., nextjs-15, typescript-strict, react-19, tailwind, supabase)
- Select "Claude Code" as the AI agent
- Set protected branches to "main, master"
3. Verify the setup:
npx vguard doctor
All checks should pass. If any fail, fix the issues it reports.
4. (Optional) Connect to VGuard Cloud for analytics:
npx vguard cloud login
npx vguard cloud connect
npx vguard generate
5. Run a lint scan to see current issues:
npx vguard lint
After setup, VGuard will automatically enforce rules via hooks in .claude/settings.json.
The hooks fire on PreToolUse (before Edit/Write/Bash), PostToolUse (after), and Stop (session end).
If a rule blocks, the tool execution is prevented. Warnings are logged but don't block.
Key commands:
- npx vguard lint — scan for issues
- npx vguard learn — discover codebase conventions
- npx vguard report — generate quality dashboard
- npx vguard doctor — check config health
- npx vguard generate — regenerate hooks after config changesFor Codex CLI
I want you to set up VGuard, an AI coding guardrails framework, in this project.
1. Install: npm install -D @anthril/vguard
2. Initialize: npx vguard init
- Pick presets matching the project stack
- Select "Codex" as the AI agent
- Set protected branches to "main, master"
3. Verify: npx vguard doctor
4. Scan: npx vguard lint
VGuard generates an AGENTS.md file that Codex reads for advisory rules.
The rules are not runtime-enforced for Codex (advisory mode only).
After setup, run `npx vguard generate` whenever you change vguard.config.ts.For Cursor
I want you to set up VGuard, an AI coding guardrails framework, in this project.
1. Install: npm install -D @anthril/vguard
2. Initialize: npx vguard init
- Pick presets matching the project stack
- Select "Cursor" as the AI agent
- Set protected branches to "main, master"
3. Verify: npx vguard doctor
4. Scan: npx vguard lint
VGuard generates a .cursorrules file that Cursor reads for advisory rules.
The rules guide Cursor's suggestions but are not runtime-enforced.
After setup, run `npx vguard generate` whenever you change vguard.config.ts.For OpenCode
I want you to set up VGuard, an AI coding guardrails framework, in this project.
1. Install: npm install -D @anthril/vguard
2. Initialize: npx vguard init
- Pick presets matching the project stack
- Select "OpenCode" as the AI agent
- Set protected branches to "main, master"
3. Verify: npx vguard doctor
4. Scan: npx vguard lint
VGuard generates configuration in the .opencode/ directory.
After setup, run `npx vguard generate` whenever you change vguard.config.ts.For GitHub Actions (CI)
I want you to set up VGuard as a CI quality gate in this project's GitHub Actions workflow.
1. Install: npm install -D @anthril/vguard
2. Initialize: npx vguard init
- Pick presets matching the project stack
- Select "Claude Code" (or any agent — the CI adapter is always generated)
- Set protected branches to "main, master"
3. Generate the workflow: npx vguard generate
This creates .github/workflows/vguard.yml which runs `vguard lint` on every PR.
The lint command exits with code 1 if blocking issues are found, failing the check.
To customize the CI output format:
- npx vguard lint --format github-actions (annotates PR files)
- npx vguard lint --format json (machine-readable)
- npx vguard lint --format text (human-readable, default)Available Presets
| Preset | Stack |
nextjs-15 | Next.js 15 App Router |
react-19 | React 19 patterns |
typescript-strict | Strict TypeScript |
tailwind | Tailwind CSS utility-first |
supabase | Supabase best practices |
astro | Astro framework |
sveltekit | SvelteKit |
django | Django/Python |
fastapi | FastAPI/Python |
laravel | Laravel/PHP |
python-strict | Python PEP 8 |
go | Go conventions |
Configuration Reference
After vguard init, your vguard.config.ts looks like:
import { defineConfig } from '@anthril/vguard';
export default defineConfig({
presets: ['nextjs-15', 'typescript-strict'],
agents: ['claude-code'],
rules: {
'security/branch-protection': {
protectedBranches: ['main', 'master'],
},
},
cloud: {
enabled: true,
projectId: 'your-project-id',
autoSync: true,
},
});See https://github.com/anthril/vibe-guard for full documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

