Guards

1,799 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.

late-night

MatheusChiodi/cockpit

One toast per session when you work after 23:00 local time: it is late, park the work

★ 2ToastsGuardsPrompt

license-status

MatheusChiodi/cockpit

Status line that warns when the project has no license file or no license field in package.json

★ 2Status lineGuards

lockfile-guard

MatheusChiodi/cockpit

Prevents hand edits to lockfiles (package-lock, yarn.lock, pnpm-lock, Cargo.lock...)

★ 2Guards

long-file-toast

MatheusChiodi/cockpit

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

★ 2ToastsGuards

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

missing-import-guard

MatheusChiodi/cockpit

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

★ 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

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

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

read-pane

MatheusChiodi/cockpit

/reads opens a pane with the files read this session and how often; files read 3 or more times are flagged as wasted context

★ 2PanesGuardsCommands

readme-context

MatheusChiodi/cockpit

Gives Claude the first paragraph of the README, so it knows what the project is without reading it

★ 2GuardsPrompt

registry-guard

MatheusChiodi/cockpit

Asks before a command changes where packages come from: npm, pnpm, yarn and pip registry or index settings

★ 2Guards

release-status

MatheusChiodi/cockpit

Status line with the package version, the latest tag and the commits waiting for the next release

★ 2Status lineGuards

retry-status

MatheusChiodi/cockpit

Status line counting how many times in a row the same command has failed, until it passes or another fails

★ 2Status lineGuards

runtime-pin-context

MatheusChiodi/cockpit

Tells Claude the runtime versions the project pins: .nvmrc, engines, packageManager, .tool-versions

★ 2GuardsPrompt

script-guard

MatheusChiodi/cockpit

Refuses npm run or pnpm run of a script that package.json does not declare and lists the ones it does

★ 2Guards

scripts-context

MatheusChiodi/cockpit

Tells Claude the test, lint, build and dev scripts of package.json and the package manager, so it stops guessing commands

★ 2GuardsPrompt

slow-call-status

MatheusChiodi/cockpit

Status line with the tool call that has been running longest right now, once it passes 15 seconds

★ 2Status lineGuards

test-pane

MatheusChiodi/cockpit

/testlog opens a pane with every test run of the session: command, pass or fail, duration and time

★ 2PanesGuardsCommands

test-status

MatheusChiodi/cockpit

Status line entry with the result of the last test run: passed or failed, time and duration

★ 2Status lineGuards

tests-notify

MatheusChiodi/cockpit

Sends a native notification with pass or fail when a test run of 30 seconds or more finishes

★ 2GuardsAutomation

tool-tally

MatheusChiodi/cockpit

/tally opens a pane with the call count per tool

★ 2PanesGuardsCommands

turn-history

MatheusChiodi/cockpit

/turns opens a pane with one row per finished turn: duration, tool calls, output tokens and a cross for failed ones

★ 2PanesGuardsCommands