Borrowing it
Nothing to install: this file belongs to daniloc/mnemion. 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/daniloc/mnemion/main/.claude/settings.jsongit clone --depth 1 https://github.com/daniloc/mnemionWrote 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/daniloc/mnemion/stop)<a href="https://agentmods.dev/hooks/daniloc/mnemion/stop"><img src="https://agentmods.dev/badge/hooks/daniloc/mnemion/stop/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/daniloc/mnemion/stop"><img src="https://agentmods.dev/badge/hooks/daniloc/mnemion/stop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade B, and why
Stop scanned grade B 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 today.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
"command": "root=\"${CLAUDE_PROJECT_DIR:-$PWD}\"; while [ \"$root\" != / ] && [ ! -f \"$root/.claude/settings.json\" ] && [ ! -f \"$root/.codex/hooks.json\" ]; do root=$(dirname \"$root\"); done; coherence=; for c in \"$ This is a copy
38% identical to SessionStart — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 13 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "root=\"${CLAUDE_PROJECT_DIR:-$PWD}\"; while [ \"$root\" != / ] && [ ! -f \"$root/.claude/settings.json\" ] && [ ! -f \"$root/.codex/hooks.json\" ]; do root=$(dirname \"$root\"); done; coherence=; for c in \"${COHERENCE_HOME:+$COHERENCE_HOME/src/cli.ts}\" \"$root/mnemion-swift/node_modules/@posthog/coherence/dist/cli.js\" \"$root/mnemion-swift/node_modules/.bin/coherence\" \"$root/node_modules/@posthog/coherence/dist/cli.js\" \"$root/node_modules/.bin/coherence\"; do if [ -n \"$c\" ] && [ -f \"$c\" ]; then coherence=$c; break; fi; done; coherence() { if [ -z \"$coherence\" ]; then if [ \"$2\" = SessionStart ]; then printf '%s\\n' '{\"systemMessage\":\"Coherence is configured for this project but not installed, so its hooks do nothing this session; the agent has been told how to install it.\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Coherence is configured for this project (its hooks are in the agent host settings) but is not installed, so they do nothing this session: no vocabulary, specs, journal or checks. If package.json already lists @posthog/coherence, the project install has not run here: run it with the package manager this project uses (npm ci, pnpm install, yarn install). Otherwise add it as a dev dependency (npm install -D @posthog/coherence, pnpm add -D @posthog/coherence, or yarn add -D @posthog/coherence), which changes package.json and the lockfile. Changing the project dependencies is for the user to decide: unless the user asked for Coherence in this session, tell them it is missing and ask before installing it. Once it is installed, npx --no -- coherence spec --check confirms it, and the hooks answer from their next event.\"}}'; fi; exit 0; fi; if ! command -v node >/dev/null 2>&1; then if [ \"$2\" = SessionStart ]; then printf '%s\\n' '{\"systemMessage\":\"Coherence was found but node is not on the PATH its hookWhat else settings.json configures
This page is one entry in a file that holds 8. 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.
- today Changed scan A → B 51e44bfa1064
- 16d ago Changed · +1 lines 4962733bfe0e
- 1mo ago First seen · 12 lines scan A b0af324d077e
Stop is a hook published in the GitHub repository daniloc/mnemion (22 stars, last pushed today), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 38% identical to SessionStart, differing in 8 lines, and is treated as a copy.
Other hooks, from other repositories
SessionStart
Runs when a session starts on startup, executing install_pkgs.sh. From supabase/supabase.
PostToolUse
Runs after a tool call finishes for Write and Edit tool calls, executing format_and_lint.sh. From supabase/supabase.
SessionStart
Runs when a session starts, executing on-start.js via node. From google-gemini/gemini-cli.
PreToolUse
Runs before the agent uses a tool for Bash tool calls, running an inline shell check. From apache/superset.
PreToolUse
Runs before the agent uses a tool, executing pre-write.sh and pre-bash.sh (2 commands). From anthropics/claude-cookbooks.
PostToolUse
Runs after a tool call finishes for Bash tool calls, executing hooks.sh via sh (3 commands). From anthropics/claude-plugins-official.