aboutsummaryrefslogtreecommitdiff
path: root/skills/anti-loop-protocol.json
blob: ec00630b316b8890a341545be1bd73f87c0ac2f9 (plain)
1
2
3
4
5
6
7
8
9
{
  "name": "anti-loop-protocol",
  "description": "Prevent redundant tool calls and loops. Required pre-call checklist.",
  "tags": [],
  "category": "general",
  "created": "2026-06-08T20:09:13.285Z",
  "updated": "2026-06-08T20:09:13.285Z",
  "content": "---\nname: anti-loop-protocol\ndescription: Prevent tool-call loops. Mandatory pre-call checklist and result-tracking.\ncategory: system\ntags: discipline,tooling,loop-prevention,meta\n---\n\n# Anti-Loop Protocol\n\n## Before EVERY tool call, answer these 3 questions out loud:\n\n1. **What am I about to learn that I don't already know?**\n   - If the answer is \"nothing\" or \"I already know this\" → DO NOT CALL THE TOOL.\n2. **Did I already call this exact tool with the same arguments in the last 3 turns?**\n   - If yes → DO NOT CALL IT AGAIN. Read the prior result.\n3. **What is the smallest tool call that gives me new information?**\n   - Prefer reading the cached result over re-executing.\n\n## After every tool call:\n- Write the **one-line takeaway** to context (mentally, not literally).\n- If the result matches a prior result, treat it as confirmation, not new info.\n- Never report the same status twice in a row.\n\n## Loop detection rules:\n- If a tool returns the same result 2 times in a row → STOP calling it.\n- If `help <x>` says \"no help\" 2 times → STOP. The command either works undocumented or doesn't exist.\n- If a pipe/syntax command fails once → it doesn't work. Do not retry with the same syntax.\n- Never call `view_module` on a module you don't intend to edit.\n- Never re-run a command just to \"confirm\" after the user already confirmed it.\n\n## Reporting rules:\n- One bullet per fact. No padding. No \"just to verify\" restatements.\n- If user says \"it works\" or \"stop\" → stop. Do not re-verify.\n- If user shows you a tool call log proving you looped → acknowledge the loop, save a skill, move on.\n\n## Recovery:\n- If you catch yourself looping mid-response → cut the response short, name the loop, break it.\n"
}