[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79M403QRRVPTAY6GX8A7SCP":3,"skill-same:01M79M403QRRVPTAY6GX8A7SCP":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M79M403QRRVPTAY6GX8A7SCP","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.","flotilla-org\u002Fmattpocock-skills","flotilla-org","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269690888?v=4","01M79KT6D819QER6RMJNP6D8DH","01M79KT6DVCF2BNP3K3FZBW575",0,"MIT","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fmisc\u002Fgit-guardrails-claude-code\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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 the 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 the 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","823f27d38d82c6a1da91c6c8936d6edf6b6116f7","unstaged\u002Fmisc\u002Fgit-guardrails-claude-code","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills","https:\u002F\u002Fgithub.com\u002Fflotilla-org","2026-10-15 18:56:56",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add flotilla-org\u002Fmattpocock-skills --skill git-guardrails-claude-code",{"tool":35,"command":36},"bunx","bunx skills add flotilla-org\u002Fmattpocock-skills --skill git-guardrails-claude-code",{"tool":38,"command":39},"pnpm","pnpm dlx skills add flotilla-org\u002Fmattpocock-skills --skill git-guardrails-claude-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fmisc\u002Fgit-guardrails-claude-code\u002FSKILL.md",true,[43,49],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"agents\u002Fopenai.yaml","REFERENCE","参考文档",112,"https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fmisc\u002Fgit-guardrails-claude-code\u002Fagents\u002Fopenai.yaml",{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"scripts\u002Fblock-dangerous-git.sh","SCRIPT","脚本",507,"https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fmisc\u002Fgit-guardrails-claude-code\u002Fscripts\u002Fblock-dangerous-git.sh",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M79M4R8CMX9EZ7AV3MDNSXAF","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M79M4PGXDCKARTZNRE7WPDMS","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M79M4MJZH1DMGSCVY8KX97XC","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fteach\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M79M4HFDYDDFFQYNEWBZG82J","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M79M4EFN97MENKB5V6R6Z90H","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M79M4CN79Y7YK8VBAJHFA0Y8","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002Fflotilla-org\u002Fmattpocock-skills\u002Fblob\u002Fmain\u002Funstaged\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[]]