원클릭으로
git-workflow-hooks
Install git hooks to prevent common workflow mistakes
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Install git hooks to prevent common workflow mistakes
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Generate semantic versioned releases with changelog and GitHub releases
Set up macOS launchd service for auto-starting Python applications
Initialize complete Python project with comprehensive documentation, development environment, and tooling. Use when creating a new Python project from scratch.
Add FastAPI server capabilities to an existing Python project with uvicorn, OpenAPI docs, and configuration management
SOC 직업 분류 기준
| name | git-workflow-hooks |
| description | Install git hooks to prevent common workflow mistakes |
| allowed-tools | Read, Write, Bash(chmod:*), Bash(test:*), Bash(cp:*), Bash(git:*) |
Install git hooks that prevent common workflow mistakes in your development process.
Installs a pre-push git hook that:
v1.2.3 without using /plinth:releaseratorgit push --no-verify if you absolutely must bypassRun this skill once per project to install the hooks:
Check that we're in a git repository with a hooks directory:
# Check for .git directory
test -d .git && echo "GIT_REPO" || echo "NOT_GIT"
# Check hooks directory
test -d .git/hooks && echo "HOOKS_EXIST" || echo "HOOKS_MISSING"
Validation:
mkdir -p .git/hooksCheck if a pre-push hook already exists:
test -f .git/hooks/pre-push && echo "EXISTS" || echo "MISSING"
If hook exists:
Example user prompt (if non-plinth hook exists):
⚠️ Existing pre-push hook detected
Your .git/hooks/pre-push file already contains a hook that wasn't installed by plinth.
How would you like to proceed?
1. Backup existing hook to .git/hooks/pre-push.backup and install plinth hook
2. Skip installation (keep existing hook)
Choose an option (1-2):
Copy the hook from the skill directory to the git hooks directory:
# Copy hook file
cp skills/git-workflow-hooks/pre-push .git/hooks/pre-push
# Make executable
chmod +x .git/hooks/pre-push
Verify installation:
# Check file exists
test -f .git/hooks/pre-push && echo "INSTALLED" || echo "FAILED"
# Check executable
test -x .git/hooks/pre-push && echo "EXECUTABLE" || echo "NOT_EXECUTABLE"
If backup was requested (from Step 2):
# Backup existing hook first
cp .git/hooks/pre-push .git/hooks/pre-push.backup
Verify the hook works by checking its output:
# Test that the hook script is valid bash
bash -n .git/hooks/pre-push && echo "VALID" || echo "SYNTAX_ERROR"
If syntax error: Report the error and suggest manual inspection.
Display installation summary to user:
✅ Git workflow hooks installed successfully!
**Installed hooks**:
- pre-push: Blocks manual version tag pushes
**What this means**:
- You cannot push version tags (v*.*.*) directly
- Use /plinth:releaserator to create releases properly
- Emergency override: git push --no-verify
**Testing the hook**:
Try pushing a version tag to see it in action:
git tag v99.99.99
git push origin v99.99.99
(This should be blocked with a helpful error message)
**Removing the hook**:
If you need to uninstall:
rm .git/hooks/pre-push
If backup was created:
Add to output:
**Backup created**:
- Your original hook saved to: .git/hooks/pre-push.backup
Triggers: When you run git push
Checks:
Action if match:
Allows:
Version tag pattern:
^v[0-9]+\.[0-9]+\.[0-9]+
Matches:
v1.0.0 ✓v1.2.3 ✓v10.20.30 ✓Does not match:
v1.0.0-alpha ✗ (pre-release allowed)v1.0.0-rc.1 ✗ (release candidate allowed)feature-v1 ✗ (not a version tag)1.0.0 ✗ (missing v prefix)This intentionally allows pre-release tags since they may have different workflows.
Error: No .git directory found
Message:
❌ Not a git repository
This skill must be run from the root of a git repository.
Run: git init
Action: Exit without making changes
Warning: Existing pre-push hook not installed by plinth
Message:
⚠️ Existing pre-push hook detected
Your .git/hooks/pre-push file contains a hook not installed by plinth.
Action: Ask user how to proceed (backup vs skip)
Error: Failed to copy or chmod hook
Message:
❌ Failed to install pre-push hook
Could not copy hook file to .git/hooks/pre-push or make it executable.
Check permissions on .git/hooks/ directory.
Action: Report failure and suggest manual inspection
Error: Hook file has bash syntax error
Message:
❌ Hook has syntax errors
The installed hook at .git/hooks/pre-push has bash syntax errors.
Please report this issue: https://github.com/pborenstein/plinth/issues
Action: Report error but don't remove hook (let user inspect)
This skill can be extended with additional hooks:
/plinth:session-wrapup<<<<<<Adding new hooks:
skills/git-workflow-hooks/After running this skill, verify:
.git/hooks/pre-push-x permission)--no-verify)