Claude Hook Experiment — Development skill for Claude Code
Reproducible Claude Code hook experiments for validating settings-based hook behavior.
How to install Claude Hook Experiment
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open nyosegawa/claude-hook-experiment and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Hook Experiment does
Reproducible Claude Code hook experiments for validating settings-based hook behavior.
Alternatives in Development
- Jupyter Notebook — Create clean, reproducible Jupyter notebooks for experiments and tutorials 14.6k ★
- Validate Plan — You are tasked with validating that an implementation plan was correctly executed, verifying all success crite 10k ★
- Prioritize Assumptions — Prioritize assumptions with Impact × Risk matrix and experiments 7.8k ★
README
claude-hook-experiment
Reproducible Claude Code hook experiments.
Snapshot
Included snapshot:
- Claude Code
2.1.72 - OS
Darwin 25.3.0
Observed in the included runs:
- settings-based
PreToolUse,Stop, andSubagentStopworked in the tested cases - plain stdout from
PostToolUsedid not appear as model-visible lint feedback hookSpecificOutput.additionalContextwas observed in-pand in the checked true TTY interactive case- the tested
plugin_dirsettings-hook cases worked - frontmatter
Stopwas not observed on the tested plugin-backed subagent path
Raw snapshots are stored in `results/`.
Layout
config/settings.local.json: shared settings-based hook fixturescripts/: experiment runnersresults/: saved JSONL snapshots from 2026-03-11cases/: minimal truth-case fixtureslogs/: selected TTY logs
Requirements
- Claude Code CLI (
claude) jqbash
Quick Start
For a manual smoke test:
./scripts/quick_test.sh
This prints a 3-case manual check and creates a small fixture under the system temp directory.
Re-run the automated matrix
Baseline matrix:
./scripts/run_auto_tests.sh
Default outputs:
${TMPDIR:-/tmp}/claude-hook-experiment/auto_cases/${TMPDIR:-/tmp}/claude-hook-experiment/auto_results.generated.jsonl
Focused matrix:
CLAUDE_MODEL=sonnet ./scripts/run_focus_tests.sh
Default outputs:
${TMPDIR:-/tmp}/claude-hook-experiment/focus_cases/${TMPDIR:-/tmp}/claude-hook-experiment/focus_results.generated.jsonl
Compare against the saved snapshots:
diff -u results/auto_results.jsonl "${TMPDIR:-/tmp}/claude-hook-experiment/auto_results.generated.jsonl"
diff -u results/focus_results.jsonl "${TMPDIR:-/tmp}/claude-hook-experiment/focus_results.generated.jsonl"
Manual truth cases
These fixtures were used to check stdout vs `additionalContext`, and local vs plugin-backed frontmatter `Stop`.
cases/tty_truth_post_stdout_sonnet
Related Skills
Gtm Experiment
Register, track, and analyze A/B experiments
Agent Edit
Edit an agent's personality, skills, prompts, and behavior settings
/install-hook - Install Generated Hook To Settings
Install a generated hook to Claude Code settings (user-level or project-level). ---
Claude Code Hook Manager
CLI tool to manage Claude Code hooks — creates, registers, and tracks prompt and script hooks without manually
Hook Creator
You are the Hook Creator Wizard. Your job is to interview the user and generate a complete, ready-to-use Claud
Claudemd Toggle
Enable or disable a specific claudemd hook (stored as DISABLE__HOOK in settings.json env).
Related Agents
Experiment
Performs focused technical experiments for uncertain behavior, algorithms, geometry, rendering, or performance
Research Scientist
Research scientist specializing in reproducible empirical ML/IR research — designs experiments
Mathodology Coder
Use for reproducible computation, simulation, optimization, figures, tables, and experiment logs.