Use when setting up git pre-commit and pre-push hooks - provides simple shell script approach and pre-commit framework method, both calling justfile commands for DRY principle
/plugin marketplace add bryonjacob/aug/plugin install aug-dev@augThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Enforce quality checks automatically:
Hooks call justfile commands (DRY).
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
set -e
echo "Running pre-commit checks..."
just format
just lint
just typecheck
echo "✅ Pre-commit checks passed"
EOF
chmod +x .git/hooks/pre-commit
cat > .git/hooks/pre-push << 'EOF'
#!/bin/bash
set -e
echo "Running pre-push checks..."
just test
echo "✅ Pre-push checks passed"
EOF
chmod +x .git/hooks/pre-push
# Install git hooks
hooks:
@echo "Installing git hooks..."
@cat > .git/hooks/pre-commit << 'EOF'\n#!/bin/bash\nset -e\necho "Running pre-commit checks..."\njust format\njust lint\njust typecheck\necho "✅ Pre-commit checks passed"\nEOF
@chmod +x .git/hooks/pre-commit
@cat > .git/hooks/pre-push << 'EOF'\n#!/bin/bash\nset -e\necho "Running pre-push checks..."\njust test\necho "✅ Pre-push checks passed"\nEOF
@chmod +x .git/hooks/pre-push
@echo "✅ Git hooks installed"
hooks-remove:
rm -f .git/hooks/pre-commit .git/hooks/pre-push
@echo "✅ Git hooks removed"
For teams or complex setups:
.pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: format
name: Format code
entry: just format
language: system
pass_filenames: false
- id: lint
name: Lint code
entry: just lint
language: system
pass_filenames: false
- id: typecheck
name: Type check
entry: just typecheck
language: system
pass_filenames: false
- id: test
name: Run tests
entry: just test
language: system
pass_filenames: false
stages: [push]
Install:
pip install pre-commit
pre-commit install
pre-commit install --hook-type pre-push
#!/bin/bash
set -e
source .venv/bin/activate
just format
just lint
just typecheck
#!/bin/bash
set -e
if git diff --cached --name-only | grep -q "^api/"; then
cd api && just format && just lint && just typecheck
fi
if git diff --cached --name-only | grep -q "^web/"; then
cd web && just format && just lint && just typecheck
fi
set -e to exit on first errorgit commit --no-verify -m "message" # Skip pre-commit
git push --no-verify # Skip pre-push
Hook not running:
ls -la .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
head -1 .git/hooks/pre-commit # Verify shebang
Just not found:
#!/bin/bash
export PATH="$HOME/.cargo/bin:$PATH"
set -e
just format
Venv issues:
#!/bin/bash
set -e
source .venv/bin/activate
just format
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.