Claude Code Safety Hooks
Tested Claude Code hooks as a plugin: block rm -rf and force-push to main, protect .env and lockfiles, catch API keys in files, audit log. $19 once.
View Claude Code Safety Hooks
Add Claude to your pull requests and issues without opening a hole in your CI.

| Workflow | Trigger | Claude can | Token permissions |
|---|---|---|---|
| claude-pr-review.yml | PR opened/updated (not drafts, not forks) | inline + summary comments only | contents read, pull-requests write |
| claude-mention.yml | @claude in an issue, PR comment or review | answer and push commits to a branch (the action checks the commenter has write access) | contents/pull-requests/issues write |
| claude-issue-triage.yml | issue opened | add existing labels, flag duplicates | contents read, issues write |
| claude-ci-failure-explainer.yml | your CI workflow fails on a PR | read failed logs, comment the cause + a suggested diff | contents read, actions read, pull-requests write |
| claude-security-review.yml | PR touches auth, API, SQL, migrations, Dockerfiles, workflows, manifests | security findings as inline comments | contents read, pull-requests write |
| claude-fork-pr-review.yml | maintainer adds the claude-review label to a fork PR | read the PR through gh pr diff only; PR code is never checked out or run | contents read, pull-requests write |
| claude-weekly-maintenance.yml | Monday 13:00 UTC + manual | open one "Weekly repo health" issue | contents read, issues write |
| claude-docs-sync.yml | PR changes src/api, src/cli or OpenAPI | comment exact doc edits | contents read, pull-requests write |
python3 tools/install.py /path/to/repo --dry-run
python3 tools/install.py /path/to/repo --only pr-review --only issue-triage --only ci-failure-explainer --ci-workflow "Tests"Then: add an ANTHROPIC_API_KEY repository secret (or run /install-github-app in Claude Code, which also installs the Claude GitHub App), create the claude-review label if you use the fork workflow, and run the linter. Existing workflow files are kept unless you pass --force (a .bak is saved).
Bedrock, Vertex AI or Foundry: replace anthropic_api_key with the provider inputs from the action's cloud-providers guide; the linter accepts those.
What "hardened" means here, in every workflow:
python3 tools/claude_action_lint.py .github/workflows # exit 1 on errors
python3 tools/claude_action_lint.py .github/workflows --strict # also fail on warnings (for CI)Errors: PR head checked out at the workspace root on pull_request_target / workflow_run; untrusted github.event text inside run:; permissions: write-all; API keys written in the file or not read from secrets; no authentication input; --dangerously-skip-permissions on PR/comment events; allowed_non_write_users without github_token: ${{ secrets.GITHUB_TOKEN }} (or with a personal access token), or set to * while Claude has write access. Warnings: unpinned actions, no permissions block, no timeout-minutes, no concurrency on PR workflows, no --max-turns, open Bash in --allowedTools, untrusted text pasted into the prompt, allowed_bots: '*', claude-code-base-action on PR/comment events (no actor checks). Info: fork PRs that will fail for lack of secrets; comment-triggered jobs without an if: filter.
--json gives machine-readable results with file, job and line.
The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 15 tests OK on Python 3.13 and 3.10.

./tools/demo.sh lints the 8 workflows (0 errors, 0 warnings), lints examples/bad-workflows (2 files, 8 errors, 13 warnings), installs 3 workflows into a temp repo and lints them with --strict.
./run_tests.sh (15 tests, Python 3.9+): all 8 workflows parse and lint clean in strict mode; every job has permissions, a timeout of 30 minutes or less, one pinned Claude step with --max-turns and the key from secrets; only the @claude workflow can write code; the fork workflow never checks out PR code; no untrusted text in prompts; each linter rule fires on a bad example and stays quiet on the safe version; installer and CLI exit codes; the demo runs.
Zip, 25 KB, v1.0, 18 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by Anthropic or GitHub.
8 secure claude-code-action workflows: PR review, @claude mentions, issue triage, CI failure fixes, security review, fork-safe review, plus a linter.
Tested Claude Code hooks as a plugin: block rm -rf and force-push to main, protect .env and lockfiles, catch API keys in files, audit log. $19 once.
View Claude Code Safety HooksFree Claude Code hooks examples: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Notification and Stop, plus a local tester that checks your hook's output.
View Claude Code Hooks Starter (Free)24 Cursor rules (.mdc) for Next.js, TypeScript, React, Python, FastAPI, Django, Go, Rust and more. Detects your stack, installs in one command, lints your rules. $12 once.
View Cursor Rules PackShort weekly digest of new x402 + MCP tools and free kits, including the MCP OAuth Checker. No spam, unsubscribe any time.