Skip to content

live-rules

Project rules in a Markdown file that Claude re-injects right when they apply: every prompt, or just before it edits a matching file. Edits apply on the next prompt, no restart. A SessionStart hook injects the always-on rules once as a fallback, and it’s a way to tell whether per-prompt injection is actually wired.

Version: 2.7.1

  • add-rule: Create or edit a live-rules instruction in the project’s configured rules file. Use to add a rule, coding guideline, guardrail, convention, or automatic reminder.
  • manage-rules: Inspect, audit, enable, or disable project live-rules. Use to list rules, check active instructions, explain an injected rule, or clean up rules.
  • SessionStart: node "${CLAUDE_PLUGIN_ROOT}/hooks/session-start-rules.js"
  • UserPromptSubmit: node "${CLAUDE_PLUGIN_ROOT}/hooks/inject-prompt-rules.js"
  • PreToolUse (Edit|Write|MultiEdit|NotebookEdit): node "${CLAUDE_PLUGIN_ROOT}/hooks/inject-edit-rules.js"
  • None

Source on GitHub