Skip to content

Hook System

Ranger integrates with Claude Code through hooks: automatic triggers that fire at key moments in the coding session. Hooks guide Claude through the Feature Review workflow without requiring you to remember commands or prompt for it repeatedly.

The Claude Code plugin should be automatically installed when you run ranger start. If you need to re-install them at any point, you can run:

/plugin marketplace add ranger-testing/trailhead
/plugin install ranger@trailhead

from inside Claude or:

claude plugin marketplace add ranger-testing/trailhead
claude plugin install ranger@trailhead

from the terminal. After installing, you may need to restart Claude Code before you can use the plugin.

We started with just the skills and discovered that Claude kept forgetting to use ranger and would return to us with errors that would have been caught with verification.

We temporarily solved that with careful and repeated prompting, but wanted to automate it. Claude Code plugins offer “hooks” that can be used to remind Claude—if relevant—to use Ranger and check its work before returning to the user.

We’ve found that enabling hooks whenever we’re working on UI-related work has dramatically improved Claude’s reliability with Feature Review.

Hooks are off by default. Run /ranger:enable in Claude Code to activate them for your current session and branch.

Once enabled on a branch, Ranger stays enabled across sessions. Use /ranger:disable to explicitly turn hooks off.

On main/master, hooks only enable at the session level (not branch-persisted), since these branches are shared.

HookWhen It FiresWhat It Does
session-startSession createdChecks if the branch is enabled; auto-enables if so.
session-endSession endedIf reason is /clear and session was enabled, auto-enables on next session.
enable/ranger:enableRuns ranger update, enables session + branch, outputs the full skill content to Claude’s context.
disable/ranger:disableDisables session + branch, tells Claude to stop using Ranger commands.
stopSession stoppingAuto-concludes the active feature session. Blocks stop if conclude fails (pending items).
post-editAfter file write/editIf Ranger is enabled but no feature is registered, suggests using /ranger. If a feature exists, hints about adding checklist items if scope expanded.
pre-compactBefore context compactionReminds Claude to preserve the Ranger Feature Specification in the compacted summary.
plan-startEntering plan modeInstructs Claude to include a Ranger Feature Specification in the plan.
exit-plan-modeLeaving plan modeReminds Claude to create the feature with ranger feature create before starting implementation.