← 返回 Skills 市场
163
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install git-hooks-toolkit
功能描述
Generate, install, and manage Git hooks with pre-built templates. Includes hooks for linting staged files, enforcing conventional commits, blocking debug sta...
使用说明 (SKILL.md)
Git Hooks Toolkit
Install production-ready Git hooks in seconds with pre-built templates.
Quick Start
# List all available templates
python3 scripts/git_hooks.py list
# Install a hook
python3 scripts/git_hooks.py install pre-commit lint-staged
python3 scripts/git_hooks.py install commit-msg conventional
# Preview before installing
python3 scripts/git_hooks.py show pre-commit no-debug
# Check what's installed
python3 scripts/git_hooks.py status
# Remove a hook
python3 scripts/git_hooks.py remove pre-commit
Available Templates
pre-commit
- lint-staged — Run ESLint/Ruff/Flake8 on staged files only
- no-debug — Block console.log, debugger, pdb, breakpoint()
- large-files — Prevent files over 500KB from being committed
- format-check — Auto-run Prettier, Black, gofmt on staged files
commit-msg
- conventional — Enforce Conventional Commits (feat/fix/docs/etc.)
- ticket-ref — Require ticket reference (#123, PROJ-456)
- no-wip — Block WIP commits on main/master/release branches
pre-push
- run-tests — Auto-detect project type and run test suite
- branch-protect — Prevent direct push to main/master
post-merge
- install-deps — Auto-install deps when lockfiles change
Commands
list— Show all templatesinstall \x3Chook> \x3Ctemplate> [--repo path] [--force]— Install a hookshow \x3Chook> \x3Ctemplate>— Preview template contentstatus [--repo path]— Show installed hooksremove \x3Chook> [--repo path]— Delete a hook
安全使用建议
This package appears to do what it says: generate and install git hooks. Before installing, manually inspect the post-merge 'install-deps' template (the file was truncated in the listing) to confirm which install commands it runs. Note that hooks will run project commands (linters, tests, package managers) on your machine — auto-installing dependencies can execute package-manager postinstall scripts, which could be risky in untrusted projects. Also ensure python3 and git are available (the metadata omits required binaries). If you plan to use it on important repositories, run it in a disposable clone first or enable only specific templates you trust.
功能分析
Type: OpenClaw Skill
Name: git-hooks-toolkit
Version: 1.0.0
The git-hooks-toolkit is a legitimate utility for managing Git hooks (pre-commit, pre-push, etc.) using pre-defined templates. The core script (scripts/git_hooks.py) provides functionality to list, install, and remove hooks by writing standard shell scripts to the .git/hooks directory. The templates themselves perform common development tasks like linting (ESLint, Ruff), formatting (Prettier, Black), and running tests (npm test, pytest), with no evidence of data exfiltration, obfuscation, or malicious intent.
能力评估
Purpose & Capability
The skill name/description (git hooks generation/management) aligns with the included script and templates. However the runtime requires git and python3 (the SKILL.md shows running `python3 scripts/git_hooks.py` and the templates use git commands), yet the packaged metadata declares no required binaries — this is an omission that should be corrected.
Instruction Scope
SKILL.md tells the agent to run the bundled script to list/install/show/remove hooks, which is within scope. The hook templates themselves run linters, formatters, test suites, and (in the truncated post-merge template) auto-install dependencies; these are expected for such a tool but do allow executing arbitrary project commands and package-manager install scripts when hooks trigger. Review post-merge install-deps behavior before enabling in sensitive repos.
Install Mechanism
No install spec and no network downloads; the skill is delivered as source (script + SKILL.md). That minimizes installer risk — nothing will be fetched or written by an automated installer beyond what the script does when run by the user.
Credentials
The skill declares no required environment variables or credentials and the code does not attempt to read secrets. It does rely on local developer tools (git, npx/npm, linters, test runners) which are appropriate for its purpose.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or cross-skill privileges. It only writes hooks into a repository when explicitly invoked by the user, which is expected behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install git-hooks-toolkit - 安装完成后,直接呼叫该 Skill 的名称或使用
/git-hooks-toolkit触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of git-hooks-toolkit.
- Generate, install, and manage Git hooks using ready-made templates.
- Templates include enforcing commit conventions, linting staged files, blocking debug statements, preventing large file commits, auto-formatting, running tests pre-push, branch protections, and auto-installing dependencies after merge.
- Intuitive CLI for listing, installing, previewing, checking status, and removing hooks.
- Supports pre-commit, commit-msg, pre-push, and post-merge hook types.
元数据
常见问题
Git Hooks Toolkit 是什么?
Generate, install, and manage Git hooks with pre-built templates. Includes hooks for linting staged files, enforcing conventional commits, blocking debug sta... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 163 次。
如何安装 Git Hooks Toolkit?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-hooks-toolkit」即可一键安装,无需额外配置。
Git Hooks Toolkit 是免费的吗?
是的,Git Hooks Toolkit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Git Hooks Toolkit 支持哪些平台?
Git Hooks Toolkit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Git Hooks Toolkit?
由 John Wang(@johnnywang2001)开发并维护,当前版本 v1.0.0。
推荐 Skills