Skip to content
Development
Hook

Hooks

What r-skills runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
r-skills
1898 skills3 agents4 commands4 hooks
Install
> /plugin marketplace add ab604/claude-code-r-skills

Ships with r-skills. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • MatchesBashnode "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/git-push-warn.js"
  • MatchesWritenode "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/doc-blocker.js"
  • MatchesEdit|Writenode "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/suggest-compact.js"

PreCompact

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/pre-compact.js"

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/session-start.js"

SessionEnd

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/scripts/session-end.js"
Read hooks/hooks.json
Ships withr-skills

A curated collection of Claude Code configurations for modern R use. These skills, rules, commands, and agents help Claude Code understand R best practices and generate idiomatic, high-quality R code.

Get the whole plugin