Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add hooks/jameslowman/planning-with-james/session-startgit clone --depth 1 https://github.com/jameslowman/planning-with-jamesWrote 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/jameslowman/planning-with-james/session-start)<a href="https://agentmods.dev/hooks/jameslowman/planning-with-james/session-start"><img src="https://agentmods.dev/badge/hooks/jameslowman/planning-with-james/session-start.svg" alt="Measured on agentmods" height="20"></a>Grade A, and why
SessionStart scanned grade A with 0 findings 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 3d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 24 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash -c 'KNOWLEDGE_DIR=\".claude/planning-with-james/knowledge\"; if [ ! -d \"$KNOWLEDGE_DIR\" ]; then echo \"{\\\"message\\\": \\\"Knowledge base not found. Run /planning-with-james:create-knowledge to index this codebase.\\\"}\"; else OVERVIEW=\"$KNOWLEDGE_DIR/_overview.md\"; if [ -f \"$OVERVIEW\" ]; then LAST_COMMIT=$(grep -oP \"(?<=last_commit: )[a-f0-9]+\" \"$OVERVIEW\" 2>/dev/null || echo \"\"); CURRENT_COMMIT=$(git rev-parse HEAD 2>/dev/null || echo \"\"); if [ -n \"$LAST_COMMIT\" ] && [ -n \"$CURRENT_COMMIT\" ] && [ \"$LAST_COMMIT\" != \"$CURRENT_COMMIT\" ]; then COMMIT_COUNT=$(git rev-list --count \"$LAST_COMMIT\"..\"$CURRENT_COMMIT\" 2>/dev/null || echo \"unknown\"); echo \"{\\\"message\\\": \\\"Knowledge base is $COMMIT_COUNT commits behind. Consider running /planning-with-james:update-knowledge.\\\"}\"; fi; fi; fi'",
"timeout": 10
}
]
},
{
"matcher": "compact",
"hooks": [
{
"type": "command",
"command": "bash -c 'SESSION_ID=$(jq -r \".session_id // empty\" 2>/dev/null); REG=\".claude/planning-with-james/plans/_registry.json\"; KNOWLEDGE=\".claude/planning-with-james/knowledge/_overview.md\"; MSG=\"\"; if [ -f \"$REG\" ] && [ -n \"$SESSION_ID\" ]; then ACTIVE=$(jq -r \".sessions[\\\"$SESSION_ID\\\"].active_plan // empty\" \"$REG\" 2>/dev/null); if [ -n \"$ACTIVE\" ]; then PDIR=$(jq -r \".plans[\\\"$ACTIVE\\\"].path // empty\" \"$REG\" 2>/dev/null); if [ -n \"$PDIR\" ] && [ -f \"$PDIR/context_scratch_pad.md\" ]; then MSG=\"[POST-COMPACT RECOVERY] You are using the planning-with-james plugin. Active plan: $ACTIVE. Read $PDIR/context_scratch_pad.md to restore context. All paths are relative to repo root, not ~/.claude/.\"; fi; fi; fi; if [ -z \"$MSG\" ] && [ -f \"$KNOWLEDGE\" ]; then MSG=\"[POST-COMPACT REMINDER] You are using the planning-with-james plugin. KnowWhat else hooks.json configures
This page is one entry in a file that holds 2. 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.
- 3d ago First seen · 24 lines scan A 0804fc95ac04
SessionStart is a hook published in the GitHub repository jameslowman/planning-with-james (2 stars, last pushed 4mo ago), 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 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other hooks, from other repositories
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.
SessionStart
Runs when a session starts on startup, executing install_pkgs.sh. From supabase/supabase.
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.
SessionStart
Runs when a session starts, executing session-start.sh. From anthropics/claude-cookbooks.