- Home
- Skills
- Agents & Orchestration
- Agent Guardrails Kit
Works with the AI Agents you already use
Agent Guardrails Kit
by Tobi Sanni
Audit your CLAUDE.md or AGENTS.md, fix vague rules, and turn the rules your agent keeps breaking into tested Claude Code hooks.
$15
Agent Guardrails Kit
Example session with this skill installed
My coding agent keeps ending its replies with 'Want me to...?' and then just waits. Audit my agent rules, then install the hook that fixes that one problem. You have my OK to write the hook and settings in this project.
- Read your context and instructions
- Compiled the agent guardrails kit
I installed the hook. When your agent ends a reply with "Want me to…?", "Should I…?", "Let me know if…" and similar, the hook now sends it back to do the work instead of waiting. It sends the agent back only once per reply, so it can't get stuck in a loop.
Audit of CLAUDE.md
Your project rulebook has six lines. Here is how it scores on the 10 areas the kit checks:
| Area | Score | Evidence |
|---|---|---|
| 1. How the agent talks | Missing | — |
| 2. Staying inside the request | Missing | — |
| 3. Proof and "done" | Partial | "Run npm test before committing." |
| 4. Simplest path, getting unstuck | Missing | — |
| 5. When to ask | Weak | "Ask if unsure." |
| 6. Hard safety lines | Partial | "NEVER push to main!!!" (said twice, and the two lines disagree) |
| 7. Helpers and models | Missing | — |
| 8. Long chats and handoffs | Missing | — |
| 9. Repeated failures become safeguards | Missing | — |
| 10. Cost and cleanup | Missing | — |
Main finding: "Ask if unsure." is probably part of why your agent keeps asking. It tells the agent to ask without saying what deserves a question, so it asks about everything. The hook stops the habit, but the written rule still points the other way. A better rule:
Act on steps you've decided on. Stop only for something hard to undo, a real change in scope, or input only I can give. When you do ask, give lettered options (A/B/C) and your pick.
Other vague lines:
- "Be careful." List what needs your OK (pushing to main, deleting data, deploying) and allow everything else.
- "Write good code." Point to your real checks, for example "
npm testmust pass." - The two "NEVER push to main" lines disagree: one means never, the other means "not without asking." Keep one: "Never push to main without asking me first." If the agent keeps breaking it, a hook can block
git pushto main.
I didn't edit CLAUDE.md, since you only approved the hook. I can rewrite it with these fixes if you want.
What I changed
- New file:
.claude/hooks/no_permission_asking.py, copied unchanged from the kit's recipe. - New file:
.claude/settings.json, which runs that hook every time the agent finishes a reply. No settings file existed before, so nothing else was changed. - I didn't commit either file.
Tests (all passed)
- "I fixed the parser. Want me to also update the tests?" → BLOCK
- A real choice laid out as "A) … B) …" →
PASS. Lettered options are still allowed, because some decisions really are yours.
- The phrase in backticks, as in
`want me to`→ PASS. The agent can still talk about the phrase. - A live-style run with "Should I commit it?" → the agent is sent back with instructions. A second attempt in the same reply is let through, so there's no loop.
- Broken input → no output and a clean exit, so the hook can't break a turn.
settings.jsonis valid, and I deleted the test samples afterwards.
What you need to do
- The hook starts working in a new Claude Code session, or after you approve it in
/hooks. - To remove it, delete the
Stopentry from.claude/settings.json.
Connects securely to your tools. The creator never sees your data.
About this skill
Written rules work most of the time. When agents run all day, "most of the time" isn't good enough.
This skill comes from running AI coding agents across three real projects, about 3,000 commits since October 2026. Every rule in it exists because something went wrong without it.
What it does
- Audits your rulebook. It reads your CLAUDE.md, AGENTS.md, Cursor rules or Copilot instructions and grades them on 10 areas: how the agent talks, staying in scope, proof of "done", getting unstuck, when to ask, safety lines, helpers and models, long chats, turning repeated failures into safeguards, and cost and cleanup. You get a scorecard, your top 5 fixes as ready-to-paste rules, and concrete rewrites for vague lines like "be careful."
- Rewrites it (with your OK) into a short numbered rulebook. Your project commands and paths are kept word for word.
- Enforces the rules your agent keeps breaking with four tested Claude Code hooks:
- Stops "Want me to...?" endings about work you already gave it. Real decisions still get through as lettered options.
- Stops "I don't have access to X" when the tool just hadn't loaded yet, and hands the agent your real routes.
- Refuses helper agents that don't name a model, so they can't silently inherit a slower or pricier one.
- Tells long chats to write a handoff and start fresh, before compaction loses detail.
Built to be safe
- Each hook is a single Python file using only the standard library.
- Each hook stays silent on any error, can't loop, and ignores quoted text and code.
- The skill installs only the hooks you choose, into your project's
.claude/folder, shows you the settings change before saving, and tests each hook on sample replies. - No network calls. Nothing leaves your machine.
Also included
The full 17-part playbook behind the rules: one lead agent per project, verifying real results, a timer on getting stuck, decision cards, handoffs, and more.
Works with
The audit and rewrite work in any agent that reads SKILL.md files. The hooks need Claude Code and Python 3.9+.
Active enforcement hooks only work with Claude Code. Other agents receive strengthened written instructions instead. Requires Python for hook testing.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
Nothing to install. It runs in your AI agent.
- Optional
- Claude Code (for the hooks)
Python 3.9+ (for the hooks)
Permissions
File Scopes
Reads your agent instruction files to audit them. Writes only inside your project, and only after you agree: the rewritten instruction file, hook files in .claude/hooks/ and the hook entries in .claude/settings.json. Uses the terminal to run each hook's built-in --check tests on sample text. The context-handoff hook reads CLAUDE_PROJECT_DIR to find your project folder. No network calls.
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.