技能库 / 开发工具 / git-guardrails-claude-code

git-guardrails-claude-code

# Setup Git Guardrails Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them. ## What Gets Blocked - `git push` (all variants including `--force`) - `git reset --hard` - `git clean -f` / `git clean -fd` - `git branch -D` - `git checkout .` / `git restore .` When blocked, Claude sees a message telling it that it does not have authority to access these commands. ## Steps ### 1. Ask scope Ask the user: install for **this project only** (`.claude/set

v1.0.0 ClawHub
作者 / 来源

clawhub

在来源站打开

安装方式

CLI 安装(推荐)

claw install clawhub-git-guardrails-claud-f00478

需要安装 CLAW CLI

手动下载安装

下载 ZIP 后解压到技能目录即可安装。若在桌面客户端 WebView中直接下载出现异常,本站会改为提示页 + 原始链接,请按页内说明操作。

下载 ZIP (clawhub-git-guardrails-claud-f00478-v1.0.0.zip)

触发指令

/git-guardrails

跨平台安装指引

该技能声明兼容以下 1 个平台,将 ZIP 解压到对应目录即可被识别。

支持矩阵
macOS / Linux:~/.openclaw/skills/
Windows:%USERPROFILE%\.openclaw\skills\
unzip clawhub-git-guardrails-claud-f00478-v1.0.0.zip -d ~/.openclaw/skills/
目录不存在时请先 mkdir -p 创建;启用 Skill 后请重启对应 Agent 让配置生效。

使用指南

git-guardrails-claude-code

功能介绍

Setup Git Guardrails Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them. ## What Gets Blocked - git push (all variants including --force) - git reset --hard - git clean -f / git clean -fd - git branch -D - git checkout . / git restore . When blocked, Claude sees a message telling it that it does not have authority to access these commands. ## Steps ### 1. Ask scope Ask the user: install for this project only (`.claude/set

使用方法

基本用法

# Setup Git Guardrails Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them. ## What Gets Blocked - `git push` (all variants including `--force`) - `git reset --hard` - `git clean -f` / `git clean -fd` - `git branch -D` - `git checkout .` / `git restore .` When blocked, Claude sees a message telling it that it does not have authority to access these commands. ## Steps ### 1. Ask scope Ask the user: install for **this project only** (`.claude/settings.json`)

(来源:SkillHub / ClawHub 目录;完整 SKILL.md 与 ZIP 请执行 `php artisan skills:import-skillhub --slugs=git-guardrails-claude-code` 。)

适用场景

  • 专业领域咨询
  • 角色扮演
  • 问题解决
  • 效率提升

使用建议

  • 根据实际需求调整提示词
  • 可以与其他技能组合使用
  • 建议保存常用的变体版本

来源

本技能从 git-guardrails-claude-code 导入。

许可证

请遵循原网站的许可证要求。