Event Hooks
Community

loaf

5 events · 35 hooks

Install
1
Install the plugin
$
npx claudepluginhub levifig/loaf --plugin loaf

Want just this hook?

Then install: npx claudepluginhub u/[userId]/[slug]

Risk Indicators
Executes bash commandsModifies files
Source

Defined inline in plugin.json manifest

Configuration
{
  "PreCompact": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/pre-compact-archive.sh",
          "timeout": 60000,
          "description": "Identify active sessions and prompt for context-archiver agent to preserve state"
        }
      ]
    }
  ],
  "PreToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-check-secrets.sh",
          "timeout": 30000,
          "description": "Check for hardcoded secrets before writing"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-validate-changelog.sh",
          "timeout": 30000,
          "description": "Validate changelog format"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-format-check.sh",
          "timeout": 60000,
          "description": "Check code formatting"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-tdd-advisory.sh",
          "timeout": 5000,
          "description": "Advisory warning when editing implementation without tests"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-type-check.sh",
          "timeout": 60000,
          "description": "Run mypy type checking"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-pytest-validation.sh",
          "timeout": 120000,
          "description": "Validate pytest configuration"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-type-check-progressive.sh",
          "timeout": 120000,
          "description": "Progressive type checking"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-ruff-lint.sh",
          "timeout": 30000,
          "description": "Run ruff linting"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-pytest-execution.sh",
          "timeout": 480000,
          "description": "Run pytest tests"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-bandit-scan.sh",
          "timeout": 60000,
          "description": "Run bandit security scan"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/typescript-tsc-check.sh",
          "timeout": 60000,
          "description": "Run TypeScript compiler check"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/typescript-bundle-analysis.sh",
          "timeout": 60000,
          "description": "Analyze bundle size impact"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/rails-migration-safety.sh",
          "timeout": 60000,
          "description": "Check migration safety"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/rails-migration-safety-deep.sh",
          "timeout": 300000,
          "description": "Deep migration safety analysis"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/rails-test-execution.sh",
          "timeout": 480000,
          "description": "Run Rails tests"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/rails-brakeman-scan.sh",
          "timeout": 120000,
          "description": "Run Brakeman security scan"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/infra-validate-k8s.sh",
          "timeout": 60000,
          "description": "Validate Kubernetes manifests"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/infra-dockerfile-lint.sh",
          "timeout": 30000,
          "description": "Lint Dockerfile"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/infra-k8s-dry-run-server.sh",
          "timeout": 120000,
          "description": "Kubernetes dry-run validation"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/infra-terraform-plan-cost.sh",
          "timeout": 300000,
          "description": "Terraform plan with cost estimation"
        }
      ],
      "matcher": "Edit|Write"
    },
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-security-audit.sh",
          "timeout": 600000,
          "description": "Run security audit on bash commands"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-validate-push.sh",
          "timeout": 60000,
          "description": "Validates version bump, CHANGELOG, and build before git push"
        },
        {
          "type": "command",
          "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/orchestration-validate-commit.py",
          "timeout": 30000,
          "description": "Validate commit messages follow conventions"
        },
        {
          "type": "command",
          "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/orchestration-detect-linear-magic.py",
          "timeout": 30000,
          "description": "Detect Linear magic words for auto-status updates"
        }
      ],
      "matcher": "Bash"
    }
  ],
  "SessionEnd": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-end.sh",
          "description": "Agent-specific completion checklist and session hygiene reminder"
        }
      ]
    }
  ],
  "PostToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/python-ruff-check.sh",
          "description": "Run ruff after changes"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/typescript-eslint-check.sh",
          "description": "Run ESLint after changes"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/rails-rubocop-check.sh",
          "description": "Run RuboCop after changes"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/design-a11y-validation.sh",
          "description": "Validate accessibility after changes"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/design-token-check.sh",
          "description": "Check design token usage"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/design-a11y-audit.sh",
          "description": "Full accessibility audit"
        },
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/orchestration-generate-task-board.sh",
          "description": "Regenerate TASKS.md when task files change"
        }
      ],
      "matcher": "Edit|Write"
    },
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/foundations-changelog-reminder.sh",
          "description": "Remind about changelog updates after git commit"
        }
      ],
      "matcher": "Bash"
    }
  ],
  "SessionStart": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh",
          "description": "Agent-aware session context and active sessions overview"
        }
      ]
    }
  ]
}
Summary
{
  "riskFlags": {
    "touchesBash": true,
    "matchAllTools": false,
    "touchesFileWrites": true
  },
  "typeStats": {
    "command": 35
  },
  "eventStats": {
    "PreCompact": 1,
    "PreToolUse": 24,
    "SessionEnd": 1,
    "PostToolUse": 8,
    "SessionStart": 1
  },
  "originCounts": {
    "absolutePaths": 0,
    "pluginScripts": 35,
    "projectScripts": 0
  },
  "timeoutStats": {
    "commandsWithoutTimeout": 10
  }
}

Similar Hooks