# Test Local

> Test prove_it from source against an example project or temp directory. Use when you want to verify hook behavior end-to-end without a Homebrew release. Use when this capability is needed.

- Skill: `tomevault-io/test-local` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/test-local`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/test-local/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/test-local

---


# Test prove_it locally

Run prove_it from the repo source (not the Homebrew install) to test hook behavior.

## Steps

1. Identify the test target. If the user didn't specify, use `example/basic/`.

2. Set up the PATH shim so `prove_it` resolves to the repo's `cli.js`:
   ```bash
   export PATH="$(git rev-parse --show-toplevel)/test/bin:$PATH"
   which prove_it   # should show test/bin/prove_it
   ```

3. Run the requested test. Common scenarios:

   **Test a specific hook event:**
   ```bash
   cd example/basic
   echo '{"hook_event_name":"Stop","session_id":"test","cwd":"."}' | prove_it hook claude:Stop
   ```

   **Test SessionStart:**
   ```bash
   echo '{"hook_event_name":"SessionStart","source":"startup","session_id":"test","cwd":"."}' | prove_it hook claude:SessionStart
   ```

   **Test PreToolUse (edit protection):**
   ```bash
   echo '{"hook_event_name":"PreToolUse","tool_name":"Edit","tool_input":{"file_path":"src/greet.js"},"session_id":"test","cwd":"."}' | prove_it hook claude:PreToolUse
   ```

   **Test PreToolUse (commit gate):**
   ```bash
   echo '{"hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"git commit -m test"},"session_id":"test","cwd":"."}' | prove_it hook claude:PreToolUse
   ```

   **Test init in a temp directory:**
   ```bash
   tmpdir=$(mktemp -d)
   cd "$tmpdir" && git init
   prove_it init --no-default-checks
   cat .claude/prove_it/config.json
   prove_it deinit
   rm -rf "$tmpdir"
   ```

   **Test doctor:**
   ```bash
   cd example/basic
   prove_it doctor
   ```

4. Report the output and whether the behavior matches expectations.

## Notes

- The shim at `test/bin/prove_it` just does `exec node ../../cli.js "$@"`
- All `$(prove_it prefix)/libexec/*` commands in configs will also resolve through the shim
- This tracks with the current git ref—check out any commit to test that version

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/searlsco) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

