원클릭으로
hooks-automation
Automated coordination and formatting using standard Git hooks and Claude Code's native tool hooks (PreToolUse/PostToolUse).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Automated coordination and formatting using standard Git hooks and Claude Code's native tool hooks (PreToolUse/PostToolUse).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Develop and contribute to the Plexium codebase — package structure, build commands, test patterns, architecture layers
Operate within a Plexium-powered repository — read wiki before work, update wiki after changes, follow ownership rules, use retrieval
Use when the user wants to install or verify the Plexium CLI from inside Codex.
Use when the user wants to initialize Plexium, set up the current repository for Codex, verify readiness, or connect Plexium's MCP server in Codex.
Use when the user wants to install Plexium, set up the current repo for Claude Code, verify readiness, or query the Plexium wiki from Claude Code.
Use when the user wants to search or retrieve information from the Plexium wiki in the current repository.
| name | Hooks Automation |
| version | 2.0.0 |
| description | Automated coordination and formatting using standard Git hooks and Claude Code's native tool hooks (PreToolUse/PostToolUse). |
| tags | ["hooks","automation","git","claude-code"] |
Automate development workflows, enforce quality, and manage state using standard Git hooks and Claude Code's native hooks configuration.
Git hooks are standard scripts executed by Git before or after events like commit, push, and merge.
Create a script at .git/hooks/pre-commit (make sure to chmod +x):
#!/bin/bash
# Run linting and tests before allowing a commit
echo "Running pre-commit checks..."
# Run linter
npm run lint
if [ $? -ne 0 ]; then
echo "Linting failed. Please fix errors before committing."
exit 1
fi
# Run tests
npm test
if [ $? -ne 0 ]; then
echo "Tests failed. Please fix tests before committing."
exit 1
fi
echo "All checks passed!"
exit 0
Note: For easier management across teams, use tools like Husky or Lefthook instead of manual .git/hooks scripts.
Claude Code supports powerful event-driven hooks defined in .claude/settings.json or ~/.claude/hooks.json. These hooks can run bash commands or LLM prompts before/after tools are used.
Automatically format files after Claude edits them:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "npx prettier --write \"\\${tool.params.file_path}\"",
"continueOnError": true
}
]
}
]
}
}
Prevent Claude from running dangerous shell commands:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "prompt",
"prompt": "Command: $TOOL_INPUT.command. Check for destructive operations (rm -rf /, dd, mkfs). Return 'approve' or 'deny' with explanation.",
"timeout": 15
}
]
}
]
}
}
continueOnError for non-critical post-operation hooks (like auto-formatting) so the agent loop isn't broken if the hook fails..lefthook.yml) into version control so the entire team uses the same automation.