Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
baz-scm avatar

Pact Hooks

  • Updated June 18, 2026
  • baz-scm/PACT

pact-hooks is a Claude Code skill in the AI & Agent Building category. Captures Claude Code plans to PACT for human review before execution

Key points

  • pact-hooks
  • AI & Agent Building
  • AI-coding skill

Pact Hooks by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add baz-scm/PACT
/plugin install pact-hooks@baz

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Last updatedJune 18, 2026
Repositorybaz-scm/PACT

What it does

Captures Claude Code plans to PACT for human review before execution

README.md

@baz-scm/pact-hooks

Claude Code hooks that capture plan-mode output to PACT for human review before execution.

What the hooks do

Hook Event Behaviour
cc-capture PermissionRequest / ExitPlanMode Sends the plan to PACT, stores the share URL + creator token locally, prints the URL to your terminal
cc-gate PermissionRequest / ExitPlanMode Blocks plan execution until a human approves in the browser
cc-nudge UserPromptSubmit If your prompt is long and no plan has been captured yet for this session, suggests using /plan mode

Install

npm install -g @baz-scm/pact-hooks
pact-hooks install

Or with pnpm:

pnpm add -g @baz-scm/pact-hooks
pact-hooks install

Or one-liner:

curl -fsSL https://pact.baz.co/install.sh | sh

Restart Claude Code. That's it.

Point at a hosted server

By default hooks talk to http://localhost:3000. To use a hosted instance:

mkdir -p ~/.pact
echo '{"server":"https://plan.baz.co"}' > ~/.pact/config.json

Configuration

~/.pact/config.json — global, applies to all repos:

{
  "server": "http://localhost:3000",
  "enabled": true,
  "nudge": true,
  "redact": [],
  "gate_timeout_seconds": 300
}

.pact.json at your repo root — per-repo overrides (git-committable):

{
  "redact": ["ACME_API_KEY_\\w+"],
  "nudge": false
}
Field Default Description
server http://localhost:3000 PACT server URL
enabled true Set false to disable all hooks
nudge true Remind you to use plan mode on long prompts
redact [] Regex patterns — matched text replaced with [REDACTED] before upload
gate_timeout_seconds 86400 How long the gate hook waits for approval

Smart series detection

Each plan belongs to a series — a thread of related revisions for the same feature. When you exit plan mode, the hook compares the new plan against the previous one using word-level Jaccard similarity (the same heuristic git uses for rename detection).

  • Similar plan (≥ 30% word overlap) → update the existing series. Reviewers see it as a revision of the same feature.
  • Dramatically different plan (< 30% overlap) → create a fresh series. The old plan is preserved; the new one gets its own share URL.

This means you can work on multiple features in the same session or on the same branch without them clobbering each other.

Disable for a repo

// .pact.json

{ "enabled": false }

Self-host

Run the PACT server locally:

docker run -p 3000:3000 -v ./data:/data ghcr.io/baz-scm/pact

Then set server in your config to http://localhost:3000 (already the default).

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.