Install
openclaw skills install git-hooks-managerManage Git hooks with easy installation, configuration, and sharing, supporting lint, test, commit message, and branch name validations.
openclaw skills install git-hooks-manager| Field | Value |
|---|---|
| Name | git-hooks-manager |
| Slug | git-hooks-manager |
| Version | 1.0.0 |
| Homepage | https://github.com/openclaw/git-hooks-manager |
| Category | development |
| Tags | git, hooks, pre-commit, pre-push, lint, test, automation, devops |
A Git hooks manager that simplifies installing, configuring, and sharing Git hooks across teams. Includes pre-built templates for linting, testing, branch naming validation, commit message validation, and custom hook orchestration.
Git Hooks管理器,简化团队间Git钩子的安装、配置和共享。包含预置模板:代码检查、测试运行、分支名验证、提交信息验证和自定义钩子编排。
HOOKS_MANAGER_STRICT=true
HOOKS_MANAGER_SKIP_LINT=false
# Install all recommended hooks
python scripts/hooks_manager.py install --all
# Install specific hook
python scripts/hooks_manager.py install pre-commit
# Install from template
python scripts/hooks_manager.py install pre-commit --template lint-and-test
from git_hooks_manager import HookManager
manager = HookManager()
# Define a custom pre-commit hook
@manager.hook("pre-commit")
def my_pre_commit():
# Run custom checks
result = manager.run_command("pytest", ["tests/smoke/"])
if result.returncode != 0:
print("Smoke tests failed!")
return False
return True
manager.install()
python scripts/hooks_manager.py validate-message "feat: add user login"
install(hook_name, template=None) - Install a hookuninstall(hook_name) - Remove a hooklist_hooks() - List installed hooksvalidate_commit_message(msg) - Validate conventional commits formatvalidate_branch_name(name) - Validate branch naming conventionrun_command(cmd, args) - Run a shell command and return resultlint-and-test - Run linters and unit testsconventional-commits - Validate commit messagesbranch-guard - Enforce branch naming rulessecurity-scan - Run basic security checksci-simulation - Simulate CI pipeline locallySee examples/ directory for complete examples.
cd /root/.openclaw/workspace/skills/git-hooks-manager
python -m pytest tests/ -v
MIT License