Event Hooks
Community

claude-dotfiles

2 events · 5 hooks

Install
1
Install the plugin
$
npx claudepluginhub peopleforrester/claude-dotfiles

Want just this hook?

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

Risk Indicators
Matches all tools
Source

Defined in hooks/hooks.json

Configuration
{
  "Stop": [
    {
      "hooks": [
        {
          "type": "command",
          "async": true,
          "command": "git diff --name-only --diff-filter=M 2>/dev/null | xargs grep -l 'console\\.log' 2>/dev/null && echo 'WARNING: console.log found in modified files' || true",
          "timeout": 10,
          "// PURPOSE": "Check for console.log in modified files"
        }
      ]
    }
  ],
  "PostToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "async": true,
          "command": "npx prettier --write \"$CLAUDE_FILE_PATH\" 2>/dev/null || true",
          "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.(ts|tsx|js|jsx)$\"",
          "timeout": 10,
          "// PURPOSE": "Run Prettier after editing JS/TS files"
        },
        {
          "type": "command",
          "async": true,
          "command": "npx tsc --noEmit --pretty 2>&1 | head -20 || true",
          "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.(ts|tsx)$\"",
          "timeout": 30,
          "// PURPOSE": "Run type checking after editing TypeScript files"
        },
        {
          "type": "command",
          "async": true,
          "command": "ruff check --fix \"$CLAUDE_FILE_PATH\" 2>/dev/null && ruff format \"$CLAUDE_FILE_PATH\" 2>/dev/null || true",
          "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.py$\"",
          "timeout": 10,
          "// PURPOSE": "Run ruff after editing Python files"
        },
        {
          "type": "command",
          "async": true,
          "command": "gofmt -w \"$CLAUDE_FILE_PATH\" 2>/dev/null || true",
          "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.go$\"",
          "timeout": 10,
          "// PURPOSE": "Run gofmt after editing Go files"
        }
      ]
    }
  ]
}
Summary
{
  "riskFlags": {
    "touchesBash": false,
    "matchAllTools": true,
    "touchesFileWrites": false
  },
  "typeStats": {
    "command": 5
  },
  "eventStats": {
    "Stop": 1,
    "PostToolUse": 4
  },
  "originCounts": {
    "absolutePaths": 0,
    "pluginScripts": 0,
    "projectScripts": 0
  },
  "timeoutStats": {
    "commandsWithoutTimeout": 0
  }
}
Stats
Stars0
Forks0
Last CommitFeb 5, 2026

Similar Hooks