[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DNCBYSD6FPAPWM6PPSJR96":3,"skill-same:01M7DNCBYSD6FPAPWM6PPSJR96":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"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":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7DNCBYSD6FPAPWM6PPSJR96","go-testing",null,"Write and review Go unit, contract, transport, race, fuzz, and deterministic concurrency tests. Use for new behavior, bug fixes, flaky tests, and public API parity evidence.","Cratis\u002FFundamentals.Go","Cratis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16456213?v=4","01M6BXRH290K4C8RS4PTKK3HXQ","01M7DN6YCMASAFGKYBBH3C1Z6E",0,"MIT","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fgo-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-testing\ndescription: Write and review Go unit, contract, transport, race, fuzz, and deterministic concurrency tests. Use for new behavior, bug fixes, flaky tests, and public API parity evidence.\n---\n\n# Go testing\n\nRead `Documentation\u002Fproject-context.md` and `.cratis\u002Fai\u002Frules\u002Fgo.md` first.\nUse standard `testing`, not translated C# BDD infrastructure or coverage quotas.\n\n## Workflow\n\n1. Derive success, failure, boundary, cancellation, and cleanup cases from the\n   contract. For a port, identify C# source\u002Ftests and stable cross-language data.\n2. Choose small fakes at consumer boundaries and real implementations where\n   affordable. Keep external-package tests for public workflows.\n3. Use named table subtests when assertions are shared; otherwise split tests.\n   Use `t.Helper`, `t.Cleanup`, and `t.TempDir`; isolate mutable state before\n   `t.Parallel`. Use `T.Context` only at Go 1.24+ and heed cleanup ordering.\n4. Compare errors with `errors.Is`\u002F`As`, domain values semantically, protobufs\n   with `proto.Equal` or protobuf-aware diffs, and wire output with contract\n   fixtures. Do not rely on unstable map iteration or incidental error strings.\n5. Use `httptest` for HTTP and `bufconn` for actual gRPC serialization\u002Fstatus\n   tests. Add real networking\u002FTLS coverage for guarantees those cannot prove.\n6. Synchronize concurrent tests explicitly. At Go 1.25+, use `testing\u002Fsynctest`\n   for fake-time in-memory work; real network I\u002FO is not durably blocked fake time.\n   Test early consumer exit, canceled blocked operations, joins, and ownership.\n7. Fuzz deterministic decoders with seed corpora, preserving discovered failures.\n   Bound runs, for example `go test .\u002Fpath -fuzz=FuzzDecode -fuzztime=15s`.\n   Run one fuzz target\u002Fpackage at a time; ordinary tests still run fuzz seeds.\n8. Run focused tests while iterating, then the repository's gates including\n   `go test -race .\u002F...`. Benchmarks require a question; `B.Loop` needs Go 1.24+.\n\n## Small example: semantic table tests\n\nThis standard-library example demonstrates naming and error identity, rather\nthan claiming a Cratis parser API exists.\n\n```go\npackage parsing_test\n\nimport (\n\t\"errors\"\n\t\"strconv\"\n\t\"testing\"\n)\n\nfunc TestParseInt(t *testing.T) {\n\tcases := []struct {\n\t\tname  string\n\t\tinput string\n\t\twant  int64\n\t\terr   error\n\t}{\n\t\t{name: \"valid\", input: \"42\", want: 42},\n\t\t{name: \"invalid\", input: \"no\", err: strconv.ErrSyntax},\n\t}\n\tfor _, tc := range cases {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\tgot, err := strconv.ParseInt(tc.input, 10, 64)\n\t\t\tif !errors.Is(err, tc.err) {\n\t\t\t\tt.Fatalf(\"error = %v, want %v\", err, tc.err)\n\t\t\t}\n\t\t\tif err == nil && got != tc.want {\n\t\t\t\tt.Errorf(\"value = %d, want %d\", got, tc.want)\n\t\t\t}\n\t\t})\n\t}\n}\n```\n\nDo not add guessed sleeps to make a flaky test pass. Also, an empty table or a\nfixture reader that finds no files can pass vacuously: assert required case data.\n\n## Verification boundary\n\nName checks actually executed and any required check that was unavailable.\nA race pass only covers executed paths. A compile pass is not wire parity.\nDo not promote parity status without a test that detects the claimed regression.\n\n## References\n\n- [Test comments](https:\u002F\u002Fgo.dev\u002Fwiki\u002FTestComments)\n- [Subtests](https:\u002F\u002Fgo.dev\u002Fblog\u002Fsubtests)\n- [Fuzzing](https:\u002F\u002Fgo.dev\u002Fdoc\u002Fsecurity\u002Ffuzz\u002F)\n- [synctest](https:\u002F\u002Fpkg.go.dev\u002Ftesting\u002Fsynctest)\n- [httptest](https:\u002F\u002Fpkg.go.dev\u002Fnet\u002Fhttp\u002Fhttptest)\n- [bufconn](https:\u002F\u002Fpkg.go.dev\u002Fgoogle.golang.org\u002Fgrpc\u002Ftest\u002Fbufconn)\n\nOriginal workflow and example informed by Go project documentation.\n","# Go testing\n\nRead `Documentation\u002Fproject-context.md` and `.cratis\u002Fai\u002Frules\u002Fgo.md` first.\nUse standard `testing`, not translated C# BDD infrastructure or coverage quotas.\n\n## Workflow\n\n1. Derive success, failure, boundary, cancellation, and cleanup cases from the\n   contract. For a port, identify C# source\u002Ftests and stable cross-language data.\n2. Choose small fakes at consumer boundaries and real implementations where\n   affordable. Keep external-package tests for public workflows.\n3. Use named table subtests when assertions are shared; otherwise split tests.\n   Use `t.Helper`, `t.Cleanup`, and `t.TempDir`; isolate mutable state before\n   `t.Parallel`. Use `T.Context` only at Go 1.24+ and heed cleanup ordering.\n4. Compare errors with `errors.Is`\u002F`As`, domain values semantically, protobufs\n   with `proto.Equal` or protobuf-aware diffs, and wire output with contract\n   fixtures. Do not rely on unstable map iteration or incidental error strings.\n5. Use `httptest` for HTTP and `bufconn` for actual gRPC serialization\u002Fstatus\n   tests. Add real networking\u002FTLS coverage for guarantees those cannot prove.\n6. Synchronize concurrent tests explicitly. At Go 1.25+, use `testing\u002Fsynctest`\n   for fake-time in-memory work; real network I\u002FO is not durably blocked fake time.\n   Test early consumer exit, canceled blocked operations, joins, and ownership.\n7. Fuzz deterministic decoders with seed corpora, preserving discovered failures.\n   Bound runs, for example `go test .\u002Fpath -fuzz=FuzzDecode -fuzztime=15s`.\n   Run one fuzz target\u002Fpackage at a time; ordinary tests still run fuzz seeds.\n8. Run focused tests while iterating, then the repository's gates including\n   `go test -race .\u002F...`. Benchmarks require a question; `B.Loop` needs Go 1.24+.\n\n## Small example: semantic table tests\n\nThis standard-library example demonstrates naming and error identity, rather\nthan claiming a Cratis parser API exists.\n\n```go\npackage parsing_test\n\nimport (\n\t\"errors\"\n\t\"strconv\"\n\t\"testing\"\n)\n\nfunc TestParseInt(t *testing.T) {\n\tcases := []struct {\n\t\tname  string\n\t\tinput string\n\t\twant  int64\n\t\terr   error\n\t}{\n\t\t{name: \"valid\", input: \"42\", want: 42},\n\t\t{name: \"invalid\", input: \"no\", err: strconv.ErrSyntax},\n\t}\n\tfor _, tc := range cases {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\tgot, err := strconv.ParseInt(tc.input, 10, 64)\n\t\t\tif !errors.Is(err, tc.err) {\n\t\t\t\tt.Fatalf(\"error = %v, want %v\", err, tc.err)\n\t\t\t}\n\t\t\tif err == nil && got != tc.want {\n\t\t\t\tt.Errorf(\"value = %d, want %d\", got, tc.want)\n\t\t\t}\n\t\t})\n\t}\n}\n```\n\nDo not add guessed sleeps to make a flaky test pass. Also, an empty table or a\nfixture reader that finds no files can pass vacuously: assert required case data.\n\n## Verification boundary\n\nName checks actually executed and any required check that was unavailable.\nA race pass only covers executed paths. A compile pass is not wire parity.\nDo not promote parity status without a test that detects the claimed regression.\n\n## References\n\n- [Test comments](https:\u002F\u002Fgo.dev\u002Fwiki\u002FTestComments)\n- [Subtests](https:\u002F\u002Fgo.dev\u002Fblog\u002Fsubtests)\n- [Fuzzing](https:\u002F\u002Fgo.dev\u002Fdoc\u002Fsecurity\u002Ffuzz\u002F)\n- [synctest](https:\u002F\u002Fpkg.go.dev\u002Ftesting\u002Fsynctest)\n- [httptest](https:\u002F\u002Fpkg.go.dev\u002Fnet\u002Fhttp\u002Fhttptest)\n- [bufconn](https:\u002F\u002Fpkg.go.dev\u002Fgoogle.golang.org\u002Fgrpc\u002Ftest\u002Fbufconn)\n\nOriginal workflow and example informed by Go project documentation.\n",{"name":5,"description":7},"main","45728854e223fd51b203724ca0e5be9c8f93a5a4",".cratis\u002Fai\u002Fskills\u002Fgo-testing","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go","https:\u002F\u002Fwww.cratis.io\u002Ffundamentals\u002Fgo\u002F","https:\u002F\u002Fgithub.com\u002FCratis","https:\u002F\u002Fwww.cratis.io","Open-source (MIT) event sourcing and CQRS for .NET and beyond: Chronicle, Arc, Components and Screenplay.","2026-11-14 15:52:19",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Cratis\u002FFundamentals.Go --skill go-testing",{"tool":38,"command":39},"bunx","bunx skills add Cratis\u002FFundamentals.Go --skill go-testing",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Cratis\u002FFundamentals.Go --skill go-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fgo-testing\u002FSKILL.md",true,[],[47,55,63,71,80,87],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":51,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M7DNCY3BCGY3MC5BFJ9S59BF","spf13-go","Review Go library APIs, package boundaries, tests, iterators and standard-library choices. Load for broad design or idiom reviews after the repository-owned Go skills.","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fspf13-go\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fspf13-go\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7DNCSQQH7GQ03ZETFX9XHAS","samber-golang-error-handling","Review Go error creation, wrapping, inspection and logging boundaries. Load when changing caller-visible failures after go-errors-and-context.","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fsamber-golang-error-handling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fsamber-golang-error-handling\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7DNCM4ZC15SSDA5FAAHN5S0","samber-golang-context","Design Go context propagation, cancellation, deadlines and request metadata. Load for operation-lifetime changes or context-related leaks after go-errors-and-context.","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fsamber-golang-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fsamber-golang-context\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7DNCGNSMHK640AK1R3J0CPD","jetbrains-go-modern-guidelines","Choose version-compatible modern Go syntax and standard-library APIs. Load when modernizing touched Go code after reading go.mod and build constraints.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fjetbrains-go-modern-guidelines\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fjetbrains-go-modern-guidelines\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7DNC7ES2RD6WGKC94KMMXTD","go-release-modules","Review Go module dependencies, minimum versions, compatibility, semantic labels, release-action tags, and proxy discoverability. Use for release preparation, retractions, and major-version migration planning.","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fgo-release-modules\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7DNC22JY2MFWQR4RVFH3NZA","go-library-api-design","Design or review exported Go APIs, constructors, interfaces, generics, iteration, ownership, and compatibility. Use when adding or changing public Go library surface.","https:\u002F\u002Fgithub.com\u002FCratis\u002FFundamentals.Go\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fgo-library-api-design\u002FSKILL.md",[],[]]