Guards

9 mods

Guards sit in front of the tools Claude uses. They can allow, deny or rewrite a tool call before it runs, for example to block risky shell commands or keep secrets out of tool output, using the tool.call and tool.check hooks.

collision-guard

joaosavi/cockpit

Warns when two Claude Code sessions on this machine edit the same file, and holds a git command once when it would stage, commit, stash or discard another session's uncommitted edits.

★ 0ToastsGuards

hud

joaosavi/cockpit

A heads-up display under or above the prompt: model, branch, context and plan limits, and memory headroom. /hud opens the full view

★ 0PanesBandsGuards

loop-breaker

joaosavi/cockpit

Notices when the agent goes in circles (repeated fix attempts on one file, the same error coming back, the same call repeated) and tells it to stop and change approach; refuses nothing.

★ 0GuardsAutomation

memory-guard

joaosavi/cockpit

Keeps typecheck, build, test and Playwright runs under the memory limit, the tightest cgroup limit on Linux or the machine's memory on Linux, macOS and Windows: runs them with one process, waits for memory or refuses, and reruns a command killed with exit 137.

★ 0PanesStatus lineGuards

pipefail

joaosavi/cockpit

Adds set -o pipefail to a command that pipes a test, typecheck or lint run into tail, head or grep, so a failing run cannot exit 0 and read as a pass.

★ 0GuardsAutomation

secret-guard

joaosavi/cockpit

Hides every secret value in tool output as before the agent reads it, MCP and subagent output included, and writes the real value back when the agent puts the placeholder into a .env or secrets file.

★ 0GuardsAutomation

skill-loader

joaosavi/cockpit

Loads the right skill at the right moment, so CLAUDE.md needs no load-this-skill rules: typescript-best-practices for .ts, writing-for-agents for SKILL.md, AGENTS.md and CLAUDE.md, domain-modeling for CONTEXT.md and ADRs, technical-writing for READMEs, commits and PRs, and a diagnosing-bugs reminder when you paste an error.

★ 0GuardsPromptAutomation

todo

joaosavi/cockpit

Keeps the native task list in front of the agent: the open tasks at session start and right after each compaction, a reminder that a new request becomes a task before any other work, completed tasks logged to an archive, and the app's task panel kept in line with the task files.

★ 0GuardsPromptAutomation

usage-limit

joaosavi/cockpit

Keeps the account usage limit from running out mid-task, with separate limits for the 5-hour and the 7-day windows: one subagent at a time (90% and 97%), a commit of the work in progress (97% and 98%), a pause that keeps the rest for you (98% and 99%), each one switchable, and an automatic resume when the window resets.