[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EFB043GH2QPX25ZJK8PSAX":3,"skill-same:01M7EFB043GH2QPX25ZJK8PSAX":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7EFB043GH2QPX25ZJK8PSAX","complexity-anti-drift",null,"Use when ESLint flags complexity, max-depth, max-lines, max-lines-per-function, or max-params; when jscpd is over 3%; when a changed function exceeds 60 lines, cyclomatic 15, 4 params, or nest 4, or a changed file exceeds 1000 lines; or when the user asks to split a function or extract a helper.","winter6205\u002Farthurpower","winter6205","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F136674824?v=4","01M7EF9EWNYDKHX9MR3AG5QV7A","01M7EF9EXCC1CNFXQNV6PS3M8B",2,"MIT","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fcomplexity-anti-drift\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: complexity-anti-drift\ntype: discipline\ndescription: Use when ESLint flags complexity, max-depth, max-lines, max-lines-per-function, or max-params; when jscpd is over 3%; when a changed function exceeds 60 lines, cyclomatic 15, 4 params, or nest 4, or a changed file exceeds 1000 lines; or when the user asks to split a function or extract a helper.\nbucket: engineering\n---\n\n# Complexity Anti-Drift\n\nComplexity drifts by accretion: one branch, one nested `if`, one more parameter. Each addition is locally defensible and globally fatal. The fix is extraction along the **responsibility line**, not along \"where the code happens to be\". Helpers extract; comments do not.\n\nThis skill owns the extract\u002Fsplit on a complexity offender. Hard FAIL vs soft REVIEW gates live in [`references\u002Fthresholds.md`](references\u002Fthresholds.md). Measurement is `arthurpower:complexity-anti-drift-agent`.\n\n## When to use\n\nReach for this skill when the next move is to stop complexity accretion:\n\n- CI reports a complexity gate failure (ESLint `complexity` \u002F `max-depth` \u002F `max-params` \u002F `max-lines-per-function` \u002F `max-lines`, or `jscpd`)\n- A request to refactor, split a function, reduce complexity, extract a helper, or fix an ESLint complexity violation\n- A PR that \"just adds one more case\" repeatedly\n- A function, file, nesting, params, or clone report in the diff has crossed the gates in [`references\u002Fthresholds.md`](references\u002Fthresholds.md)\n\nA one-line getter or setter, a test fixture kept complex for clarity, generated or vendored code, or a declarative config \u002F type-only file is out of scope.\n\n## Procedure\n\n1. **Measure the diff.** Hand the diff range to `arthurpower:complexity-anti-drift-agent` with `subagent_type: \"arthurpower:complexity-anti-drift-agent\"`. Pass: diff scope + gates in [`references\u002Fthresholds.md`](references\u002Fthresholds.md) + evidence shape (file:line + PASS\u002FFAIL\u002FREVIEW\u002FNOTE). Prefer the agent over measuring in the current thread. 软触发：应当派，非必须派；偶发主线程自跑属可接受降级，不视为违规. Completion: a per-metric table with file:line evidence, or equivalent linter\u002F`jscpd` capture if the agent was skipped.\n\n2. **Extract along the responsibility line.** For each new offender — extract a helper, not a comment. The function stays at one abstraction level. If extraction reveals two responsibilities, split along the responsibility line, not along \"what code happens to be there\". Clone offenders: extract the shared logic into a function, not a duplicated-string collapse. Nesting offenders: early-return \u002F guard-clause, not collapsing one branch. Chained ternaries, `\u002F\u002F just this once` \u002F `\u002F\u002F temporary`, duplicate blocks, and comment-instead-of-extract: [`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md). Completion: every new hard-gate offender is extracted or split; every new soft-trigger is extracted, split, guarded, or left as explicit REVIEW.\n\n3. **Re-measure.** Re-run the agent (or the linter\u002F`jscpd`). Completion: all hard gates pass; no new unreviewed soft-trigger; `git diff --stat` shows extracted helpers of reasonable size.\n\n## Acceptance criteria\n\nA complexity pass is complete when all of the following hold:\n\n- [ ] Diff measured against [`references\u002Fthresholds.md`](references\u002Fthresholds.md) (agent table, or in-thread linter\u002F`jscpd` capture)\n- [ ] Every new hard-gate offender extracted or split along the responsibility line\n- [ ] Every new soft-trigger is extracted, or left as REVIEW — not FAIL\n- [ ] Parameter counts exclude `self`\u002F`this`\n- [ ] No chained ternary; no `\u002F\u002F just this once` \u002F `\u002F\u002F temporary` beside a complex block ([`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md))\n- [ ] Re-measure is green on hard gates (linter exit 0 on touched files)\n\n## References\n\n- Hard FAIL \u002F soft REVIEW gates and tools: [`references\u002Fthresholds.md`](references\u002Fthresholds.md)\n- Extract Function worked example (4-responsibility function → 4-line caller + single-responsibility helpers): [`references\u002Fextract-function-example.md`](references\u002Fextract-function-example.md)\n- Rationalizations, stop-and-start-over smells, verify commands: [`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md)\n","# Complexity Anti-Drift\n\nComplexity drifts by accretion: one branch, one nested `if`, one more parameter. Each addition is locally defensible and globally fatal. The fix is extraction along the **responsibility line**, not along \"where the code happens to be\". Helpers extract; comments do not.\n\nThis skill owns the extract\u002Fsplit on a complexity offender. Hard FAIL vs soft REVIEW gates live in [`references\u002Fthresholds.md`](references\u002Fthresholds.md). Measurement is `arthurpower:complexity-anti-drift-agent`.\n\n## When to use\n\nReach for this skill when the next move is to stop complexity accretion:\n\n- CI reports a complexity gate failure (ESLint `complexity` \u002F `max-depth` \u002F `max-params` \u002F `max-lines-per-function` \u002F `max-lines`, or `jscpd`)\n- A request to refactor, split a function, reduce complexity, extract a helper, or fix an ESLint complexity violation\n- A PR that \"just adds one more case\" repeatedly\n- A function, file, nesting, params, or clone report in the diff has crossed the gates in [`references\u002Fthresholds.md`](references\u002Fthresholds.md)\n\nA one-line getter or setter, a test fixture kept complex for clarity, generated or vendored code, or a declarative config \u002F type-only file is out of scope.\n\n## Procedure\n\n1. **Measure the diff.** Hand the diff range to `arthurpower:complexity-anti-drift-agent` with `subagent_type: \"arthurpower:complexity-anti-drift-agent\"`. Pass: diff scope + gates in [`references\u002Fthresholds.md`](references\u002Fthresholds.md) + evidence shape (file:line + PASS\u002FFAIL\u002FREVIEW\u002FNOTE). Prefer the agent over measuring in the current thread. 软触发：应当派，非必须派；偶发主线程自跑属可接受降级，不视为违规. Completion: a per-metric table with file:line evidence, or equivalent linter\u002F`jscpd` capture if the agent was skipped.\n\n2. **Extract along the responsibility line.** For each new offender — extract a helper, not a comment. The function stays at one abstraction level. If extraction reveals two responsibilities, split along the responsibility line, not along \"what code happens to be there\". Clone offenders: extract the shared logic into a function, not a duplicated-string collapse. Nesting offenders: early-return \u002F guard-clause, not collapsing one branch. Chained ternaries, `\u002F\u002F just this once` \u002F `\u002F\u002F temporary`, duplicate blocks, and comment-instead-of-extract: [`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md). Completion: every new hard-gate offender is extracted or split; every new soft-trigger is extracted, split, guarded, or left as explicit REVIEW.\n\n3. **Re-measure.** Re-run the agent (or the linter\u002F`jscpd`). Completion: all hard gates pass; no new unreviewed soft-trigger; `git diff --stat` shows extracted helpers of reasonable size.\n\n## Acceptance criteria\n\nA complexity pass is complete when all of the following hold:\n\n- [ ] Diff measured against [`references\u002Fthresholds.md`](references\u002Fthresholds.md) (agent table, or in-thread linter\u002F`jscpd` capture)\n- [ ] Every new hard-gate offender extracted or split along the responsibility line\n- [ ] Every new soft-trigger is extracted, or left as REVIEW — not FAIL\n- [ ] Parameter counts exclude `self`\u002F`this`\n- [ ] No chained ternary; no `\u002F\u002F just this once` \u002F `\u002F\u002F temporary` beside a complex block ([`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md))\n- [ ] Re-measure is green on hard gates (linter exit 0 on touched files)\n\n## References\n\n- Hard FAIL \u002F soft REVIEW gates and tools: [`references\u002Fthresholds.md`](references\u002Fthresholds.md)\n- Extract Function worked example (4-responsibility function → 4-line caller + single-responsibility helpers): [`references\u002Fextract-function-example.md`](references\u002Fextract-function-example.md)\n- Rationalizations, stop-and-start-over smells, verify commands: [`references\u002Fpressure-and-antipatterns.md`](references\u002Fpressure-and-antipatterns.md)\n",{"name":5,"type":23,"bucket":24,"description":7},"discipline","engineering","master","1a067ffc9024631d22ca8bf2b47ad81369f28056","arthurpower\u002Fskills\u002Fcomplexity-anti-drift",0,"https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower","https:\u002F\u002Fgithub.com\u002Fwinter6205","2026-10-28 23:46:38",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add winter6205\u002Farthurpower --skill complexity-anti-drift",{"tool":38,"command":39},"bunx","bunx skills add winter6205\u002Farthurpower --skill complexity-anti-drift",{"tool":41,"command":42},"pnpm","pnpm dlx skills add winter6205\u002Farthurpower --skill complexity-anti-drift","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fcomplexity-anti-drift\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fextract-function-example.md","REFERENCE","参考文档",3265,"https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fcomplexity-anti-drift\u002Freferences\u002Fextract-function-example.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fpressure-and-antipatterns.md",2552,"https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fcomplexity-anti-drift\u002Freferences\u002Fpressure-and-antipatterns.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fthresholds.md",1991,"https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fcomplexity-anti-drift\u002Freferences\u002Fthresholds.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EFDX3VT33HSHDA17T9N9JJ","writing-plans","Use when turning a buildable spec into ordered tracer bullets after architecture-change-reviewer. Covers vertical slicing, dependency order, and headroom for the implementer. Triggers on 写计划, 拆任务, 任务分解, 制定方案, 跨文件改动, 计划.","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EFDQV6SGJWDK634DWPFR35","wayfinder","Use when a chunk of work is more than one agent session can hold — plan it as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EFDM9Y55GKYFGY96088BYB","verification-before-completion","This skill should be used when claiming \"完成\" \u002F \"done\" \u002F \"fixed\" \u002F \"passing\" \u002F \"ready to ship\", before trusting a subagent success report, or when checking \"对照计划\" \u002F \"对照 spec\" — whether this run's delivery matches its basis.","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EFDFCY4V0JMQHSEE34A2JS","using-agent-skills","Use when starting a new session, switching tasks, or unsure which arthurpower skill applies. Routes incoming work to the matching skill via flowchart before invoking. Activates on phrases like \"which skill should I use\", \"skill check\", \"pre-task skill check\", \"how to start\", \"router\", \"skill routing\", or when multiple competing skills could apply. Does not auto-invoke user-invoked authoring skills (skill-authoring, self-evolving-rules).","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fusing-agent-skills\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7EFDB70ATNQASXP4BKDYGA6","test-driven-development","Use when implementing logic, fixing a bug, or changing behavior — write the failing test first (RED), then minimal code (GREEN), then refactor. Triggers on \"write the failing test first\", \"Prove-It\", or a bug that needs a reproduction test before the fix.","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M7EFD6NPWFG5WSXT0DF07XH1","systematic-debugging","Use when debugging a test failure, build break, unexpected runtime error, flaky test, or hanging process. Triggers on phrases like \"fix this bug\", \"getting an error\", \"failing test\", \"flaky\", \"hanging\", \"halfway through debugging\", \"this used to work\", \"intermittent failure\", \"stack trace shows X\", or any case where behavior does not match expectations. Prevents shotgun debugging.","https:\u002F\u002Fgithub.com\u002Fwinter6205\u002Farthurpower\u002Fblob\u002Fmaster\u002Farthurpower\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]