Salus agent guardrails
Evaluate a proposed agent tool-call against an allow/deny/ask policy before it executes. Given a tool-call JSON and a policy file, runs the dependency-free rule matcher and returns a decision with a human-readable reason. Use this skill whenever an agent is about to take an action that should be checked against a guardrail policy.From its SKILL.md
npx -y skills add riteshkew/yc-skills --skill salus-agent-guardrailsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.7 KB, 532 tokens by cl100k_base, as published. Nobody here has run it
Workflow
When this skill triggers, follow these steps in order.
Step 1 — Locate the policy file
Check whether the user has specified a policy file path.
- If a path is provided, confirm the file exists and is readable.
- If no path is provided, ask: "Please provide the path to your policy JSON file. It should be an array of
{ effect, tool, args?, reason }rules. Seeexamples/policy.jsonfor a working example." - If the user has no policy, offer to generate a starter policy based on their described use-case before proceeding.
Step 2 — Capture the proposed tool-call
Capture the tool-call the agent is about to execute. It must be valid JSON matching:
{ "tool": "<name>", "args": { "<argName>": "<value>", ... } }
Wrap it in a JSON array if it is a single object (the engine accepts an array of calls). If the user provides multiple calls at once, evaluate them all together.
Step 3 — Run the engine
Execute the rule matcher from the skill root:
node scripts/policy-eval.mjs <policyFile> <callsFile>
The engine outputs a JSON array of { tool, decision, reason } — one entry per call.
Capture stdout. If the process exits non-zero, surface the stderr message to the user and stop.
Step 4 — Report the decision
For each result:
- allow — report the tool name, decision, and reason. The call may proceed.
- deny — report the tool name, decision, and the rule that fired. Explain what the agent attempted and why the policy blocked it. Suggest a safe alternative if one exists (e.g. read instead of write, a scoped path instead of a wildcard).
- ask — report that the call is paused pending user confirmation. Show the exact tool-call JSON so the user knows exactly what will execute. Wait for explicit approval before proceeding.
Output format (use this shape in your response)
Tool: <tool>
Decision: ALLOW | DENY | ASK
Reason: <rule reason text>
If decision is DENY or ASK, add a "What to do next" paragraph.
Example
See examples/input.md for a worked scenario with three calls and examples/output.md for the corresponding decisions produced by the engine.
Run the example yourself:
cd skills/salus-agent-guardrails
bash examples/run.sh
What ships with it: 8 files
17.8 KB alongside SKILL.md, 2 of them executable
.claude-plugin/
- plugin.json218 B
examples/
- calls.json225 B
- input.md1.7 KB
- output.md1.1 KB
- policy.json1.1 KB
- run.shruns2.6 KB
scripts/
- policy-eval.mjsruns6.8 KB
- README.md4.1 KB