← Back to Skills Marketplace
sunshine-del-ux

Git Hooks Generator

by Sunshine-del-ux · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
453
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install git-hooks-generator
Description
生成 Git hooks 脚本,自动格式化代码、检查 lint、运行测试等。
README (SKILL.md)

Git Hooks Generator

自动生成 Git hooks,提升开发效率。

功能

  • ✅ pre-commit 格式化
  • ✅ commit-msg 规范检查
  • ✅ pre-push 测试检查
  • ✅ 多种语言支持

使用方法

git-hooks-generator init
git-hooks-generator add --hook pre-commit --type lint
Usage Guidance
This skill does not appear malicious, but it is inconsistent and incomplete. Before installing or running it: 1) Inspect git-hooks-generator.sh — it writes a .git/hooks/pre-commit that runs 'npm run lint' and 'npm test'. 2) Ensure you're in a git repository and back up any existing hooks (.git/hooks) so you don't overwrite them unintentionally. 3) Verify npm is available and review your repository's package.json scripts; those scripts will run with whatever commands they contain and could be destructive if they were malicious. 4) Note that the SKILL.md promises other hooks and a CLI ('git-hooks-generator add ...') but those are not implemented; ask the author for clarification or updated code. 5) If you want to proceed, test this in a safe or disposable repo first. If you need the additional advertised features (commit-msg, pre-push, multi-language), request an updated implementation that matches the documentation.
Capability Analysis
Type: OpenClaw Skill Name: git-hooks-generator Version: 1.0.0 The skill `git-hooks-generator` creates a Git pre-commit hook (`.git/hooks/pre-commit`) that executes `npm run lint` and `npm test`. While this aligns with the stated purpose of automating code quality checks, it introduces a vulnerability. The `npm run` commands execute arbitrary scripts defined in the project's `package.json`. If the `package.json` is compromised or contains malicious scripts, this skill would facilitate their execution without explicit sanitization or validation, leading to potential arbitrary code execution. This is a risky capability without clear malicious intent from the skill itself, classifying it as suspicious rather than malicious.
Capability Assessment
Purpose & Capability
The SKILL.md and description claim multiple hooks (pre-commit, commit-msg, pre-push) and a CLI interface (git-hooks-generator init / add), but the included git-hooks-generator.sh only creates a .git/hooks/pre-commit that runs 'npm run lint' and 'npm test'. The skill declares no required binaries, yet the script uses npm — an undeclared dependency and minor incoherence.
Instruction Scope
Instructions advertise interactive CLI usage and broader functionality, but runtime behavior is limited to creating a single pre-commit hook and making it executable. The hook runs npm scripts, which will execute whatever commands are defined in the repository's package.json (this is expected for a JS-based project but should be documented). The SKILL.md gives agent-level commands that are not provided by the bundle (no installed CLI wrapper).
Install Mechanism
No install spec; this is an instruction-only skill with a small included shell script. Nothing is downloaded or installed from external sources.
Credentials
The skill requests no environment variables or credentials (appropriate), but the hook it writes depends on 'npm' being available and on project-specific package.json scripts. The lack of a declared npm requirement is a minor mismatch but not a credential risk.
Persistence & Privilege
The skill does not request persistent platform privileges (always:false). It writes a file into the repository's .git/hooks directory (expected for a hooks generator) and does not modify other skills or system-wide configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install git-hooks-generator
  3. After installation, invoke the skill by name or use /git-hooks-generator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
git-hooks-generator 1.0.0 初始版本 - 支持自动生成 pre-commit、commit-msg、pre-push 等常用 Git hooks - 集成代码格式化、lint 规范检查、测试检查 - 支持多种语言项目 - 提供简单 CLI 初始化与配置方式
Metadata
Slug git-hooks-generator
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Git Hooks Generator?

生成 Git hooks 脚本,自动格式化代码、检查 lint、运行测试等。 It is an AI Agent Skill for Claude Code / OpenClaw, with 453 downloads so far.

How do I install Git Hooks Generator?

Run "/install git-hooks-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Git Hooks Generator free?

Yes, Git Hooks Generator is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Git Hooks Generator support?

Git Hooks Generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Git Hooks Generator?

It is built and maintained by Sunshine-del-ux (@sunshine-del-ux); the current version is v1.0.0.

💬 Comments