[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PVB6EW7J9KVRP88CXT15KZ":3,"skill-same:01M6PVB6EW7J9KVRP88CXT15KZ":72},{"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":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":38,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6PVB6EW7J9KVRP88CXT15KZ","command-lifetime",null,"Diagnose a shell command refused or flagged for having no bound on its lifetime — an unbounded while\u002Funtil loop, an unbounded background launch, or a long-running command with no timeout.","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\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"command","command lifetime","launch","diagnose","shell","loop","long","with","timeout","for","shell command","background","2026-11-10 10:12:30",false,"---\nname: command-lifetime\ndescription: >-\n  Diagnose a shell command refused or flagged for having no bound on its\n  lifetime — an unbounded while\u002Funtil loop, an unbounded background\n  launch, or a long-running command with no timeout.\nai_hats:\n  schema_version: 1\n  type: skill\nlicense: MIT\n---\n\n# Command Lifetime\n\nNothing bounds how long a shell command launched on the agent's behalf stays\nalive. This skill carries the one guard that does.\n\n## Why the obvious bounds don't cover it\n\nTwo mechanisms look like they already solve this, and neither fires where the\nproblem is:\n\n- **The Bash tool's `timeout`** bounds the *call*, not the process. A foreground\n  command that exceeds its budget is *moved to the background*, not stopped.\n- **`bounded_proc_shutdown`** (`src\u002Fai_hats\u002Fpty_shutdown.py`) reaps the\n  provider's process group — when the **session ends**.\n\nBoth are correct. Both are absent from a long-lived session, which is the\nsession a person is sitting in front of. Field evidence: three wait-loops alive\n21 h 25 m, 83 minutes of CPU between them, found by hand in `ps`.\n\n## What the guard does\n\n| Shape                                                              | Verdict  |\n| ------------------------------------------------------------------ | -------- |\n| `while` \u002F `until` with no `timeout`, no read-until-EOF, no counter | **deny** |\n| `run_in_background: true` with no `timeout`                        | **deny** |\n| install \u002F fetch \u002F image pull with no `timeout`                     | nudge    |\n| everything else                                                    | silent   |\n\nThe split is not severity, it is whether advice has anything to appeal to. An\nunbounded loop cannot terminate on its own; a long command finishes. A deny on\nthe third row would fire on routine work, and a gate that cries wolf gets\nswitched off — worth less than the nudge it replaced.\n\n## Diagnosing a refusal\n\nThe refusal names the bounded spelling. Take it literally:\n\n```bash\n# refused — nothing stops this\nuntil grep -q done \u002Ftmp\u002Frun.log; do :; done\n\n# bounded by wall-clock; 124 tells you the bound was hit\ntimeout 300 bash -c 'until grep -q done \u002Ftmp\u002Frun.log; do sleep 5; done'\n\n# or don't write the loop — Monitor is built for waiting on a condition\n```\n\nThree shapes are allowed without a `timeout`, because each already ends:\n`while read … done \u003C file` (EOF), a loop carrying a counter (`++`, `+=`,\n`=$((`), and any `for … in \u003Clist>` (the guard never looks at those).\n\n## Deliberately long-lived processes\n\n`AI_HATS_LIFETIME_ACK=1` relaxes the refusal. It must be in the environment that\n**launched the agent** — this hook runs before the command it judges is a\nprocess, so `AI_HATS_LIFETIME_ACK=1 \u003Ccommand>` never reaches it. Taking the\nhatch is recorded in the bypass journal. It is the supervisor's to set, not the\nagent's.\n\n## Why the guard does not add the `timeout` itself\n\nIt could — `updatedInput` is a real capability here; `safety_gate.py` already\nanswers `ask` plus a rewrite in one reply. The guard refuses instead, so the\nnumber in `timeout N` is one the agent chose. A bound nobody picked produces an\nexit 124 nobody can interpret.\n\n## Anti-Patterns\n\n- Reading this skill to decide whether to write a loop — it is infrastructure;\n  the guard speaks when it needs to.\n- Adding a second nudge here for test runners — `tool-call-hygiene` already owns\n  that surface, and two nudges about one `pytest` run is how a channel gets\n  tuned out.\n- Setting `AI_HATS_LIFETIME_ACK` to get past a refusal. The hatch answers a\n  supervisor's deliberate long-lived process; the refusal usually means the\n  bound is genuinely missing.\n","# Command Lifetime\n\nNothing bounds how long a shell command launched on the agent's behalf stays\nalive. This skill carries the one guard that does.\n\n## Why the obvious bounds don't cover it\n\nTwo mechanisms look like they already solve this, and neither fires where the\nproblem is:\n\n- **The Bash tool's `timeout`** bounds the *call*, not the process. A foreground\n  command that exceeds its budget is *moved to the background*, not stopped.\n- **`bounded_proc_shutdown`** (`src\u002Fai_hats\u002Fpty_shutdown.py`) reaps the\n  provider's process group — when the **session ends**.\n\nBoth are correct. Both are absent from a long-lived session, which is the\nsession a person is sitting in front of. Field evidence: three wait-loops alive\n21 h 25 m, 83 minutes of CPU between them, found by hand in `ps`.\n\n## What the guard does\n\n| Shape                                                              | Verdict  |\n| ------------------------------------------------------------------ | -------- |\n| `while` \u002F `until` with no `timeout`, no read-until-EOF, no counter | **deny** |\n| `run_in_background: true` with no `timeout`                        | **deny** |\n| install \u002F fetch \u002F image pull with no `timeout`                     | nudge    |\n| everything else                                                    | silent   |\n\nThe split is not severity, it is whether advice has anything to appeal to. An\nunbounded loop cannot terminate on its own; a long command finishes. A deny on\nthe third row would fire on routine work, and a gate that cries wolf gets\nswitched off — worth less than the nudge it replaced.\n\n## Diagnosing a refusal\n\nThe refusal names the bounded spelling. Take it literally:\n\n```bash\n# refused — nothing stops this\nuntil grep -q done \u002Ftmp\u002Frun.log; do :; done\n\n# bounded by wall-clock; 124 tells you the bound was hit\ntimeout 300 bash -c 'until grep -q done \u002Ftmp\u002Frun.log; do sleep 5; done'\n\n# or don't write the loop — Monitor is built for waiting on a condition\n```\n\nThree shapes are allowed without a `timeout`, because each already ends:\n`while read … done \u003C file` (EOF), a loop carrying a counter (`++`, `+=`,\n`=$((`), and any `for … in \u003Clist>` (the guard never looks at those).\n\n## Deliberately long-lived processes\n\n`AI_HATS_LIFETIME_ACK=1` relaxes the refusal. It must be in the environment that\n**launched the agent** — this hook runs before the command it judges is a\nprocess, so `AI_HATS_LIFETIME_ACK=1 \u003Ccommand>` never reaches it. Taking the\nhatch is recorded in the bypass journal. It is the supervisor's to set, not the\nagent's.\n\n## Why the guard does not add the `timeout` itself\n\nIt could — `updatedInput` is a real capability here; `safety_gate.py` already\nanswers `ask` plus a rewrite in one reply. The guard refuses instead, so the\nnumber in `timeout N` is one the agent chose. A bound nobody picked produces an\nexit 124 nobody can interpret.\n\n## Anti-Patterns\n\n- Reading this skill to decide whether to write a loop — it is infrastructure;\n  the guard speaks when it needs to.\n- Adding a second nudge here for test runners — `tool-call-hygiene` already owns\n  that surface, and two nudges about one `pytest` run is how a channel gets\n  tuned out.\n- Setting `AI_HATS_LIFETIME_ACK` to get past a refusal. The hatch answers a\n  supervisor's deliberate long-lived process; the refusal usually means the\n  bound is genuinely missing.\n",{"name":5,"ai_hats":36,"license":15,"description":7},{"type":37,"schema_version":38},"skill",1,"master","f922a7f627276366873d546942d9ad899a86f71a","packages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats","https:\u002F\u002Fgithub.com\u002Fmuratovv","2026-11-05 20:59:10",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add muratovv\u002Fai-hats --skill command-lifetime",{"tool":51,"command":52},"bunx","bunx skills add muratovv\u002Fai-hats --skill command-lifetime",{"tool":54,"command":55},"pnpm","pnpm dlx skills add muratovv\u002Fai-hats --skill command-lifetime","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime\u002FSKILL.md",true,[59,65,68],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"hooks\u002Fbypass_journal.py","SCRIPT","脚本",35,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime\u002Fhooks\u002Fbypass_journal.py",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":67},"hooks\u002Fbypass_journal.sh","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime\u002Fhooks\u002Fbypass_journal.sh",{"path":69,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":70,"sourceHtmlUrl":71},"hooks\u002Fpre_bash_lifetime_guard.sh",11958,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fcommand-lifetime\u002Fhooks\u002Fpre_bash_lifetime_guard.sh",[73,99,123,146,170,184],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":31},"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",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,28,97,98],"protocol","Evaluation","tool","tool evaluation protocol","testing","ml","libraries","adoption","methodology","Tools","use","dependency","up","frameworks","time","project","recommendation","bounded","candidate",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":31},"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",[],[106,107,108,109,80,110,111,112,113,114,90,115,116,117,118,119,120,26,121,122],"systematic debugging","debugging","systematic","test","monitoring","hypothesis","verify","behavior","fix","evidence","bug","reports","pattern","users","error","bug-fix","phase",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":134,"publishedAt":31},"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",[129],{"categoryNo":130,"categoryName":131,"taxonomyType":132,"taxonomyTypeDesc":133},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[135,136,137,138,139,113,140,90,141,118,142,143,144,28,145],"template","skill template","validation","compliance","hats","guide","new skill","structural","canonical","which","Existing",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":153,"publishedAt":31},"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",[152],{"categoryNo":130,"categoryName":131,"taxonomyType":132,"taxonomyTypeDesc":133},[154,155,156,157,158,159,160,161,162,163,90,164,165,166,167,168,169],"Optimization","skill optimization","components","component","issues","library","audit","refactor","Budget","Rules","periodic","maintenance","token","token budget","role","high",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":31},"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",[],[177,178,179,180,181,182,90,183,28],"gate","fallback","silent fallback gate","python","write","edit","hook",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":191,"publishedAt":31},"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",[190],{"categoryNo":130,"categoryName":131,"taxonomyType":132,"taxonomyTypeDesc":133},[192,193,194,195,157,196,197,198,163,113,90,199,200,95,201,202,203,204,205,206],"framework","retro","retro to framework","change","retrospective","projects","convert","incident","across","problem","about","more","skill update","single","generic"]