[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BV00J52MZCFTVX3A8W42CC":3,"skill-same:01M6BV00J52MZCFTVX3A8W42CC":69},{"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":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M6BV00J52MZCFTVX3A8W42CC","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.","pkking\u002Fdotfiles","pkking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2853724?v=4","01M6BTYGKF2NYA1TM9G1XSAE7N","li chaoran","01M6BTYGQW6GANXWW15H8SPDQ2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30],"code","git","Guardrails","git guardrails claude code","push","SET","Safety","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 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},"master","0952986a94cbbf338098cd44c77bb9282287019d","dotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fpkking","https:\u002F\u002Ffosstodon.org\u002F@pkking","2026-11-14 21:58:55",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add pkking\u002Fdotfiles --skill git-guardrails-claude-code",{"tool":49,"command":50},"bunx","bunx skills add pkking\u002Fdotfiles --skill git-guardrails-claude-code",{"tool":52,"command":53},"pnpm","pnpm dlx skills add pkking\u002Fdotfiles --skill git-guardrails-claude-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code\u002FSKILL.md",true,[57,63],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"agents\u002Fopenai.yaml","REFERENCE","参考文档",112,"https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code\u002Fagents\u002Fopenai.yaml",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"scripts\u002Fexecutable_block-dangerous-git.sh","SCRIPT","脚本",507,"https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code\u002Fscripts\u002Fexecutable_block-dangerous-git.sh",[70,95,115,130,140,151],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":74,"licenseFileUrl":75,"sourceHtmlUrl":76,"categories":77,"keywords":89,"publishedAt":94},"01M6BTZYNBAF3ZW1F26AYFNP7C","frontend-design","Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Ffrontend-design\u002FSKILL.md",[78,83,86],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":87,"categoryName":88,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000032","设计师",[90,91,92,93],"frontend","design","frontend design","ui","2026-11-12 13:55:43",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":108,"publishedAt":94},"01M6BTYMZJTANQTXN0PXP0FZPE","aihot","查询 AIHOT 的中文 AI 资讯、精选、当前热点和日报。用户询问今天或最近的 AI 新闻、AI 圈动态、大模型或产品发布、OpenAI／Anthropic／Google 最新消息、AI 论文、AI 日报、AIHOT 精选、当前最热事件，或需要同步当前全部精选时使用。必须通过 aihot.news 的匿名只读 API 获取当前数据，不凭训练记忆回答新闻；不需要 API Key 或 MCP server。","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Faihot\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Faihot\u002FSKILL.md",[102,105],{"categoryNo":103,"categoryName":104,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":106,"categoryName":107,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000023","Skill与智能体开发",[97,109,110,111,112,113,114],"MCP","api","server","openai","mcp server","google",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":127,"publishedAt":31},"01M6BV2S7QC2D65HBV50KRXP9P","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[121,124],{"categoryNo":122,"categoryName":123,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者",[128,129],"writing shape","writing",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":138,"publishedAt":31},"01M6BV2QMHAVE24QQS5YRB91AN","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[136,137],{"categoryNo":122,"categoryName":123,"taxonomyType":81,"taxonomyTypeDesc":82},{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},[139,129],"writing great skills",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":148,"publishedAt":31},"01M6BV2NJCTKZ7FJX22977QKJ9","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-fragments\u002FSKILL.md",[146,147],{"categoryNo":122,"categoryName":123,"taxonomyType":81,"taxonomyTypeDesc":82},{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},[149,129,150],"writing fragments","explore",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":159,"publishedAt":31},"01M6BV2KQFWWPY0C168DF0F8G6","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[157,158],{"categoryNo":122,"categoryName":123,"taxonomyType":81,"taxonomyTypeDesc":82},{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},[129,160,161],"writing for agents","documents"]