Guards

196 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.

env-guard

MatheusChiodi/cockpit

Protects .env files from reading and writing (Read, Edit, Write, cat and @mention)

★ 2GuardsPrompt

env-ignore-status

MatheusChiodi/cockpit

Status line that warns when a .env file is tracked by git or missing from .gitignore

★ 2Status lineGuards

env-names-context

MatheusChiodi/cockpit

Lists the environment variable names the app expects, from .env.example, never their values

★ 2GuardsPrompt

env-undeclared-toast

MatheusChiodi/cockpit

A toast when an edit reads process.env or import.meta.env variables that .env.example does not declare

★ 2ToastsGuards

error-band

MatheusChiodi/cockpit

Keeps the last failed command and its error line in view until a command passes

★ 2BandsGuards

error-context-note

MatheusChiodi/cockpit

Tells Claude when an edit throws an error whose message names nothing, like "failed" or "something went wrong"

★ 2ToastsGuards

error-pane

MatheusChiodi/cockpit

/errors opens a pane with every tool call that failed or was denied, its input and the first line of the error

★ 2PanesGuardsCommands

esm-guard

MatheusChiodi/cockpit

Refuses require, module.exports and __dirname in .js files of a package that declares "type": "module"

★ 2Guards

explore-nudge

MatheusChiodi/cockpit

After 15 reads and searches in one turn, a toast and a note to Claude to hand the rest of the exploring to a subagent

★ 2ToastsGuards

explore-status

MatheusChiodi/cockpit

Status line with the reads against the edits of the turn, saying whether Claude is still exploring or already changing code

★ 2Status lineGuards

expo-install-guard

MatheusChiodi/cockpit

Refuses npm, pnpm or yarn installs of packages the Expo SDK pins and names the npx expo install command, and tells Claude to rebuild the dev client after a native one

★ 2ToastsGuards

eye-rest

MatheusChiodi/cockpit

The 20-20-20 rule: every 20 minutes of use, look 20 feet away for 20 seconds

★ 2ToastsGuardsPrompt

failed-commands

MatheusChiodi/cockpit

Reminds Claude of the commands that failed earlier in this session, so it does not retry them blindly

★ 2GuardsPromptAutomation

field-injection-note

MatheusChiodi/cockpit

Tells Claude when a Java edit adds @Autowired or @Inject on a field instead of the constructor

★ 2ToastsGuards

file-churn

MatheusChiodi/cockpit

Toast when the same file is edited six times within half an hour, a sign to step back

★ 2ToastsGuards

file-trail

MatheusChiodi/cockpit

/trail opens a pane with the files read and changed in the session

★ 2PanesGuardsCommands

files-band

MatheusChiodi/cockpit

Fixed band with the files Claude changed in this session

★ 2BandsGuards

fill-toast

MatheusChiodi/cockpit

A toast when the context window jumps 10 points or more in one step, naming the last tool that ran

★ 2ToastsGuards

flatlist-note

MatheusChiodi/cockpit

Tells Claude when an edit renders a mapped list inside a vertical ScrollView, or nests a FlatList in one, in a React Native project

★ 2ToastsGuards

flood-note

MatheusChiodi/cockpit

Tells Claude when a search or command returned over 300 lines, so it narrows the next one instead of repeating it

★ 2ToastsGuards

gate-band

MatheusChiodi/cockpit

Band with the tool calls denied and the ones that stopped to ask you in the current turn, and the last one

★ 2BandsGuards

generated-guard

MatheusChiodi/cockpit

Prevents edits in node_modules, dist, build, .next, coverage, .git and the like

★ 2Guards

git-band

MatheusChiodi/cockpit

Band with the branch, changed files, lines added and removed, ahead/behind and the last commit

★ 2BandsGuards

git-guard

MatheusChiodi/cockpit

Blocks destructive git: push --force, reset --hard, clean -f, --no-verify, branch -D

★ 2Guards