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.

log-concat-note

MatheusChiodi/cockpit

Tells Claude when a Java edit builds a log message by string concatenation or String.format instead of placeholders

★ 2ToastsGuards

long-cmd-notify

MatheusChiodi/cockpit

Sends a native notification when a shell command that ran two minutes or more finishes

★ 2GuardsAutomation

long-file-toast

MatheusChiodi/cockpit

Toast when an edit takes a file past 500 lines, and again at every 100 more

★ 2ToastsGuards

loose-equality-note

MatheusChiodi/cockpit

Tells Claude when an edit compares with == or != where === or !== belongs, leaving == null alone

★ 2ToastsGuards

magic-number-note

MatheusChiodi/cockpit

Tells Claude when an edit repeats the same bare number three times instead of naming it once

★ 2ToastsGuards

main-branch-guard

MatheusChiodi/cockpit

Refuses commit, push, merge and rebase while the current branch is main/master

★ 2GuardsAutomation

map-key-note

MatheusChiodi/cockpit

Tells Claude when an edit maps a list to elements without a key, or uses the array index as the key

★ 2ToastsGuards

marker-guard

MatheusChiodi/cockpit

Refuses a commit whose staged changes still hold conflict markers, listing the files

★ 2GuardsAutomation

memo-prop-note

MatheusChiodi/cockpit

Tells Claude when an edit passes an inline object, array or function to a component wrapped in memo, which defeats the memo

★ 2ToastsGuards

metro-guard

MatheusChiodi/cockpit

Asks before expo start or react-native start when a Metro bundler already answers on its port

★ 2GuardsAutomation

migration-guard

MatheusChiodi/cockpit

Refuses edits to existing database migrations (Prisma, Rails, Django, Alembic, Flyway); a new file is the fix

★ 2Guards

migration-status

MatheusChiodi/cockpit

Status line with the migration files created and not yet committed, ready to apply

★ 2Status lineGuards

missing-import-guard

MatheusChiodi/cockpit

Refuses an edit that imports a package which is neither in package.json nor in node_modules

★ 2Guards

mutable-default-note

MatheusChiodi/cockpit

Tells Claude when an edit gives a Python function a mutable default such as [], {} or set()

★ 2ToastsGuards

needs-you-notify

MatheusChiodi/cockpit

Sends a native notification when Claude stops to ask you a question or needs your permission

★ 2Guards

next-boundary-guard

MatheusChiodi/cockpit

Refuses Next.js app router edits that break the client/server boundary: hooks without 'use client', or server-only code inside a client file

★ 2Guards

oracle-name-guard

MatheusChiodi/cockpit

Refuses an edit that creates a table, index, constraint, sequence or trigger named over 30 characters, the Oracle 11g limit

★ 2Guards

oracle-paging-guard

MatheusChiodi/cockpit

Refuses an edit that adds FETCH FIRST, OFFSET ROWS or LIMIT to SQL, which Oracle 11g cannot run, and names the ROWNUM form

★ 2Guards

oracle-syntax-guard

MatheusChiodi/cockpit

Refuses an edit that adds IDENTITY columns, LISTAGG ON OVERFLOW, JSON functions or BOOLEAN columns, none of which Oracle 11g has

★ 2Guards

param-count-note

MatheusChiodi/cockpit

Tells Claude when an edit adds a function with more than five parameters

★ 2ToastsGuards

path-jail

MatheusChiodi/cockpit

Restricts Write/Edit to the project root, the temp folder and ~/.claude (resolves symlinks)

★ 2Guards

persistence-guard

MatheusChiodi/cockpit

Asks before a command that makes something run on its own later: cron, schtasks, systemd, launchd or a Startup folder

★ 2Guards

pipe-shell-guard

MatheusChiodi/cockpit

Blocks curl | sh, wget | bash, iwr | iex and variants

★ 2Guards

pm-guard

MatheusChiodi/cockpit

Refuses npm, pnpm, yarn or bun commands that use a different package manager than the project's lockfile, and names the right one

★ 2Guards