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
2018 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

In the plugin's words

How r-skills describes its own hook set.

r-skills hooks: git push warning, doc-file warning, compaction suggestions, session state
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
Stats
202
Stars
34
Forks
Active
Maintenance
JavaScript
Language
MIT
License
4d ago
Last commit
7mo ago
Created

Repo: ab604/claude-code-r-skills