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
5,126 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.
MatheusChiodi/cockpit
Refuses npm run or pnpm run of a script that package.json does not declare and lists the ones it does
MatheusChiodi/cockpit
Asks before a script or config gets a world-writable mode, umask 0 or an Everyone grant
MatheusChiodi/cockpit
Tells Claude the test, lint, build and dev scripts of package.json and the package manager, so it stops guessing commands
MatheusChiodi/cockpit
Refuses Write/Edit whose content carries API keys, tokens or private keys
MatheusChiodi/cockpit
Toast after three hours of continuous use in one session, then again every hour
MatheusChiodi/cockpit
Band with the total lines Claude wrote and removed in the session
MatheusChiodi/cockpit
/stats sums up the session: time, prompts, tools, tokens, context and cost
MatheusChiodi/cockpit
Band with the count of calls blocked by guards and the last reason
MatheusChiodi/cockpit
Status line with the tool call that has been running longest right now, once it passes 15 seconds
MatheusChiodi/cockpit
A toast when a shell command took a minute or more, with the command and how long it ran
MatheusChiodi/cockpit
Asks before a command rewrites test snapshots: jest -u, vitest -u, --snapshot-update, insta accept
MatheusChiodi/cockpit
Names the tool call that is running beside the spinner word, so a long wait says what it is waiting on
MatheusChiodi/cockpit
Asks before an edit builds an SQL statement by joining strings or interpolating values
MatheusChiodi/cockpit
Blocks DROP, TRUNCATE and DELETE/UPDATE without WHERE in shell commands
MatheusChiodi/cockpit
Tells Claude when a .sql script edit adds a DELETE or UPDATE with no WHERE clause
MatheusChiodi/cockpit
Refuses git add -A, git add . and git commit -a while a .env, key or certificate is waiting to be staged
MatheusChiodi/cockpit
Toast after two hours of use without a 10 minute break: stand up and walk
MatheusChiodi/cockpit
Tells Claude when an edit changes React state in place (push, splice, sort, property assignment) instead of building a new value
MatheusChiodi/cockpit
Toast after four failed shell commands in a row at the same thing: time to step back and look at the problem
MatheusChiodi/cockpit
Tells Claude the code style your formatter and linter enforce: quotes, semicolons, indent, line width
MatheusChiodi/cockpit
Blocks privilege elevation: sudo, doas, su -c, runas and Start-Process -Verb RunAs
MatheusChiodi/cockpit
Refuses an edit that adds a blanket suppression: eslint-disable, @ts-ignore, @ts-nocheck, bare # noqa or # type: ignore
MatheusChiodi/cockpit
A mascot above the prompt that reacts: working, happy, sad or sleepy
MatheusChiodi/cockpit
/testlog opens a pane with every test run of the session: command, pass or fail, duration and time
No tracking cookies, no third-party scripts. How we handle data