[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79JYF2B8TDPK5A2AHXZ5ZKC":3,"skill-same:01M79JYF2B8TDPK5A2AHXZ5ZKC":48},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79JYF2B8TDPK5A2AHXZ5ZKC","write-go-tests",null,"Use when adding or extending Go tests in strike-cli — *_test.go, table-driven cases, fixtures, httptest, tool Ask helpers, TUI harnesses, coverage gaps. Do not use for running tests only (use test-and-validate).","jonathanung\u002Fstrike","jonathanung","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F53621118?v=4","01M79JX057ZT3VSF94GXQBDAXY","Jonathan Ung","01M79JX05QHGCWABW16WQN8DHV",5,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwrite-go-tests\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: write-go-tests\ndescription: Use when adding or extending Go tests in strike-cli — *_test.go, table-driven cases, fixtures, httptest, tool Ask helpers, TUI harnesses, coverage gaps. Do not use for running tests only (use test-and-validate).\n---\n\n# Write Go tests (strike-cli)\n\nTests only. Never modify production code; if code is untestable or buggy, report it.\n\n## Conventions\n\n- Framework: stdlib `testing` only.\n- Placement: `package foo` tests beside source as `foo_test.go` (same package is fine and preferred for unexported helpers).\n- Style: table-driven where multiple inputs matter; plain functions for stateful sequences.\n- Isolation: `t.TempDir()`, `t.Setenv`, never touch real `~\u002F.strike` or network without `httptest`.\n- Assert observable behavior (return values, files written, events emitted, errors), not private call graphs.\n- **Bug fixes:** add at least one regression test that fails before the fix when feasible.\n\n## Helpers by domain\n\n### Tools (`harness\u002Ftool`)\n\n```go\nfunc allowAll(dir string) *Context {\n\treturn &Context{\n\t\tWorkDir: dir, \u002F\u002F usually t.TempDir()\n\t\tAsk:     func(ctx context.Context, req AskRequest) error { return nil },\n\t}\n}\n```\n\nCover where relevant: happy path, invalid JSON args, permission rejection via Ask error,\npath relative\u002Fabsolute, workspace sandbox escape attempts, filestate stale read after\nexternal change, truncation\u002Foutput caps, deferred\u002F`toolsearch` registration.\n\nTool surface is large (read\u002Fglob\u002Fgrep\u002Fedit\u002Fwrite\u002Fapply_patch\u002Fbash + sandbox, task*,\nwebfetch, todo*, memory_*, issue_*, notebook_edit, sleep, skill, question, plan_mode,\nphase_done, toolsearch, …). Prefer tests next to the module you touch; do not assume\na fixed “six tools” list.\n\n### Permissions (`harness\u002Fpermission`)\n\n- `Evaluate` last-match-wins across layered rulesets.\n- `Service.Ask` + `Reply`: once, always (session grant + sibling resolve), reject cascade, ctx cancel.\n\n### Protocol \u002F session\n\n- Round-trip event types through `protocol.Wrap` → `Envelope.Decode` when adding kinds.\n- Session: `Open` → `Append` → `Close` → `Replay`; malformed line errors.\n\n### Providers\n\n- Prefer `httptest.NewServer` against `harness\u002Fproviders\u002Fbase` and concrete adapters.\n- Engine integration: `harness\u002Fprovider\u002Fecho` (prompts starting with `run ` emit bash tool calls).\n\n### Config \u002F auth\n\n- Point HOME at `t.TempDir()` so GlobalPath\u002Fcache paths stay sandboxed.\n- Auth store must stay mode `0600`.\n\n### TUI\n\nSource lives under `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002F` and is flattened into `internal\u002Ffrontend\u002Ftui\u002Fapp` via\n`go generate .\u002Finternal\u002Ffrontend\u002Ftui\u002Fapp`. Tests may live beside `_src` or as generated\u002Fpackage\ntests under `internal\u002Ffrontend\u002Ftui\u002Fapp`.\n\nReuse helpers from `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002Fapp\u002Fapp_test.go` (same package after generate),\nincluding: `updateApp`, `runAppCmd`, `runAllAppCmds`, `receiveAppOp`, `assertNoAppOp`.\nShared support also appears under `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002Ftest\u002F` (e.g. `testsupport_test.go`).\nLoad skill `tui-components` before asserting chrome\u002Ftheme behavior.\n\n## After writing\n\n```sh\ngo test .\u002Fpath\u002Fto\u002Fpackage\u002F -count=1 -v\n# then tier gate — load test-and-validate\n```\n\n## Priority gaps (fill these first when expanding coverage)\n\n1. `harness\u002Ftool` — sandbox\u002Fworkspace, filestate freshness, caps, defer\u002Ftoolsearch  \n2. `harness\u002Fengine` — prune\u002Fcompaction, interrupt, deferred tool re-promote, multi-tool  \n3. `harness\u002Fpermission` — Evaluate + Service edge cases  \n4. `internal\u002Fprotocol` + `internal\u002Fpersist\u002Fsession` — new event kinds, replay  \n5. `internal\u002Fquestion` — multi-question ask\u002Freply  \n6. `internal\u002Fproduct\u002Fauth` — OAuth\u002FPKCE\u002Fdevice, resolve edge cases  \n7. `harness\u002Fproviders\u002F*` — SSE cancel, cache headers where applicable  \n8. `internal\u002Ffrontend\u002Ftui` — keymap\u002Fdefault binds, modals, interrupt\u002Fesc paths  \n\n## Platform notes\n\n- Compare canonical paths with `filepath.EvalSymlinks` when asserting absolute paths\n  (macOS `\u002Fvar` → `\u002Fprivate\u002Fvar`).\n- Filesystem mtime granularity: sleep or content-change strategies when testing staleness.\n","# Write Go tests (strike-cli)\n\nTests only. Never modify production code; if code is untestable or buggy, report it.\n\n## Conventions\n\n- Framework: stdlib `testing` only.\n- Placement: `package foo` tests beside source as `foo_test.go` (same package is fine and preferred for unexported helpers).\n- Style: table-driven where multiple inputs matter; plain functions for stateful sequences.\n- Isolation: `t.TempDir()`, `t.Setenv`, never touch real `~\u002F.strike` or network without `httptest`.\n- Assert observable behavior (return values, files written, events emitted, errors), not private call graphs.\n- **Bug fixes:** add at least one regression test that fails before the fix when feasible.\n\n## Helpers by domain\n\n### Tools (`harness\u002Ftool`)\n\n```go\nfunc allowAll(dir string) *Context {\n\treturn &Context{\n\t\tWorkDir: dir, \u002F\u002F usually t.TempDir()\n\t\tAsk:     func(ctx context.Context, req AskRequest) error { return nil },\n\t}\n}\n```\n\nCover where relevant: happy path, invalid JSON args, permission rejection via Ask error,\npath relative\u002Fabsolute, workspace sandbox escape attempts, filestate stale read after\nexternal change, truncation\u002Foutput caps, deferred\u002F`toolsearch` registration.\n\nTool surface is large (read\u002Fglob\u002Fgrep\u002Fedit\u002Fwrite\u002Fapply_patch\u002Fbash + sandbox, task*,\nwebfetch, todo*, memory_*, issue_*, notebook_edit, sleep, skill, question, plan_mode,\nphase_done, toolsearch, …). Prefer tests next to the module you touch; do not assume\na fixed “six tools” list.\n\n### Permissions (`harness\u002Fpermission`)\n\n- `Evaluate` last-match-wins across layered rulesets.\n- `Service.Ask` + `Reply`: once, always (session grant + sibling resolve), reject cascade, ctx cancel.\n\n### Protocol \u002F session\n\n- Round-trip event types through `protocol.Wrap` → `Envelope.Decode` when adding kinds.\n- Session: `Open` → `Append` → `Close` → `Replay`; malformed line errors.\n\n### Providers\n\n- Prefer `httptest.NewServer` against `harness\u002Fproviders\u002Fbase` and concrete adapters.\n- Engine integration: `harness\u002Fprovider\u002Fecho` (prompts starting with `run ` emit bash tool calls).\n\n### Config \u002F auth\n\n- Point HOME at `t.TempDir()` so GlobalPath\u002Fcache paths stay sandboxed.\n- Auth store must stay mode `0600`.\n\n### TUI\n\nSource lives under `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002F` and is flattened into `internal\u002Ffrontend\u002Ftui\u002Fapp` via\n`go generate .\u002Finternal\u002Ffrontend\u002Ftui\u002Fapp`. Tests may live beside `_src` or as generated\u002Fpackage\ntests under `internal\u002Ffrontend\u002Ftui\u002Fapp`.\n\nReuse helpers from `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002Fapp\u002Fapp_test.go` (same package after generate),\nincluding: `updateApp`, `runAppCmd`, `runAllAppCmds`, `receiveAppOp`, `assertNoAppOp`.\nShared support also appears under `internal\u002Ffrontend\u002Ftui\u002Fapp\u002F_src\u002Ftest\u002F` (e.g. `testsupport_test.go`).\nLoad skill `tui-components` before asserting chrome\u002Ftheme behavior.\n\n## After writing\n\n```sh\ngo test .\u002Fpath\u002Fto\u002Fpackage\u002F -count=1 -v\n# then tier gate — load test-and-validate\n```\n\n## Priority gaps (fill these first when expanding coverage)\n\n1. `harness\u002Ftool` — sandbox\u002Fworkspace, filestate freshness, caps, defer\u002Ftoolsearch  \n2. `harness\u002Fengine` — prune\u002Fcompaction, interrupt, deferred tool re-promote, multi-tool  \n3. `harness\u002Fpermission` — Evaluate + Service edge cases  \n4. `internal\u002Fprotocol` + `internal\u002Fpersist\u002Fsession` — new event kinds, replay  \n5. `internal\u002Fquestion` — multi-question ask\u002Freply  \n6. `internal\u002Fproduct\u002Fauth` — OAuth\u002FPKCE\u002Fdevice, resolve edge cases  \n7. `harness\u002Fproviders\u002F*` — SSE cancel, cache headers where applicable  \n8. `internal\u002Ffrontend\u002Ftui` — keymap\u002Fdefault binds, modals, interrupt\u002Fesc paths  \n\n## Platform notes\n\n- Compare canonical paths with `filepath.EvalSymlinks` when asserting absolute paths\n  (macOS `\u002Fvar` → `\u002Fprivate\u002Fvar`).\n- Filesystem mtime granularity: sleep or content-change strategies when testing staleness.\n",{"name":5,"description":7},"main","33cd31acc8c3b15e8bdead40f26a5957a6f4210f",".claude\u002Fskills\u002Fwrite-go-tests",2,"https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike","https:\u002F\u002Fstrike.jonathanung.ca\u002F","https:\u002F\u002Fgithub.com\u002Fjonathanung","https:\u002F\u002Fjonathanung.ca","for fun programmer larping as a student","2026-11-14 19:25:31",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add jonathanung\u002Fstrike --skill write-go-tests",{"tool":40,"command":41},"bunx","bunx skills add jonathanung\u002Fstrike --skill write-go-tests",{"tool":43,"command":44},"pnpm","pnpm dlx skills add jonathanung\u002Fstrike --skill write-go-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwrite-go-tests\u002FSKILL.md",true,[],[49,56,63,70,77,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M79JZ3BTYJTXTH62TTMQTRSY","keep","Kept despite unknown fields","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Funknown-fields\u002Fskills\u002Fkeep\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79JYZBHM1ETESYN0P255ZQN","ok","Immediate skill","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Fskills-layout\u002Fskills\u002Fok\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79JYYFSHFEQJF8VNZ6CWAJ7","deep","Must not be discovered","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Fskills-layout\u002Fskills\u002Fnested\u002Fdeep\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79JYXN8XTSQ8P4E2EWAGE54","summarize","Summarize text","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Fportable-ok\u002Fskills\u002Fsummarize\u002FSKILL.md",[],[],{"skillNo":78,"name":51,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79JYWT8JKCZ6B255CTWVHTX","Survives MCP disable","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Fmcp-schema-mismatch\u002Fskills\u002Fkeep\u002FSKILL.md",[],[],{"skillNo":84,"name":51,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M79JYTNMJS2GSKCQ9BWYWBKQ","Survives invalid mcp.json kind","https:\u002F\u002Fgithub.com\u002Fjonathanung\u002Fstrike\u002Fblob\u002Fmain\u002Finternal\u002Fintegrate\u002Fplugin\u002Ftestdata\u002Faps\u002Fmcp-not-file\u002Fskills\u002Fkeep\u002FSKILL.md",[],[]]