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@trailheadfrom inside Claude or:
claude plugin marketplace add ranger-testing/trailheadclaude plugin install ranger@trailheadfrom the terminal. After installing, you may need to restart Claude Code before you can use the plugin.
Why Hooks
Section titled “Why Hooks”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.
Opt-In Model
Section titled “Opt-In Model”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.
Hook Reference
Section titled “Hook Reference”| Hook | When It Fires | What It Does |
|---|---|---|
| session-start | Session created | Checks if the branch is enabled; auto-enables if so. |
| session-end | Session ended | If reason is /clear and session was enabled, auto-enables on next session. |
| enable | /ranger:enable | Runs ranger update, enables session + branch, outputs the full skill content to Claude’s context. |
| disable | /ranger:disable | Disables session + branch, tells Claude to stop using Ranger commands. |
| stop | Session stopping | Auto-concludes the active feature session. Blocks stop if conclude fails (pending items). |
| post-edit | After file write/edit | If Ranger is enabled but no feature is registered, suggests using /ranger. If a feature exists, hints about adding checklist items if scope expanded. |
| pre-compact | Before context compaction | Reminds Claude to preserve the Ranger Feature Specification in the compacted summary. |
| plan-start | Entering plan mode | Instructs Claude to include a Ranger Feature Specification in the plan. |
| exit-plan-mode | Leaving plan mode | Reminds Claude to create the feature with ranger feature create before starting implementation. |