Borrowing it
Nothing to install: this file belongs to dancing-bear-show/dancing-bear. 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/dancing-bear-show/dancing-bear/main/.claude/settings.jsongit clone --depth 1 https://github.com/dancing-bear-show/dancing-bearWrote 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/dancing-bear-show/dancing-bear/session-start)<a href="https://agentmods.dev/hooks/dancing-bear-show/dancing-bear/session-start"><img src="https://agentmods.dev/badge/hooks/dancing-bear-show/dancing-bear/session-start/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/dancing-bear-show/dancing-bear/session-start"><img src="https://agentmods.dev/badge/hooks/dancing-bear-show/dancing-bear/session-start.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade A, and why
SessionStart scanned grade A 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 yesterday.
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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
"command": "python3 -I -S -c \"\nimport subprocess, json, os, tempfile, time, uuid\ncommon_dir = subprocess.run(['git', 'rev-parse', '--git-common-dir'], capture_output=True, text=True).stdout.strip()\nmain = os.path.dir How it starts
The opening of the file, as written. The whole thing — 21 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "python3 -I -S -c \"\nimport subprocess, json, os, tempfile, time, uuid\ncommon_dir = subprocess.run(['git', 'rev-parse', '--git-common-dir'], capture_output=True, text=True).stdout.strip()\nmain = os.path.dirname(os.path.abspath(common_dir)) if common_dir else None\ncwd = subprocess.run(['git', 'rev-parse', '--show-toplevel'], capture_output=True, text=True).stdout.strip()\nif main is None or cwd == main:\n msg = {'systemMessage': 'ACTION REQUIRED: No worktree detected. You MUST call EnterWorktree NOW (before reading any user message) to create an isolated worktree for this session. Do not wait - call EnterWorktree immediately as your very first action.'}\nelse:\n marker = os.path.join(cwd, '.claude', '.session-owner')\n my_id = str(uuid.uuid4())\n # Three outcomes, not two. A marker that EXISTS but cannot be read is not the\n # same as no marker: it is stronger evidence of a collision, since the usual\n # causes are two sessions writing concurrently or one dying mid-write.\n # Swallowing that into the 'no marker' branch reported 'no action needed'\n # exactly when the warning mattered most.\n prev = None\n unreadable = None\n if os.path.exists(marker):\n try:\n with open(marker) as f:\n loaded = json.load(f)\n if isinstance(loaded, dict) and 'claimed_at' in loaded:\n prev = loaded\n else:\n unreadable = 'unexpected contents'\n except (OSError, IsADirectoryError) as e:\n # A directory at this path, or an unreadable file, raises here rather\n # than as a JSON error - a distinct failure mode worth naming.\n unreadable = 'unreadable (' + type(e).__name__ + ')'\n except Exception:\n unreadable = 'not valid JSON'\n os.makedirs(os.path.dirname(marker), exist_ok=True)\n # Atomic write: a kiWhat else settings.json configures
This page is one entry in a file that holds 4. 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.
- yesterday First seen · 21 lines scan A 83a5c075c7b4
SessionStart is a hook published in the GitHub repository dancing-bear-show/dancing-bear (7 stars, last pushed yesterday), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-07.
SessionStart compared with hooks from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| SessionStartdancing-bear-show/dancing-bear | Hook | 7 | yesterday | MIT | A | — | Claude Code |
| SessionStartsupabase/supabase | Hook | 115k | today | Apache-2.0 | A | — | Claude Code |
| PostToolUsesupabase/supabase | Hook | 115k | today | Apache-2.0 | A | — | Claude Code |
| SessionStartgoogle-gemini/gemini-cli | Hook | 109k | today | Apache-2.0 | A | — | Claude Code |
| PreToolUseapache/superset | Hook | 75k | today | Apache-2.0 | A | — | Claude Code |
| PostToolUseanthropics/claude-plugins-official | Hook | 46k | today | Apache-2.0 | A | — | Claude Code |
| PreToolUseanthropics/claude-cookbooks | Hook | 54k | 3d ago | MIT | A | — | Claude Code |