Borrowing it
Nothing to install: this file belongs to solanabr/solana-ai-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/solanabr/solana-ai-kit/main/.claude/settings.jsongit clone --depth 1 https://github.com/solanabr/solana-ai-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/hooks/solanabr/solana-ai-kit/pre-tool-use)<a href="https://agentmods.dev/hooks/solanabr/solana-ai-kit/pre-tool-use"><img src="https://agentmods.dev/badge/hooks/solanabr/solana-ai-kit/pre-tool-use/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/hooks/solanabr/solana-ai-kit/pre-tool-use"><img src="https://agentmods.dev/badge/hooks/solanabr/solana-ai-kit/pre-tool-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade C, and why
PreToolUse scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
"command": "INPUT=$(cat)\nCMD=$(printf '%s' \"$INPUT\" | jq -r '.tool_input.command // empty' 2>/dev/null || printf '%s' \"$INPUT\")\nif printf '%s' \"$CMD\" | grep -qE '\\.ssh/|\\.gnupg|\\.aws/|\\.config/solana/id\\.jso Copies of this mod
2 near-identical copies found in the catalogue:
- PreToolUse — 100% identical, 19 lines differ
- PreToolUse — 100% identical, 19 lines differ
How it starts
The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "INPUT=$(cat)\nCMD=$(printf '%s' \"$INPUT\" | jq -r '.tool_input.command // empty' 2>/dev/null || printf '%s' \"$INPUT\")\nif printf '%s' \"$CMD\" | grep -qE '\\.ssh/|\\.gnupg|\\.aws/|\\.config/solana/id\\.json|\\.npmrc|\\.git-credentials|\\.netrc|\\.cargo/credentials|\\.docker/config\\.json|\\.config/gh/hosts|\\.kube/config|\\.pypirc|\\.gem/credentials|Application[\\\\ ]+Support/Google/Chrome|Application[\\\\ ]+Support/BraveSoftware|Application[\\\\ ]+Support/Microsoft[\\\\ ]+Edge|Application[\\\\ ]+Support/Firefox|Application[\\\\ ]+Support/Chromium|Application[\\\\ ]+Support/Vivaldi|Application[\\\\ ]+Support/Arc|Application[\\\\ ]+Support/com\\.operasoftware|\\.config/google-chrome|\\.config/BraveSoftware|\\.config/microsoft-edge|\\.mozilla/firefox|\\.config/chromium|\\.config/vivaldi|\\.config/opera|AppData/Local/Google/Chrome|AppData/Local/BraveSoftware|AppData/Local/Microsoft/Edge|AppData/Roaming/Mozilla/Firefox|AppData/Local/Chromium|AppData/Local/Vivaldi|AppData/Roaming/Opera[\\\\ ]+Software|Local[\\\\ ]+Extension[\\\\ ]+Settings|moz-extension'; then\n echo '🛑 Blocked: reading private keys, wallet vaults, or credentials is not allowed. Use `solana address` for your pubkey.' >&2\n exit 2\nfi\nexit 0"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "INPUT=$(cat)\nCMD=$(printf '%s' \"$INPUT\" | jq -r '.tool_input.command // empty' 2>/dev/null || printf '%s' \"$INPUT\")\nprintf '%s' \"$CMD\" | grep -qE 'git commit' || exit 0\n\necho \"🔍 Running pre-commit checks...\"\n\nif [ -f \"Anchor.toml\" ] || grep -q \"solana-program\" Cargo.toml 2>/dev/null; then\n cargo fmt --check || { cargo fmt; echo \"❌ rustfmt reformatted files — review and re-run the commit\" >&2; exit 2; }\n cargo clippy --all-targets -- -D warnings || { echo \"❌ cargo clippy failedWhat else settings.json configures
This page is one entry in a file that holds 6. Installing the file brings all of them; each is measured and scanned on its own page.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · -9 lines 5c0b8f40c360
- 2mo ago Changed · +12 lines scan A → C f1680df3af9e
- 3mo ago First seen · 28 lines scan A 1a66e77597fb
PreToolUse is a hook published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 2mo ago), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
PreToolUse compared with hooks from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| PreToolUsesolanabr/solana-ai-kit | Hook | 104 | 2mo ago | MIT | C | — | Claude Code |
| PreToolUsefusengine/agents | Hook | 34 | 1mo ago | MIT | A | — | Claude Code |
| SubagentStopfusengine/agents | Hook | 34 | 1mo ago | MIT | A | — | Claude Code |
| SessionEndfusengine/agents | Hook | 34 | 1mo ago | MIT | A | — | Claude Code |
| PostToolUsefusengine/agents | Hook | 34 | 1mo ago | MIT | A | — | Claude Code |
| PostToolUsesupabase/supabase | Hook | 116k | today | Apache-2.0 | A | — | Claude Code |
| SessionStartgoogle-gemini/gemini-cli | Hook | 110k | today | Apache-2.0 | A | — | Claude Code |