[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PVCMVJ06WXEKWAWDVSJZ00":3,"skill-same:01M6PVCMVJ06WXEKWAWDVSJZ00":65},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":44,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6PVCMVJ06WXEKWAWDVSJZ00","predictive-accounting",null,"For shrink\u002Frefactor\u002Foptimize\u002Fcleanup tasks — present baseline + predicted delta + dependency cost BEFORE implementation, not after","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\u002Fpredictive-accounting\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000040","财务","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36],"accounting","predictive accounting","tasks","cleanup","refactor","baseline","dependency","cost","implementation","delta","optimize","present","for","2026-11-10 10:12:30",false,"---\nname: predictive-accounting\ndescription: >-\n  For shrink\u002Frefactor\u002Foptimize\u002Fcleanup tasks — present baseline +\n  predicted delta + dependency cost BEFORE implementation, not after\nlicense: MIT\nai_hats:\n  schema_version: 1\n  type: skill\n---\n\n# Predictive Accounting\n\nFor tasks in the **shrink \u002F refactor \u002F extract \u002F optimize \u002F cleanup** family —\nshow the user, **before any code changes**:\n\n1. The current baseline of the metric being improved (tokens, lines, time, allocations).\n2. The predicted delta after the proposed changes.\n3. The dependency cost: does the win materialize immediately, or only after another task lands?\n4. The rough work cost (number of files \u002F commits \u002F phases).\n\nAsk for confirmation **before** starting implementation. Do not arrive at\n1-2 commits of \"structural prep\" that, at that moment, makes the metric\n**worse** — and then surface the honest accounting post-hoc.\n\n## When to Use\n\n- Task description verbs: **shrink \u002F trim \u002F refactor \u002F extract \u002F optimize \u002F cleanup \u002F consolidate \u002F split**.\n- Task mentions a **target saving** (e.g., \"~150 lines\", \"drop ~500 tokens\") with or without precise numbers.\n- Plan touches large refactors of existing components where short-term cost is non-trivial.\n\n## Checklist\n\n### Before writing the plan\n\n1. **Measure the current baseline.** Run the actual count (tokens, lines, prompt size). Do not estimate.\n2. **Predict the delta from each proposed change.** For each change, estimate:\n   - Short-term delta (right after the commit lands).\n   - Long-term delta (after dependent tasks land, if any).\n3. **List dependencies.** If a refactor's full saving is gated on another unmerged task — name it (`HATS-XXX`) and quantify the gated portion separately.\n4. **Estimate work.** Number of files, commits, phases. Hours-of-attention if relevant.\n\n### Present accounting to the user before execute\n\nShow a table:\n\n| Change                      | Short-term delta | Long-term delta | Dependency        | Work cost |\n| --------------------------- | ---------------- | --------------- | ----------------- | --------- |\n| Inline skill X into trait Y | +1086 tokens     | -458 tokens     | needs the removal task first | 1 commit  |\n| Collapse traits A+B+C → D   | -205 tokens      | -205 tokens     | none              | 1 commit  |\n| ...                         | ...              | ...             | ...               | ...       |\n\nWait for explicit confirmation. If short-term is **negative**, the user\nshould be able to choose: \"skip\", \"do only the dependency-free wins\",\n\"proceed knowing temporary regression\".\n\n### After execute\n\n5. Re-measure. Compare to the predicted delta. If off by >20% — log in the work_log; useful for future predictive accuracy.\n\n## Worked Example\n\n**A \"shrink ~120-150 lines\" request.**\n\nThe agent (without this skill) made:\n\n- **Commit 1**: rules-pass refactor (inline skill bodies into traits).\n- **Commit 2**: traits-pass refactor (collapse adjacent traits).\n\nThen presented honest accounting:\n\n- **Short-term**: +1086 tokens (new skill bodies inlined permanently grow prompts).\n- **Long-term**: -458 tokens, **only after** the follow-up lands that removes the now-redundant skill files.\n\nUser reverted both commits, kept only the trait-collapse work which delivered a clean **-205 tokens immediately**, no dependency.\n\nThe waste: two days of design + two commits + one revert. Filed as **HYP-013**\n(\"predictive accounting prevents sunk-cost commits in shrink tasks\").\n\n## Anti-Patterns\n\n- **Starting refactor commits before measuring baseline.**\n- **\"It'll be cleaner anyway\" justification** without delta numbers.\n- **Bundling all changes into one PR** when some have no dependencies — give the user the option to take the wins-now subset.\n- **Post-hoc accounting** (\"here's what it cost\") after the user is already psychologically invested in your work.\n- **Hiding gated savings** — \"this saves X\" without \"after HATS-Y lands\".\n\n## Completion\n\nThe task passes the accounting gate when:\n\n- Baseline numbers are recorded in `plan.md` or work_log.\n- Predicted delta is presented before execute.\n- User has explicitly confirmed (proceed \u002F partial \u002F abort).\n- Post-execute delta is compared to prediction; major drift logged.\n\n## See also\n\n- `design-minimalism` — same upstream principle (don't add primitives without justification), applied at design phase.\n- `scope-guard` — implementation-stage discipline; this skill is upstream.\n- `request-supervisor` — when negative short-term delta means user-decision territory.\n","# Predictive Accounting\n\nFor tasks in the **shrink \u002F refactor \u002F extract \u002F optimize \u002F cleanup** family —\nshow the user, **before any code changes**:\n\n1. The current baseline of the metric being improved (tokens, lines, time, allocations).\n2. The predicted delta after the proposed changes.\n3. The dependency cost: does the win materialize immediately, or only after another task lands?\n4. The rough work cost (number of files \u002F commits \u002F phases).\n\nAsk for confirmation **before** starting implementation. Do not arrive at\n1-2 commits of \"structural prep\" that, at that moment, makes the metric\n**worse** — and then surface the honest accounting post-hoc.\n\n## When to Use\n\n- Task description verbs: **shrink \u002F trim \u002F refactor \u002F extract \u002F optimize \u002F cleanup \u002F consolidate \u002F split**.\n- Task mentions a **target saving** (e.g., \"~150 lines\", \"drop ~500 tokens\") with or without precise numbers.\n- Plan touches large refactors of existing components where short-term cost is non-trivial.\n\n## Checklist\n\n### Before writing the plan\n\n1. **Measure the current baseline.** Run the actual count (tokens, lines, prompt size). Do not estimate.\n2. **Predict the delta from each proposed change.** For each change, estimate:\n   - Short-term delta (right after the commit lands).\n   - Long-term delta (after dependent tasks land, if any).\n3. **List dependencies.** If a refactor's full saving is gated on another unmerged task — name it (`HATS-XXX`) and quantify the gated portion separately.\n4. **Estimate work.** Number of files, commits, phases. Hours-of-attention if relevant.\n\n### Present accounting to the user before execute\n\nShow a table:\n\n| Change                      | Short-term delta | Long-term delta | Dependency        | Work cost |\n| --------------------------- | ---------------- | --------------- | ----------------- | --------- |\n| Inline skill X into trait Y | +1086 tokens     | -458 tokens     | needs the removal task first | 1 commit  |\n| Collapse traits A+B+C → D   | -205 tokens      | -205 tokens     | none              | 1 commit  |\n| ...                         | ...              | ...             | ...               | ...       |\n\nWait for explicit confirmation. If short-term is **negative**, the user\nshould be able to choose: \"skip\", \"do only the dependency-free wins\",\n\"proceed knowing temporary regression\".\n\n### After execute\n\n5. Re-measure. Compare to the predicted delta. If off by >20% — log in the work_log; useful for future predictive accuracy.\n\n## Worked Example\n\n**A \"shrink ~120-150 lines\" request.**\n\nThe agent (without this skill) made:\n\n- **Commit 1**: rules-pass refactor (inline skill bodies into traits).\n- **Commit 2**: traits-pass refactor (collapse adjacent traits).\n\nThen presented honest accounting:\n\n- **Short-term**: +1086 tokens (new skill bodies inlined permanently grow prompts).\n- **Long-term**: -458 tokens, **only after** the follow-up lands that removes the now-redundant skill files.\n\nUser reverted both commits, kept only the trait-collapse work which delivered a clean **-205 tokens immediately**, no dependency.\n\nThe waste: two days of design + two commits + one revert. Filed as **HYP-013**\n(\"predictive accounting prevents sunk-cost commits in shrink tasks\").\n\n## Anti-Patterns\n\n- **Starting refactor commits before measuring baseline.**\n- **\"It'll be cleaner anyway\" justification** without delta numbers.\n- **Bundling all changes into one PR** when some have no dependencies — give the user the option to take the wins-now subset.\n- **Post-hoc accounting** (\"here's what it cost\") after the user is already psychologically invested in your work.\n- **Hiding gated savings** — \"this saves X\" without \"after HATS-Y lands\".\n\n## Completion\n\nThe task passes the accounting gate when:\n\n- Baseline numbers are recorded in `plan.md` or work_log.\n- Predicted delta is presented before execute.\n- User has explicitly confirmed (proceed \u002F partial \u002F abort).\n- Post-execute delta is compared to prediction; major drift logged.\n\n## See also\n\n- `design-minimalism` — same upstream principle (don't add primitives without justification), applied at design phase.\n- `scope-guard` — implementation-stage discipline; this skill is upstream.\n- `request-supervisor` — when negative short-term delta means user-decision territory.\n",{"name":5,"ai_hats":42,"license":15,"description":7},{"type":43,"schema_version":44},"skill",1,"master","f922a7f627276366873d546942d9ad899a86f71a","packages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fpredictive-accounting","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats","https:\u002F\u002Fgithub.com\u002Fmuratovv","2026-11-05 20:59:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add muratovv\u002Fai-hats --skill predictive-accounting",{"tool":57,"command":58},"bunx","bunx skills add muratovv\u002Fai-hats --skill predictive-accounting",{"tool":60,"command":61},"pnpm","pnpm dlx skills add muratovv\u002Fai-hats --skill predictive-accounting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fcore\u002Fskills\u002Fpredictive-accounting\u002FSKILL.md",true,[],[66,91,116,139,162,176],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":37},"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",[],[73,74,75,76,77,78,79,80,81,82,83,30,84,85,86,87,88,36,89,90],"protocol","Evaluation","tool","tool evaluation protocol","testing","ml","libraries","adoption","methodology","Tools","use","up","frameworks","time","project","recommendation","bounded","candidate",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":37},"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",[],[98,99,100,101,73,102,103,104,105,106,83,107,108,109,110,111,112,113,114,115],"systematic debugging","debugging","systematic","test","monitoring","hypothesis","verify","behavior","fix","evidence","bug","reports","pattern","users","error","with","bug-fix","phase",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":127,"publishedAt":37},"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",[122],{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[128,129,130,131,132,105,133,83,134,110,135,136,137,36,138],"template","skill template","validation","compliance","hats","guide","new skill","structural","canonical","which","Existing",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":146,"publishedAt":37},"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",[145],{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},[147,148,149,150,151,152,153,28,154,155,83,156,157,158,159,160,161],"Optimization","skill optimization","components","component","issues","library","audit","Budget","Rules","periodic","maintenance","token","token budget","role","high",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":37},"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",[],[169,170,171,172,173,174,83,175,36],"gate","fallback","silent fallback gate","python","write","edit","hook",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":183,"publishedAt":37},"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",[182],{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},[184,185,186,187,150,188,189,190,155,105,83,191,192,87,193,194,195,196,197,198],"framework","retro","retro to framework","change","retrospective","projects","convert","incident","across","problem","about","more","skill update","single","generic"]