[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PFV39DV84487AGF8440N6F":3,"skill-same:01M6PFV39DV84487AGF8440N6F":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6PFV39DV84487AGF8440N6F","git-guardrails-claude-code",null,"Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push\u002Freset in Claude Code.","refo\u002Fclaude-dev-helpers","refo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1114116?v=4","01M6PFRE5P2JXK3P8VYTERWA33","Refik ÖNAL","01M6PFRE9XZS4SGHG2NQGJ9AB3",2,"MIT","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fmisc\u002Fgit-guardrails-claude-code\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"git","code","Guardrails","git guardrails claude code","block","git operations","reset","commands","clean","hooks","up","use","operations","claude code hooks","execute","branch","git push","Safety","SET","push","2026-11-10 10:12:30",false,"---\nname: git-guardrails-claude-code\ndescription: Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push\u002Freset in Claude Code.\n---\n\n# Setup Git Guardrails\n\nSets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.\n\n## What Gets Blocked\n\n- `git push` (all variants including `--force`)\n- `git reset --hard`\n- `git clean -f` \u002F `git clean -fd`\n- `git branch -D`\n- `git checkout .` \u002F `git restore .`\n\nWhen blocked, Claude sees a message telling it that it does not have authority to access these commands.\n\n## Steps\n\n### 1. Ask scope\n\nAsk the user: install for **this project only** (`.claude\u002Fsettings.json`) or **all projects** (`~\u002F.claude\u002Fsettings.json`)?\n\n### 2. Copy the hook script\n\nThe bundled script is at: [scripts\u002Fblock-dangerous-git.sh](scripts\u002Fblock-dangerous-git.sh)\n\nCopy it to the target location based on scope:\n\n- **Project**: `.claude\u002Fhooks\u002Fblock-dangerous-git.sh`\n- **Global**: `~\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh`\n\nMake it executable with `chmod +x`.\n\n### 3. Add hook to settings\n\nAdd to the appropriate settings file:\n\n**Project** (`.claude\u002Fsettings.json`):\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"\\\"$CLAUDE_PROJECT_DIR\\\"\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n**Global** (`~\u002F.claude\u002Fsettings.json`):\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"~\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nIf the settings file already exists, merge the hook into existing `hooks.PreToolUse` array — don't overwrite other settings.\n\n### 4. Ask about customization\n\nAsk if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.\n\n### 5. Verify\n\nRun a quick test:\n\n```bash\necho '{\"tool_input\":{\"command\":\"git push origin main\"}}' | \u003Cpath-to-script>\n```\n\nShould exit with code 2 and print a BLOCKED message to stderr.\n","# Setup Git Guardrails\n\nSets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.\n\n## What Gets Blocked\n\n- `git push` (all variants including `--force`)\n- `git reset --hard`\n- `git clean -f` \u002F `git clean -fd`\n- `git branch -D`\n- `git checkout .` \u002F `git restore .`\n\nWhen blocked, Claude sees a message telling it that it does not have authority to access these commands.\n\n## Steps\n\n### 1. Ask scope\n\nAsk the user: install for **this project only** (`.claude\u002Fsettings.json`) or **all projects** (`~\u002F.claude\u002Fsettings.json`)?\n\n### 2. Copy the hook script\n\nThe bundled script is at: [scripts\u002Fblock-dangerous-git.sh](scripts\u002Fblock-dangerous-git.sh)\n\nCopy it to the target location based on scope:\n\n- **Project**: `.claude\u002Fhooks\u002Fblock-dangerous-git.sh`\n- **Global**: `~\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh`\n\nMake it executable with `chmod +x`.\n\n### 3. Add hook to settings\n\nAdd to the appropriate settings file:\n\n**Project** (`.claude\u002Fsettings.json`):\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"\\\"$CLAUDE_PROJECT_DIR\\\"\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n**Global** (`~\u002F.claude\u002Fsettings.json`):\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"~\u002F.claude\u002Fhooks\u002Fblock-dangerous-git.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nIf the settings file already exists, merge the hook into existing `hooks.PreToolUse` array — don't overwrite other settings.\n\n### 4. Ask about customization\n\nAsk if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.\n\n### 5. Verify\n\nRun a quick test:\n\n```bash\necho '{\"tool_input\":{\"command\":\"git push origin main\"}}' | \u003Cpath-to-script>\n```\n\nShould exit with code 2 and print a BLOCKED message to stderr.\n",{"name":5,"description":7},"main","488e6998e820e577029147aceabcbc69961c43df","plugins\u002Fmp\u002Fskills\u002Fskills\u002Fmisc\u002Fgit-guardrails-claude-code",0,"https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers","https:\u002F\u002Fgithub.com\u002Frefo","2026-07-02 04:43:45",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add refo\u002Fclaude-dev-helpers --skill git-guardrails-claude-code",{"tool":62,"command":63},"bunx","bunx skills add refo\u002Fclaude-dev-helpers --skill git-guardrails-claude-code",{"tool":65,"command":66},"pnpm","pnpm dlx skills add refo\u002Fclaude-dev-helpers --skill git-guardrails-claude-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fmisc\u002Fgit-guardrails-claude-code\u002FSKILL.md",true,[70],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fblock-dangerous-git.sh","SCRIPT","脚本",507,"https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fmisc\u002Fgit-guardrails-claude-code\u002Fscripts\u002Fblock-dangerous-git.sh",[77,101,118,131,147,157],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":91,"publishedAt":44},"01M6PFW0KDMWH5HGR1GA8K39ZN","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fproductivity\u002Fwriting-great-skills\u002FSKILL.md",[83,88],{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":89,"categoryName":90,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者",[92,93,94,95,96,97,98,99,100],"writing great skills","writing","editing","reference","vocabulary","make","principles","true","for",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":110,"publishedAt":44},"01M6PFVXQ3PVRQ9035VZE9RBBX","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000039","教师与教育",[103,111,112,113,114,115,116,99,117],"new skill","learn","workspace","user","about","you","concept",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":44},"01M6PFVVJB7E7297GXB809B4J4","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[120,125,126,127,128,99,100,34,129,130],"document","conversation","compact","next","session","pick",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":44},"01M6PFVS5DF6SM2251R15HR9A9","grilling","Interview the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[133,138,139,140,141,142,114,143,35,144,145,146,115],"trigger","design","test","plan","before building","interview","grill","stress-test","stress",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":44},"01M6PFVQE56YMR6MXKTYWA2467","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[154,144,155,143,139,141,156,99],"me","grill me","sharpen",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":44},"01M6PFVMPQ6PWHRFRW5YYZ4VZF","obsidian-vault","Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.","https:\u002F\u002Fgithub.com\u002Frefo\u002Fclaude-dev-helpers\u002Fblob\u002Fmain\u002Fplugins\u002Fmp\u002Fskills\u002Fskills\u002Fpersonal\u002Fobsidian-vault\u002FSKILL.md",[],[164,165,166,167,168,169,170,171,114,35,172,173,174],"obsidian vault","vault","obsidian","notes","create","index","search","find","manage","organize","with"]