tool-call-guard
Skill3 starsChanged 6 months agoMITView on GitHub
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- assumption-checkSkill
- cache-hintSkill
- caveman-summarySkill
- clarify-intentSkill
- code-mapSkill
- compress-contextSkill
- detect-contradictionSkill
- error-to-actionSkill
- explain-depthSkill
- format-responseSkill
- humanize-outputSkill
- prevent-redundancySkill
- route-or-answerSkill
- setupSkill
- simplify-scopeSkill
- tone-matchSkill
- validate-outputSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Before every external tool call in an agent loop
- Distinctive: line 61
If approved AND corrected_params is non-null: always use corrected_params in the actual call, not the original tool_params
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
skill: tool-call-guard
purpose
Validate a tool call before it executes. Catches missing parameters, malformed values, and scope overreach. Blocks bad calls. Warns on irreversible ones. Prevents wasted API calls and accidental side effects.
when_to_use
- Before every external tool call in an agent loop
- Tool call involves writes, deletes, or sends
- Input to the tool comes from user text that might be incomplete or malformed
when_not_to_use
- Simple safe read operations where calling is always correct
- You've already validated this exact call this turn
input
tool_name: string # Tool you're about to call
tool_params: object # Parameters you're about to pass
tool_schema: object # Expected types/requirements (optional — skip validation step if not provided)
task_context: string # Why you're making this call
is_destructive: boolean # Creates, modifies, sends, or deletes data?output
{
"approved": true | false,
"issues": ["string"],
"safe_to_call": true | false,
"warning": "string | null",
"corrected_params": "object | null"
}instructions
Check this tool call before it executes.
Validate:
1. NECESSITY: Is this call needed for the task, or can the task be done without it?
2. PARAMETERS: Required params present? Types correct? Values in expected range?
3. SCOPE: Does this call do exactly what the task requires, or could it do more?
4. SIDE EFFECTS: If destructive, is scope limited to what was authorized?
Reject if: required param missing or null, value clearly wrong (negative ID, empty required field, wrong format), call would affect more data than intended.
Warn if: call is approved but irreversible.
Correct if: param has fixable format issue (whitespace, wrong case for enum, missing prefix). Never change values that affect intent.
safe_to_call is false if: not approved, OR is_destructive is true and warning is present.
Return JSON only.constraints
- Max output tokens: 200
- corrected_params: fix format only, never change intent
- safe_to_call false if destructive + has warning
- If approved AND corrected_params is non-null: always use corrected_params in the actual call, not the original tool_params
example
Input:
tool_name: "delete_user"
tool_params: { "user_id": "", "confirm": true }
tool_schema: { "user_id": "required non-empty string", "confirm": "required boolean" }
task_context: "Delete account for user ID 8821"
is_destructive: trueOutput:
{
"approved": false,
"issues": ["user_id is empty — required param missing. Context shows it should be 8821."],
"safe_to_call": false,
"warning": null,
"corrected_params": { "user_id": "8821", "confirm": true }
}feedback_log
<!-- date | situation | what went wrong | better behavior -->2026-05-29 | approved:true + corrected_params set — caller used original params anyway | output combination was undocumented; callers didn't know to prefer corrected_params | added to constraints: always use corrected_params when non-null, even when approved
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.

