[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JGJM54R2TEZCF9ZQT6SBXD":3,"skill-same:01M6JGJM54R2TEZCF9ZQT6SBXD":91},{"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":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6JGJM54R2TEZCF9ZQT6SBXD","tool-call-hygiene",null,"Choose between Bash and dedicated Claude Code tools (Grep\u002FGlob\u002FRead\u002FEdit) and edit files efficiently. Triggers on intent to grep\u002Ffind\u002Fcat\u002Fsed\u002Frg, multiple sequential reads, session-start context restore, codebase discovery, or multiple sequential Edits to one file.","muratovv\u002Fai-hats","muratovv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7502801?v=4","01M6JGCBN4KEJX012GPJVSH04T","Fedor Muratov","01M6JGCBSNMN7CW3RGTPPE0MN2",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"tool call hygiene","hygiene","tool","call","hooks","rg","cat","triggers","codebase discovery","restore","files","code","session","code tools","choose","context restore","Bash","guard","discovery","file","2026-11-10 10:12:30",false,"---\nname: tool-call-hygiene\ndescription: >-\n  Choose between Bash and dedicated Claude Code tools\n  (Grep\u002FGlob\u002FRead\u002FEdit) and edit files efficiently. Triggers on intent to\n  grep\u002Ffind\u002Fcat\u002Fsed\u002Frg, multiple sequential reads, session-start context\n  restore, codebase discovery, or multiple sequential Edits to one file.\nai_hats:\n  runtime_hooks:\n    PreToolUse:\n      - matcher: Bash\n        script: hooks\u002Ftool_call_hygiene_guard.sh\nlicense: MIT\n---\n\n# Tool-Call Hygiene\n\nDecide between Bash and dedicated Claude Code tools. Batch and parallelize.\n\n## When to Use\n\n- About to call Bash for anything a dedicated tool expresses — `grep`\u002F`rg`\u002F`find`\u002F`ls -R`\u002F`cat`\u002F`head`\u002F`tail`\u002F`sed`\u002F`awk` and equally `bat`\u002F`fd`\u002F`eza`\u002F`git grep`\n- Restoring context at session start (multiple Reads\u002FGreps\u002FGlobs)\n- Initial codebase exploration (>3 tool calls planned)\n- Noticing 5+ similar sequential calls\n- About to make 3+ Edits to the same existing file (consider one Write)\n\n## Conventions\n\n### Forbidden Bash anti-patterns\n\nThe test is **whether a dedicated tool expresses the operation**, not whether\nthe binary appears below. A newer or fancier spelling of a listed row (`bat`\nfor `cat`, `fd` for `find`, `eza -R` for `ls -R`, `git grep` for `grep`,\n`sed -n '10,40p'` for `head`) is the same violation.\n\n| ❌ Bash                            | ✅ Use instead                 | Why                                                   |\n| ---------------------------------- | ------------------------------ | ----------------------------------------------------- |\n| `grep -rn PATTERN path\u002F`           | **Grep** tool                  | Native, faster, no shell parse                        |\n| `rg PATTERN path\u002F`                 | **Grep** tool                  | Same — Grep wraps ripgrep                             |\n| `find . -name \"*.py\"`              | **Glob** tool                  | Glob handles patterns natively                        |\n| `ls -R dir\u002F`                       | **Glob** tool                  | Recursive listing without shell                       |\n| `cat path\u002Ffile.md` (known path)    | **Read** tool                  | Numbered output, no truncation surprises              |\n| `head -50 file` \u002F `tail -100 file` | **Read** with `offset`\u002F`limit` | Same data, paginated cleanly                          |\n| `sed -i 's\u002FA\u002FB\u002F' file`             | **Edit** tool                  | Edit checks uniqueness; prevents silent multi-replace |\n| `awk -i ...` \u002F inline rewrite      | **Edit** \u002F **Write**           | See above                                             |\n\n### When the right column is not on offer\n\nThe right column assumes the tool exists in this session. Not every session\ncarries every tool, and a tool you do not have is not a tool you are refusing\nto use — there the left column is the correct call.\n\n**Establish absence, never assume it.** It counts as absent when it is missing\nfrom your available tool set, or when calling it comes back *no such tool\navailable*. It does NOT count as absent because a search returned nothing, the\npattern got awkward, or the shell felt faster — those are reasons to fix the\nquery, not to abandon the tool.\n\n**A fallback tightens the budget.** Raw output arrives unstructured and costs\nthe context a dedicated tool would have saved, so batch what you would have\nissued singly, scope each command tighter than the tool call it replaces, and\ntreat a run of one-off shell searches as the smell **Batching and parallelism**\nbelow already names.\n\n**Bash is appropriate for:** `git`, `pytest`, build commands, multi-stage pipes that have no dedicated alternative, anything reading shell-only state (env vars, processes, exit codes).\n\n### Batching and parallelism\n\n- **Session-entry**: independent context reads → a single parallel tool block, never one-by-one.\n- **Parallel by default**: any independent calls → single batch.\n- **Combine shell checks**: merge with `&&` (e.g. `git status && git log --oneline -5`).\n- **5-call threshold**: 5+ similar sequential calls → STOP, batch or use a more targeted tool.\n- **Discovery budget**: initial codebase exploration ≤ 3–5 tool calls; broader → `Agent(Explore)`.\n\n### Edit efficiency\n\n- **New file → Write**, not a sequence of Edits — building a fresh file with incremental Edits wastes turns.\n- **3+ Edits to the same existing file → STOP**; plan all changes and **Write** it once.\n- **Edit is surgical**: targeted, isolated changes to existing files. Read → plan all edits → execute in the fewest operations.\n\nFor ❌\u002F✅ worked examples → `references\u002Fexamples.md`.\n\n## Anti-Patterns\n\n- Reaching for `rg`\u002F`grep` from Bash when Grep tool fits.\n- Sequential Reads when reads are independent — always parallel.\n- Drilling into a codebase via shell `ls`\u002F`find` instead of one `Agent(Explore)` call.\n","# Tool-Call Hygiene\n\nDecide between Bash and dedicated Claude Code tools. Batch and parallelize.\n\n## When to Use\n\n- About to call Bash for anything a dedicated tool expresses — `grep`\u002F`rg`\u002F`find`\u002F`ls -R`\u002F`cat`\u002F`head`\u002F`tail`\u002F`sed`\u002F`awk` and equally `bat`\u002F`fd`\u002F`eza`\u002F`git grep`\n- Restoring context at session start (multiple Reads\u002FGreps\u002FGlobs)\n- Initial codebase exploration (>3 tool calls planned)\n- Noticing 5+ similar sequential calls\n- About to make 3+ Edits to the same existing file (consider one Write)\n\n## Conventions\n\n### Forbidden Bash anti-patterns\n\nThe test is **whether a dedicated tool expresses the operation**, not whether\nthe binary appears below. A newer or fancier spelling of a listed row (`bat`\nfor `cat`, `fd` for `find`, `eza -R` for `ls -R`, `git grep` for `grep`,\n`sed -n '10,40p'` for `head`) is the same violation.\n\n| ❌ Bash                            | ✅ Use instead                 | Why                                                   |\n| ---------------------------------- | ------------------------------ | ----------------------------------------------------- |\n| `grep -rn PATTERN path\u002F`           | **Grep** tool                  | Native, faster, no shell parse                        |\n| `rg PATTERN path\u002F`                 | **Grep** tool                  | Same — Grep wraps ripgrep                             |\n| `find . -name \"*.py\"`              | **Glob** tool                  | Glob handles patterns natively                        |\n| `ls -R dir\u002F`                       | **Glob** tool                  | Recursive listing without shell                       |\n| `cat path\u002Ffile.md` (known path)    | **Read** tool                  | Numbered output, no truncation surprises              |\n| `head -50 file` \u002F `tail -100 file` | **Read** with `offset`\u002F`limit` | Same data, paginated cleanly                          |\n| `sed -i 's\u002FA\u002FB\u002F' file`             | **Edit** tool                  | Edit checks uniqueness; prevents silent multi-replace |\n| `awk -i ...` \u002F inline rewrite      | **Edit** \u002F **Write**           | See above                                             |\n\n### When the right column is not on offer\n\nThe right column assumes the tool exists in this session. Not every session\ncarries every tool, and a tool you do not have is not a tool you are refusing\nto use — there the left column is the correct call.\n\n**Establish absence, never assume it.** It counts as absent when it is missing\nfrom your available tool set, or when calling it comes back *no such tool\navailable*. It does NOT count as absent because a search returned nothing, the\npattern got awkward, or the shell felt faster — those are reasons to fix the\nquery, not to abandon the tool.\n\n**A fallback tightens the budget.** Raw output arrives unstructured and costs\nthe context a dedicated tool would have saved, so batch what you would have\nissued singly, scope each command tighter than the tool call it replaces, and\ntreat a run of one-off shell searches as the smell **Batching and parallelism**\nbelow already names.\n\n**Bash is appropriate for:** `git`, `pytest`, build commands, multi-stage pipes that have no dedicated alternative, anything reading shell-only state (env vars, processes, exit codes).\n\n### Batching and parallelism\n\n- **Session-entry**: independent context reads → a single parallel tool block, never one-by-one.\n- **Parallel by default**: any independent calls → single batch.\n- **Combine shell checks**: merge with `&&` (e.g. `git status && git log --oneline -5`).\n- **5-call threshold**: 5+ similar sequential calls → STOP, batch or use a more targeted tool.\n- **Discovery budget**: initial codebase exploration ≤ 3–5 tool calls; broader → `Agent(Explore)`.\n\n### Edit efficiency\n\n- **New file → Write**, not a sequence of Edits — building a fresh file with incremental Edits wastes turns.\n- **3+ Edits to the same existing file → STOP**; plan all changes and **Write** it once.\n- **Edit is surgical**: targeted, isolated changes to existing files. Read → plan all edits → execute in the fewest operations.\n\nFor ❌\u002F✅ worked examples → `references\u002Fexamples.md`.\n\n## Anti-Patterns\n\n- Reaching for `rg`\u002F`grep` from Bash when Grep tool fits.\n- Sequential Reads when reads are independent — always parallel.\n- Drilling into a codebase via shell `ls`\u002F`find` instead of one `Agent(Explore)` call.\n",{"name":5,"ai_hats":44,"license":15,"description":7},{"runtime_hooks":45},{"PreToolUse":46},[47],{"script":48,"matcher":35},"hooks\u002Ftool_call_hygiene_guard.sh","master","b4819add93efbaf4d80627118ec34680406b309b","packages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene",1,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats","https:\u002F\u002Fgithub.com\u002Fmuratovv","2026-11-05 20:59:10",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add muratovv\u002Fai-hats --skill tool-call-hygiene",{"tool":62,"command":63},"bunx","bunx skills add muratovv\u002Fai-hats --skill tool-call-hygiene",{"tool":65,"command":66},"pnpm","pnpm dlx skills add muratovv\u002Fai-hats --skill tool-call-hygiene","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002FSKILL.md",true,[70,76,79,84,87],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"hooks\u002Fbypass_journal.py","SCRIPT","脚本",35,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002Fhooks\u002Fbypass_journal.py",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":78},"hooks\u002Fbypass_journal.sh","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002Fhooks\u002Fbypass_journal.sh",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":74,"sourceHtmlUrl":83},"hooks\u002Ftest_runners.json","REFERENCE","参考文档","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002Fhooks\u002Ftest_runners.json",{"path":48,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":85,"sourceHtmlUrl":86},16125,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002Fhooks\u002Ftool_call_hygiene_guard.sh",{"path":88,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fexamples.md",801,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fcore\u002Fskills\u002Ftool-call-hygiene\u002Freferences\u002Fexamples.md",[92,118,143,166,190,204],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":39},"01M6PVFB1SM738R2SRSRSF7CY6","tool-evaluation-protocol","Time-bounded protocol for evaluating new tools, libraries, or methodologies before adoption. Use when evaluating a candidate dependency for the project, researching a methodology (e.g. ML\u002FLLM frameworks, testing approaches), or following up on a hype-driven recommendation.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Ftool-evaluation-protocol\u002FSKILL.md",[],[99,100,21,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],"protocol","Evaluation","tool evaluation protocol","testing","ml","libraries","adoption","methodology","Tools","use","dependency","up","frameworks","time","project","recommendation","for","bounded","candidate",{"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":39},"01M6PVF7HATBEX1G7N50E2QT57","systematic-debugging","4-phase bug-fix protocol (evidence, pattern, hypothesis, verify). Use when investigating any error, failure, or unexpected behavior, handling bug reports from users or monitoring, or diagnosing test failures with non-obvious causes.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[125,126,127,128,99,129,130,131,132,133,108,134,135,136,137,138,139,140,141,142],"systematic debugging","debugging","systematic","test","monitoring","hypothesis","verify","behavior","fix","evidence","bug","reports","pattern","users","error","with","bug-fix","phase",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":154,"publishedAt":39},"01M6PVF3MTQN3RPF73AN34856J","skill-template","Canonical template and validation guide for ai-hats skills. Use when creating a new skill, reviewing an existing one for structural compliance, or deciding which pattern fits a new behavior.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fskill-template\u002FSKILL.md",[149],{"categoryNo":150,"categoryName":151,"taxonomyType":152,"taxonomyTypeDesc":153},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[155,156,157,158,159,132,160,108,161,137,162,163,164,115,165],"template","skill template","validation","compliance","hats","guide","new skill","structural","canonical","which","Existing",{"skillNo":167,"name":168,"nameZh":6,"description":169,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":173,"publishedAt":39},"01M6PVF06SCV28QARM5MQPANC9","skill-optimization","Audit and refactor library components to eliminate redundancy and staleness. Use during periodic library maintenance, after adding multiple new skills or rules, when a role's token budget is too high, or after retrospectives identify component issues.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fskill-optimization\u002FSKILL.md",[172],{"categoryNo":150,"categoryName":151,"taxonomyType":152,"taxonomyTypeDesc":153},[174,175,176,177,178,179,180,181,182,183,108,184,185,186,187,188,189],"Optimization","skill optimization","components","component","issues","library","audit","refactor","Budget","Rules","periodic","maintenance","token","token budget","role","high",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":196,"publishedAt":39},"01M6PVEXM9717016T9MW82HDCT","silent-fallback-gate","PreToolUse hook — refuses an Edit or Write that adds an inert broad except. Use when a Python edit was blocked for a silent fallback.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fsilent-fallback-gate\u002FSKILL.md",[],[197,198,199,200,201,202,108,203,115],"gate","fallback","silent fallback gate","python","write","edit","hook",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":211,"publishedAt":39},"01M6PVESM49C5NT7SB7N3F76VS","retro-to-framework","Convert an observation about agent behavior — from a retrospective or from a single incident — into a framework-level change (hook, rule, skill, skill update). Use after a retrospective identifies problems that are not project-specific, after an incident where an agent misapplied a component it had read, when CLAUDE.md band-aids accumulate (more than 3 per-project rules that could be generic), or when the same problem recurs across multiple projects.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fretro-to-framework\u002FSKILL.md",[210],{"categoryNo":150,"categoryName":151,"taxonomyType":152,"taxonomyTypeDesc":153},[212,213,214,215,177,216,217,218,183,132,108,219,220,113,221,222,223,224,225,226],"framework","retro","retro to framework","change","retrospective","projects","convert","incident","across","problem","about","more","skill update","single","generic"]