Skip to content
Development
Hook

Hooks

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

From plugin
parable
231 hook

Where it lives

  • hooks/rule-refresh.shGitHub
    Read the script
    #!/bin/bash
    # Periodic rule refresh: emits a short reminder at most once per 300s per
    # session; silent otherwise. Wired to PostToolUse so long-running agents
    # (subagents included) get the rules re-planted mid-run instead of only at
    # session start.
    inp=$(cat)
    sid=$(printf '%s' "$inp" | sed -n 's/.*"session_id" *: *"\([^"]*\)".*/\1/p')
    [ -z "$sid" ] && sid="global"
    f="${TMPDIR:-/tmp}/claude-rulecard-$sid"
    now=$(date +%s)
    last=$(cat "$f" 2>/dev/null || echo 0)
    if [ $((now - last)) -gt 300 ]; then
      echo "$now" > "$f"
      printf '%s' '{"hookSpecificOutput":{"hookEventName":"PostToolUse","additionalContext":"RULE REFRESH (auto, periodic): conclusions in the channel, cognition in the thoughts file - visible text is verdict + next step only, a few lines max; no wait/actually/maybe, no narrated deliberation. Directors: report each [DONE Pn] the moment it lands. Before declaring done, VERIFY with commands and paste the artifact (never claim): the build check AND a real runtime run, probe/test evidence for every behavior, docs regenerated, any standing logs appended."}}'
    fi
    exit 0
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

Ships withparable

**Parable is an unofficial, community-made pseudo-Fable mode for Claude Opus (and Sonnet): Claude Fable 5's working discipline, distilled into a Claude Code skill set plus a hook mechanism.** It is not affiliated with or endorsed by Anthropic, and everything

Get the whole plugin
Stats
23
Stars
0
Forks
Maintained
Maintenance
Shell
Language
MIT
License
2mo ago
Last commit
2mo ago
Created

Repo: SamBWarren/parable