[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BV00J52MZCFTVX3A8W42CC":3,"skill-same:01M6BV00J52MZCFTVX3A8W42CC":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":15,"repositoryHtmlUrl":46,"repositoryHomepageUrl":17,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":17,"updatedAt":49,"install":50,"resources":63},"01M6BV00J52MZCFTVX3A8W42CC","git-guardrails-claude-code","Claude Code Git 安全钩子配置","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.","设置 Claude Code hooks，在危险 git 命令（push、reset --hard、clean、branch -D 等）执行前将其拦截。当用户想要防止破坏性的 git 操作、添加 git 安全钩子，或在 Claude Code 中阻止 git push\u002Freset 时使用。","pkking\u002Fdotfiles","pkking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2853724?v=4","01M6BTYGKF2NYA1TM9G1XSAE7N","li chaoran","01M6BTYGQW6GANXWW15H8SPDQ2",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fgit-guardrails-claude-code\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37],"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":9,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add pkking\u002Fdotfiles --skill git-guardrails-claude-code",{"tool":56,"command":57},"bunx","bunx skills add pkking\u002Fdotfiles --skill git-guardrails-claude-code",{"tool":59,"command":60},"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,[64,70],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"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":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"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",[77,99,120,137,153,166],{"skillNo":78,"name":79,"nameZh":80,"description":81,"descriptionZh":82,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":83,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":93,"publishedAt":98},"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.","在构建新 UI 或重塑现有 UI 时，提供有特色、有意为之的视觉设计指导。帮助把握美学方向、排版，并做出不显得千篇一律的模板化选择。","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",[87,90],{"categoryNo":88,"categoryName":89,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":91,"categoryName":92,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[94,95,96,97],"frontend","design","frontend design","ui","2026-11-12 13:55:43",{"skillNo":100,"name":101,"nameZh":102,"description":103,"descriptionZh":103,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":113,"publishedAt":98},"01M6BTYMZJTANQTXN0PXP0FZPE","aihot","AIHOT AI 资讯查询","查询 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",[107,110],{"categoryNo":108,"categoryName":109,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9YENBBTPQMH1CHGQPFWJQ","工具调用与实时数据查询",[101,114,115,116,117,118,119],"MCP","api","server","openai","mcp server","google",{"skillNo":121,"name":122,"nameZh":123,"description":124,"descriptionZh":125,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":134,"publishedAt":38},"01M6BV2S7QC2D65HBV50KRXP9P","writing-shape","文章段落塑形","Writing, exploit: shape raw material into an article, paragraph by paragraph.","写作，深入挖掘（exploit）：把原始素材塑造成一篇文章，逐段推进。","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者",{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CA3WT74BY17JY9YCJY42FJ","创意写作与内容编排",[135,136],"writing shape","writing",{"skillNo":138,"name":139,"nameZh":140,"description":141,"descriptionZh":142,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":143,"categories":144,"keywords":151,"publishedAt":38},"01M6BV2QMHAVE24QQS5YRB91AN","writing-great-skills","Skill 编写规范参考","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","编写和编辑 skills 的参考指南——介绍让技能变得可预测的语言与原则。","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[145,148],{"categoryNo":146,"categoryName":147,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":149,"categoryName":150,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[152,136],"writing great skills",{"skillNo":154,"name":155,"nameZh":156,"description":157,"descriptionZh":158,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":159,"categories":160,"keywords":163,"publishedAt":38},"01M6BV2NJCTKZ7FJX22977QKJ9","writing-fragments","写作素材片段挖掘","Writing, explore: mine raw fragments, no structure yet.","写作，探索（explore）：挖掘原始片段，暂不组织结构。","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-fragments\u002FSKILL.md",[161,162],{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},[164,136,165],"writing fragments","explore",{"skillNo":167,"name":168,"nameZh":169,"description":170,"descriptionZh":171,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":172,"categories":173,"keywords":178,"publishedAt":38},"01M6BV2KQFWWPY0C168DF0F8G6","writing-for-agents","智能体文档编写","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","为智能体（agent）编写文档。在创建或编辑 skills，或修改 AGENTS.md 或 CLAUDE.md 时使用。","https:\u002F\u002Fgithub.com\u002Fpkking\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_config\u002Fskillshare\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[174,175],{"categoryNo":149,"categoryName":150,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":176,"categoryName":177,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[136,179,180],"writing for agents","documents"]