By neuradex
Guardrails for agentic work — decompose tasks into validated steps, enforce policy, audit everything
Design an LLM Rail workflow — analyze intent, validate requirements, and generate optimized YAML
Initialize LLM Rail in the current project — set up workflows, directories, and register in CLAUDE.md
Review an LLM Rail workflow — trial run, analyze results, and suggest concrete improvements
Execute an LLM Rail workflow end-to-end — validate, create, and run all steps automatically
Check LLM Rail workflow instance status or list all instances
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Uses power tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Uses Bash, Write, or Edit tools
Uses Bash, Write, or Edit tools
Guardrails for AI agents that actually work.
Structural safety. Workflow control. Full audit.
Install & Forget · How It Protects You · Workflow Engine · Security Architecture · Getting Started · Contributing
1.0.0 — First stable release. The legacy pre-1.0 workflow format is no longer executed; use
lrail wf <name> migrateto convert old files. SeeCHANGELOG.md.
Your AI agent just ran rm -rf on your project. Or leaked your API key in its output. Or force-pushed to main.
You told it to be careful. It ignored you — because that's what LLMs do when context grows long enough. Prompt-level safety is a suggestion. Agents don't follow suggestions.
LLM Rail enforces safety structurally. Not through prompts, but through hooks that intercept every command before it runs, policies that block what shouldn't execute, and audit logs that record everything that does.
It works at two levels:
Both levels share the same policy engine, the same audit infrastructure, and the same security model. The guardrails you configure for everyday use also protect your workflows.
# That's the whole setup.
/plugin marketplace add neuradex/llm-rail
/plugin install llm-rail@llm-rail
On your next Claude Code session, lrail.yml is auto-created with sensible defaults. That one file does everything:
# lrail.yml — auto-generated, edit anytime
visible: false # agents can't see or modify this file
policy:
mode: enforce
default: allow # deny-list approach: block specific commands
rules:
- effect: deny
commands:
- "rm -rf *" # recursive force delete
- regex: "rm\\s+-r\\s" # rm -r (recursive delete)
- "sudo *" # privilege escalation
- "git push --force *" # force push
- regex: "git\\s+reset\\s+--hard" # hard reset
- regex: "git\\s+clean\\s+(-\\w*f)" # git clean (deletes untracked files)
- regex: "git\\s+checkout\\s+--\\s+\\." # git checkout -- . (mass revert)
- regex: "curl.*\\|\\s*(bash|sh)" # pipe to shell
- regex: "npm\\s+(uninstall|remove)\\s+.*llm-rail" # self-protection
- regex: "lrail\\.yml" # protect this config
Put it in your home directory and it covers every project underneath. Put it in a specific project and it overrides the global one for that directory tree. The nearest lrail.yml walking up from cwd wins — just like .gitignore.
One file. Zero setup. Every session guarded.
Every Bash command the agent runs is intercepted by a PreToolUse hook and checked against your policy rules before it executes. Denied commands never run.
Simple rules use glob patterns. When you need precision — catching flag reordering, absolute path tricks, or subcommand variants — use regex:
rules:
- effect: deny
commands:
- "sudo *" # glob — blocks sudo
- regex: "rm\\s+(-\\w*r\\w*\\s+)*-\\w*f" # regex — catches rm -rf, rm -r -f, rm -fr, etc.
- regex: "git\\s+push\\s+.*(--force|\\s-f)" # regex — catches all force-push variants
An agent that knows rm -rf is blocked might try rm -r -f or /bin/rm -rf. Glob patterns miss these. Regex doesn't.
Agents need API keys to call external services. But they shouldn't see the actual values, and they definitely shouldn't print them in their output.
env:
secret_files: [.env, .env.local]
npx claudepluginhub neuradex/llm-rail --plugin llm-railSecret isolation for AI coding agents — agents use your secrets but never see them
Achieve flow state safely with Claude Code. Auto-approves routine work, gates risky actions, hard-blocks dangerous patterns. Dual enforcement (skill + hooks), token cap for cost governance, full audit trail. Zero dependencies.
A secure runtime for Claude Code. Intercepts every tool call with policy-based allow/block/ask decisions, evasion detection, path fencing, file snapshots, and audit logging.
Core safety skills for AI-assisted development: Four Laws, Three Strikes, production-first, scope validation, and environment separation
One 👎 becomes a hard rule the agent cannot bypass. Captures thumbs-down feedback, distills it into PreToolUse Pre-Action Checks, enforced across every future Claude Code session.
AGT governance hooks and MCP tools for Claude Code sessions
5 essential safety hooks for Claude Code. Blocks rm -rf, force-push, hard-reset, .env overwrites, and package publish. The minimum viable safety net from 800+ hours of autonomous operation.