[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786J7N6DK0MKSXT6F1TWS81":3,"skill-same:01M786J7N6DK0MKSXT6F1TWS81":49},{"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":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M786J7N6DK0MKSXT6F1TWS81","go-testing",null,"Use ONLY when user explicitly requests Go test code, testing\u002Ftestify configuration, test failure diagnosis, or coverage improvement for Go projects.\nTriggers: \"write test go\", \"go testing\", \"testify\", \"uber mock\", \"go coverage\", \"go benchmark\", \"table-driven test\", \"go fuzz\", \"t.Parallel\", \"httptest\".\nDo NOT activate for: general Go coding without test context, go mod\u002Fbuild errors, Go module setup, or Go toolchain installation.","chenziyang110\u002Flaunchdeck","chenziyang110","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43693913?v=4","01M7863EBWK1D0P6A29YGEMAS4","Robin11","01M7863ECM1VB6RXDMHTW90D2T",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fgo-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"go-testing\"\ndescription: \"Use ONLY when user explicitly requests Go test code, testing\u002Ftestify configuration,\ntest failure diagnosis, or coverage improvement for Go projects.\n\nTriggers: \\\"write test go\\\", \\\"go testing\\\", \\\"testify\\\", \\\"uber mock\\\", \\\"go coverage\\\",\n\\\"go benchmark\\\", \\\"table-driven test\\\", \\\"go fuzz\\\", \\\"t.Parallel\\\", \\\"httptest\\\".\n\nDo NOT activate for: general Go coding without test context, go mod\u002Fbuild errors,\nGo module setup, or Go toolchain installation.\n\"\ncompatibility: \"Requires spec-kit project structure with .specify\u002F directory\"\nmetadata:\n  author: \"github-spec-kit\"\n  source: \"templates\u002Fpassive-skills\u002Fgo-testing\u002FSKILL.md\"\n---\n\n\n# Go Testing (Agent Skill)\n\nAgent-focused testing workflow for modern Go (1.21+) using the standard `testing` package with `testify` for assertions and mocks.\n\n## When to Use\n\n- Writing new Go tests or fixing existing tests\n- Designing unit\u002Fintegration test coverage for Go components\n- Adding test coverage, CI gating, or regression protection\n- Configuring Go test workflows for consistent execution\n- Investigating test failures or flaky behavior\n- Testing HTTP handlers, gRPC services, or CLI tools\n\n### When NOT to Use\n\n- Implementing new product features without test changes\n- Large-scale refactors unrelated to test coverage or failures\n- Performance tuning without test regressions to validate\n- Non-Go projects or non-test tasks\n\n### Stop Conditions — When to ASK instead of generating\n\nBefore generating any test code, STOP and ask the user if:\n- The code under test has **zero testability** (package-level globals, no interfaces, hard-coded network calls)\n- **No test files** exist in the project and no `_test.go` pattern is used\n- The request is **ambiguous**: \"test my app\" or \"add tests\" without specifying packages or functions\n- A **required test dependency** (testify, mockgen) is not installed via go.mod\n- The test would require **secrets, real credentials, or production database access**\n\n## Core Concepts\n\n- **TDD loop**: red → green → refactor (tests first, minimal fix, then cleanups).\n- **Table-driven tests**: idiomatic Go pattern for testing multiple cases.\n- **Test layout**: `_test.go` files co-located with source, `testdata\u002F` for fixtures.\n- **Subtests**: `t.Run()` for hierarchical test organization.\n- **Testable examples**: `ExampleXxx` functions for documentation-as-tests.\n- **CI signal**: run with `-race -count=1 -vet=all` for correctness.\n\n## Agent Execution Protocol\n\nWhen this skill is activated, follow this exact execution sequence:\n\n### Phase 1: Context Analysis\nBefore writing any test code:\n1. Identify the Go version (1.21+) and module structure (`go.mod`).\n2. Check for existing test files (`*_test.go`) to infer naming conventions and style.\n3. Analyze the code under test: identify public API surface, side effects, goroutine usage, and I\u002FO boundaries.\n4. Determine request type: (a) new tests, (b) fixing broken tests, (c) coverage improvement, (d) flaky test diagnosis.\n\n### Phase 2: Strategy Selection\nBased on Phase 1, select the appropriate strategy:\n- **Pure functions \u002F utilities**: table-driven tests (`[]struct{...}`) with `t.Run`, no mocks.\n- **External dependencies (DB, HTTP, filesystem)**: use interfaces + manual mocks or Uber Mock (`go.uber.org\u002Fmock`); prefer `httptest` for HTTP handlers.\n- **Async \u002F goroutine code**: use `sync.WaitGroup` + channels; test with `-race` flag.\n- **Benchmarks**: use `BenchmarkXxx` with `testing.B` for performance regression detection.\n\n### Decision Tree (Complex Scenarios)\n\n```text\nQ1: External I\u002FO (DB, HTTP, filesystem, network)?\n  → Yes → Q2\n  → No  → Pure unit test, no mocks needed\n\nQ2: Mockable at code boundary (interface, function parameter)?\n  → Yes → Mock at boundary (testify mock, uber mockgen)\n  → No  → Q3\n\nQ3: Needs real behavior verification (SQL, Docker services)?\n  → Yes → Integration test (dockertest, testcontainers-go)\n  → No  → Use fake\u002Fstub (in-memory map, bytes.Buffer)\n\nQ4: Concurrent code (goroutines, channels)?\n  → Yes → t.Parallel() with sync primitives, -race flag\n  → No  → Synchronous test sufficient\n\nQ5: HTTP handler?\n  → Yes → httptest.NewServer \u002F httptest.NewRecorder\n  → No  → Standard table-driven test\n```\n\n### Phase 3: Test Case Design\nApply systematic test design before coding:\n1. **Happy path**: normal input → expected output.\n2. **Boundary values**: empty slices, `nil`, zero values, `math.MaxInt64`, empty strings.\n3. **Error cases**: error return values, panics (use `recover` or `assert.Panics`), invalid inputs.\n4. **Concurrency**: data races, channel deadlocks, context cancellation.\n\n### Phase 4: Code Generation\nOutput tests in this exact structure:\n```\n#### Test Strategy Summary\n- [ ] Scope: Unit \u002F Integration \u002F Benchmark\n- [ ] Framework: testing + testify (optional) + Uber Mock (if needed)\n- [ ] Mocking: Yes\u002FNo — interfaces \u002F Uber Mock\n- [ ] Edge cases covered: \u003Clist>\n\n#### Generated Test Code\n\u003Cfile_path>\n\u003Ccode>\n\n#### Running Commands\n```bash\ngo test -v -race -count=1 .\u002F...\ngo test -run TestFunctionName .\u002Fpackage\n```\n\n#### Coverage Impact (if applicable)\n- Estimated coverage change: \u003CX%>\n- Command to verify: `go test -coverprofile=coverage.out .\u002F... && go tool cover -func=coverage.out`\n```\n\n### Phase 5: Verification Checklist\nBefore completing, verify:\n- [ ] Tests compile and pass (`go test .\u002F...`).\n- [ ] Each subtest has a descriptive name (`t.Run(\"descriptive name\", ...)`).\n- [ ] Mocks are reset between tests (reconstruct in `SetupTest` or `beforeEach`).\n- [ ] No `time.Sleep` used for synchronization (use `sync.WaitGroup` or channels).\n- [ ] Flaky test guardrails applied (`t.TempDir()`, `-count=10` for reproduction).\n\n## TDD Workflow\n\nFollow the RED → GREEN → REFACTOR loop:\n\n1. **RED**: write a failing test that captures the new behavior\n2. **GREEN**: implement the smallest change to pass\n3. **REFACTOR**: clean up while tests stay green\n\n```go\n\u002F\u002F add_test.go\nfunc Add(a, b int) int \u002F\u002F Provided by production code.\n\nfunc TestAdd(t *testing.T) { \u002F\u002F RED\n    got := Add(2, 3)\n    want := 5\n    if got != want {\n        t.Errorf(\"Add(2, 3) = %d; want %d\", got, want)\n    }\n}\n\n\u002F\u002F add.go\nfunc Add(a, b int) int { \u002F\u002F GREEN\n    return a + b\n}\n\n\u002F\u002F REFACTOR: simplify\u002Frename once tests pass\n```\n\n## Code Examples\n\n### Basic Unit Test\n\n```go\n\u002F\u002F calculator_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    got := Add(2, 3)\n    want := 5\n    if got != want {\n        t.Errorf(\"Add() = %d; want %d\", got, want)\n    }\n}\n```\n\n### Table-Driven Test\n\n```go\n\u002F\u002F math_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    tests := []struct {\n        name     string\n        a, b     int\n        expected int\n    }{\n        {\"positive\", 2, 3, 5},\n        {\"negative\", -1, 1, 0},\n        {\"zeros\", 0, 0, 0},\n        {\"large\", 100, 200, 300},\n    }\n\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            got := Add(tt.a, tt.b)\n            if got != tt.expected {\n                t.Errorf(\"Add(%d, %d) = %d; want %d\", tt.a, tt.b, got, tt.expected)\n            }\n        })\n    }\n}\n```\n\n### Parallel Table-Driven Test\n\n```go\n\u002F\u002F math_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    tests := []struct {\n        name     string\n        a, b     int\n        expected int\n    }{\n        {\"positive\", 2, 3, 5},\n        {\"negative\", -1, 1, 0},\n        {\"zeros\", 0, 0, 0},\n        {\"large\", 100, 200, 300},\n    }\n\n    for _, tt := range tests {\n        tt := tt \u002F\u002F capture range variable for parallel execution\n        t.Run(tt.name, func(t *testing.T) {\n            t.Parallel() \u002F\u002F run subtests concurrently\n            got := Add(tt.a, tt.b)\n            if got != tt.expected {\n                t.Errorf(\"Add(%d, %d) = %d; want %d\", tt.a, tt.b, got, tt.expected)\n            }\n        })\n    }\n}\n```\n\n> **Warning:** Always reassign the loop variable (`tt := tt`) before `t.Parallel()` to avoid capturing the iteration variable by reference.\n\n### Testify Suite + Assertions\n\n```bash\n# Install: go get github.com\u002Fstretchr\u002Ftestify@v1.10.0\n```\n\n```go\n\u002F\u002F user_store_test.go\npackage main\n\nimport (\n    \"testing\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fassert\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fsuite\"\n)\n\ntype User struct { Name string }\n\ntype UserStore struct {\n    users []User\n}\n\nfunc (s *UserStore) Seed(users []User) {\n    s.users = append(s.users, users...)\n}\n\nfunc (s *UserStore) Find(name string) *User {\n    for _, u := range s.users {\n        if u.Name == name {\n            return &u\n        }\n    }\n    return nil\n}\n\ntype UserStoreTestSuite struct {\n    suite.Suite\n    store *UserStore\n}\n\nfunc (s *UserStoreTestSuite) SetupTest() {\n    s.store = &UserStore{}\n    s.store.Seed([]User{{\"alice\"}, {\"bob\"}})\n}\n\nfunc (s *UserStoreTestSuite) TestFindExistingUser() {\n    user := s.store.Find(\"alice\")\n    assert.NotNil(s.T(), user)\n    assert.Equal(s.T(), \"alice\", user.Name)\n}\n\nfunc TestUserStoreSuite(t *testing.T) {\n    suite.Run(t, new(UserStoreTestSuite))\n}\n```\n\n### Mocking (testify mock)\n\n```go\n\u002F\u002F notifier_test.go\npackage main\n\nimport (\n    \"testing\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fmock\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fassert\"\n)\n\ntype Notifier interface {\n    Send(message string) error\n}\n\ntype MockNotifier struct {\n    mock.Mock\n}\n\nfunc (m *MockNotifier) Send(message string) error {\n    args := m.Called(message)\n    return args.Error(0)\n}\n\ntype Service struct {\n    notifier Notifier\n}\n\nfunc (s *Service) Publish(message string) error {\n    return s.notifier.Send(message)\n}\n\nfunc TestSendsNotifications(t *testing.T) {\n    notifier := new(MockNotifier)\n    notifier.On(\"Send\", \"hello\").Return(nil)\n\n    service := Service{notifier: notifier}\n    err := service.Publish(\"hello\")\n\n    assert.NoError(t, err)\n    notifier.AssertExpectations(t)\n}\n```\n\n### HTTP Handler Test\n\n```go\n\u002F\u002F handler_test.go\npackage main\n\nimport (\n    \"net\u002Fhttp\"\n    \"net\u002Fhttp\u002Fhttptest\"\n    \"testing\"\n)\n\nfunc TestHelloHandler(t *testing.T) {\n    req := httptest.NewRequest(http.MethodGet, \"\u002Fhello\", nil)\n    rec := httptest.NewRecorder()\n\n    HelloHandler(rec, req)\n\n    assert.Equal(t, http.StatusOK, rec.Code)\n    assert.Equal(t, \"Hello, World!\", rec.Body.String())\n}\n```\n\n### Testable Example\n\n```go\n\u002F\u002F add_test.go\npackage main\n\nimport \"fmt\"\n\nfunc ExampleAdd() {\n    sum := Add(2, 3)\n    fmt.Println(sum)\n    \u002F\u002F Output: 5\n}\n```\n\n### Fuzz Test (Go 1.18+)\n\n```go\n\u002F\u002F add_fuzz_test.go\npackage main\n\nimport \"testing\"\n\nfunc FuzzAdd(f *testing.F) {\n    f.Add(2, 3)\n    f.Add(-1, 1)\n    f.Add(0, 0)\n\n    f.Fuzz(func(t *testing.T, a, b int) {\n        result := Add(a, b)\n        \u002F\u002F property: a + b == b + a\n    })\n}\n```\n\n## Running Tests\n\n```bash\ngo test .\u002F...                          # all packages\ngo test -v .\u002F...                       # verbose\ngo test -run TestAdd                   # run matching tests\ngo test -run \"TestAdd\u002Fpositive\"        # run matching subtest\ngo test -count=1 .\u002F...                 # disable cache\ngo test -race .\u002F...                    # race detector\ngo test -bench=. -benchmem             # benchmarks with memory\ngo test -fuzz=FuzzAdd -fuzztime=10s    # fuzz testing\n```\n\n## Coverage\n\n```bash\ngo test -cover .\u002F...\ngo test -coverprofile=coverage.out .\u002F...\ngo tool cover -func=coverage.out       # per-function coverage\ngo tool cover -html=coverage.out       # HTML report\n```\n\n```bash\n# CI with coverage gate\ngo test -coverprofile=coverage.out -covermode=atomic .\u002F...\ngo tool cover -func=coverage.out | tail -1 | awk '{print $NF}' | tr -d '%'\n```\n\n## Debugging Failures\n\n1. Re-run with `-v -count=1` for uncached verbose output.\n2. Use `t.Log()` \u002F `t.Logf()` for debug output (shown with `-v`).\n3. Run with `-race` to catch data races.\n4. Use `go test -gcflags=-l` to disable inlining for clearer stack traces.\n5. Expand to full suite once the root cause is fixed.\n\n## Test Flags and Conventions\n\n```go\n\u002F\u002F testing.Short for skipping slow tests\nfunc TestIntegration(t *testing.T) {\n    if testing.Short() {\n        t.Skip(\"skipping integration test in short mode\")\n    }\n}\n\n\u002F\u002F Running: go test -short .\u002F...\n```\n\n```go\n\u002F\u002F TestMain for custom setup\nfunc TestMain(m *testing.M) {\n    \u002F\u002F setup\n    code := m.Run()\n    \u002F\u002F teardown\n    os.Exit(code)\n}\n```\n\n## CI\u002FCD Integration (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test\non: [push, pull_request]\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-go@v5\n        with: { go-version: '1.23' }\n      - run: go test -v -race -count=1 -coverprofile=coverage.out .\u002F...\n      - run: go tool cover -func=coverage.out\n```\n\n## Flaky Tests Guardrails\n\n- Never use `time.Sleep` for synchronization; use `sync.WaitGroup` or channels.\n- Make temp directories unique with `t.TempDir()`.\n- Avoid real time, network, or external services in unit tests.\n- Use `clock.NewMock()` from `github.com\u002Fbenbjohnson\u002Fclock` for time-dependent code.\n- Run tests with `-count=10` to reproduce flakiness.\n\n## Test Case Design Patterns\n\nApply these systematic patterns before writing test code to ensure robust coverage beyond the happy path.\n\n### 1. Boundary Value Analysis\nTest at the edges of valid input domains: empty, zero, maximum, nil, and just-outside valid ranges.\n\n```go\n\u002F\u002F validator_test.go\nfunc TestValidateInputBoundary(t *testing.T) {\n    tests := []struct {\n        name  string\n        input string\n    }{\n        {\"empty\", \"\"},\n        {\"whitespace\", \" \"},\n        {\"too long\", strings.Repeat(\"a\", 10001)},\n    }\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            _, err := ValidateInput(tt.input)\n            if err == nil {\n                t.Errorf(\"expected error for %q\", tt.input)\n            }\n        })\n    }\n}\n```\n\n### 2. Negative \u002F Error Case Testing\nVerify the system behaves correctly under invalid or unexpected conditions.\n\n```go\n\u002F\u002F calculator_test.go\nfunc TestDivideByZero(t *testing.T) {\n    _, err := Divide(10, 0)\n    if err == nil {\n        t.Error(\"expected error for divide by zero\")\n    }\n}\n```\n\n### 3. State-Based Testing\nFor objects with internal state, verify transitions between states are correct and irreversible where expected.\n\n```go\n\u002F\u002F connection_test.go\nfunc TestConnectionStateTransitions(t *testing.T) {\n    conn := NewConnection()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed, got %v\", conn.State())\n    }\n    conn.Open()\n    if conn.State() != Open {\n        t.Errorf(\"expected open, got %v\", conn.State())\n    }\n    conn.Close()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed, got %v\", conn.State())\n    }\n    \u002F\u002F Idempotency\n    conn.Close()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed after double close, got %v\", conn.State())\n    }\n}\n```\n\n## Common Test Smells to Avoid\n\n- **Assertion Roulette**: Many assertions without context, making failure diagnosis ambiguous. *Fix: Use descriptive `t.Run` subtest names and testify `assert.Equal(t, expected, actual, \"context\")`.*\n- **Happy Path Bias**: Only testing successful scenarios, leaving error paths uncovered. *Fix: Test non-nil error returns, empty\u002Fnil inputs, edge values.*\n- **Mock Overdose**: Too many mocks hiding integration issues or coupling tests to implementation. *Fix: Mock only at interface boundaries; prefer real fakes (in-memory store) for collaborators.*\n- **The Free Ride**: Tests that execute code but assert nothing meaningful. *Fix: Every test must have at least one specific, falsifiable assertion.*\n- **Obscure Test**: Long table-driven tests with cryptic names or no descriptive subtest names. *Fix: Use `t.Run(\"descriptive name\")` for each subtest case.*\n- **Flaky Test**: Non-deterministic results from goroutines, time, or shared state. *Fix: Use `t.TempDir()`, `-count=10` for reproduction, `-race` for data races.*\n\n## Best Practices\n\n### DO\n\n- Keep tests deterministic and isolated\n- Use table-driven tests for multiple cases\n- Use `t.Helper()` for test helper functions\n- Use `t.Cleanup()` for deferred teardown\n- Name tests with `TestXxx` and subtests with descriptive names\n- Use `testify\u002Fassert` for readable assertions\n- Run with `-race` in CI\n\n### DON'T\n\n- Don't use `time.Sleep` for synchronization\n- Don't depend on real network or external services in unit tests\n- Don't write global state that leaks between tests\n- Don't test unexported functions directly (except for internal packages)\n- Don't use `panic` for test failures — use `t.Error` \u002F `t.Fatal`\n- Don't ignore test errors with `_`\n\n### Common Pitfalls\n\n- **Cache masking failures** → Use `-count=1` in CI to disable test caching.\n- **Relying on wall clock** → Inject clock interfaces or use `time.Now()` mocking via `clock`.\n- **Flaky goroutine tests** → Use `sync.WaitGroup` and channels, not sleeps.\n- **Global state pollution** → Reset package-level vars in `TestMain` or `SetupTest`.\n- **Over-mocking** → Prefer integration testing for core business logic.\n- **Missing race detection** → Add `-race` to CI test runs.\n- **Testing internals** → Export only what's needed; test through public API.\n- **Orphaned testdata** → Clean up `testdata` directories periodically.\n\n## Optional Appendix: Advanced Testing\n\n### GoMock (Alternative Mocking)\n\n> **Note:** `github.com\u002Fgolang\u002Fmock` has been archived by Google. Use Uber's maintained fork instead.\n\n```bash\ngo install go.uber.org\u002Fmock\u002Fmockgen@latest\nmockgen -source=notifier.go -destination=mock_notifier.go -package=main\n```\n\n### Dockertest (Integration)\n\n```go\nimport (\n    \"testing\"\n    \"github.com\u002Fory\u002Fdockertest\u002Fv3\"\n)\n\nfunc TestPostgres(t *testing.T) {\n    pool, err := dockertest.NewPool(\"\")\n    \u002F\u002F ... spin up container, run tests\n}\n```\n\n### Mutation Testing (gremlins)\n\n```bash\n# Install: go install github.com\u002Fgo-gremlins\u002Fgremlins\u002Fcmd\u002Fgremlins@latest\ngremlins unleash                # run all mutation tests\ngremlins unleash --tag \"unit\"   # filter by build tags\n# Output: KILLED\u002FMUTATED count per file with survival rate\n```\n\n> Mutation testing validates test quality by introducing code changes (e.g., `>` → `>=`, removing early returns). **Target ≥80% kill rate** — surviving mutants indicate missing assertions or untested paths.\n\n## Alternatives\n\n- **Ginkgo + Gomega**: BDD-style testing, more verbose.\n- **Gocheck**: older xUnit-style framework, less common in new projects.\n- **apitest**: declarative HTTP API testing.\n","# Go Testing (Agent Skill)\n\nAgent-focused testing workflow for modern Go (1.21+) using the standard `testing` package with `testify` for assertions and mocks.\n\n## When to Use\n\n- Writing new Go tests or fixing existing tests\n- Designing unit\u002Fintegration test coverage for Go components\n- Adding test coverage, CI gating, or regression protection\n- Configuring Go test workflows for consistent execution\n- Investigating test failures or flaky behavior\n- Testing HTTP handlers, gRPC services, or CLI tools\n\n### When NOT to Use\n\n- Implementing new product features without test changes\n- Large-scale refactors unrelated to test coverage or failures\n- Performance tuning without test regressions to validate\n- Non-Go projects or non-test tasks\n\n### Stop Conditions — When to ASK instead of generating\n\nBefore generating any test code, STOP and ask the user if:\n- The code under test has **zero testability** (package-level globals, no interfaces, hard-coded network calls)\n- **No test files** exist in the project and no `_test.go` pattern is used\n- The request is **ambiguous**: \"test my app\" or \"add tests\" without specifying packages or functions\n- A **required test dependency** (testify, mockgen) is not installed via go.mod\n- The test would require **secrets, real credentials, or production database access**\n\n## Core Concepts\n\n- **TDD loop**: red → green → refactor (tests first, minimal fix, then cleanups).\n- **Table-driven tests**: idiomatic Go pattern for testing multiple cases.\n- **Test layout**: `_test.go` files co-located with source, `testdata\u002F` for fixtures.\n- **Subtests**: `t.Run()` for hierarchical test organization.\n- **Testable examples**: `ExampleXxx` functions for documentation-as-tests.\n- **CI signal**: run with `-race -count=1 -vet=all` for correctness.\n\n## Agent Execution Protocol\n\nWhen this skill is activated, follow this exact execution sequence:\n\n### Phase 1: Context Analysis\nBefore writing any test code:\n1. Identify the Go version (1.21+) and module structure (`go.mod`).\n2. Check for existing test files (`*_test.go`) to infer naming conventions and style.\n3. Analyze the code under test: identify public API surface, side effects, goroutine usage, and I\u002FO boundaries.\n4. Determine request type: (a) new tests, (b) fixing broken tests, (c) coverage improvement, (d) flaky test diagnosis.\n\n### Phase 2: Strategy Selection\nBased on Phase 1, select the appropriate strategy:\n- **Pure functions \u002F utilities**: table-driven tests (`[]struct{...}`) with `t.Run`, no mocks.\n- **External dependencies (DB, HTTP, filesystem)**: use interfaces + manual mocks or Uber Mock (`go.uber.org\u002Fmock`); prefer `httptest` for HTTP handlers.\n- **Async \u002F goroutine code**: use `sync.WaitGroup` + channels; test with `-race` flag.\n- **Benchmarks**: use `BenchmarkXxx` with `testing.B` for performance regression detection.\n\n### Decision Tree (Complex Scenarios)\n\n```text\nQ1: External I\u002FO (DB, HTTP, filesystem, network)?\n  → Yes → Q2\n  → No  → Pure unit test, no mocks needed\n\nQ2: Mockable at code boundary (interface, function parameter)?\n  → Yes → Mock at boundary (testify mock, uber mockgen)\n  → No  → Q3\n\nQ3: Needs real behavior verification (SQL, Docker services)?\n  → Yes → Integration test (dockertest, testcontainers-go)\n  → No  → Use fake\u002Fstub (in-memory map, bytes.Buffer)\n\nQ4: Concurrent code (goroutines, channels)?\n  → Yes → t.Parallel() with sync primitives, -race flag\n  → No  → Synchronous test sufficient\n\nQ5: HTTP handler?\n  → Yes → httptest.NewServer \u002F httptest.NewRecorder\n  → No  → Standard table-driven test\n```\n\n### Phase 3: Test Case Design\nApply systematic test design before coding:\n1. **Happy path**: normal input → expected output.\n2. **Boundary values**: empty slices, `nil`, zero values, `math.MaxInt64`, empty strings.\n3. **Error cases**: error return values, panics (use `recover` or `assert.Panics`), invalid inputs.\n4. **Concurrency**: data races, channel deadlocks, context cancellation.\n\n### Phase 4: Code Generation\nOutput tests in this exact structure:\n```\n#### Test Strategy Summary\n- [ ] Scope: Unit \u002F Integration \u002F Benchmark\n- [ ] Framework: testing + testify (optional) + Uber Mock (if needed)\n- [ ] Mocking: Yes\u002FNo — interfaces \u002F Uber Mock\n- [ ] Edge cases covered: \u003Clist>\n\n#### Generated Test Code\n\u003Cfile_path>\n\u003Ccode>\n\n#### Running Commands\n```bash\ngo test -v -race -count=1 .\u002F...\ngo test -run TestFunctionName .\u002Fpackage\n```\n\n#### Coverage Impact (if applicable)\n- Estimated coverage change: \u003CX%>\n- Command to verify: `go test -coverprofile=coverage.out .\u002F... && go tool cover -func=coverage.out`\n```\n\n### Phase 5: Verification Checklist\nBefore completing, verify:\n- [ ] Tests compile and pass (`go test .\u002F...`).\n- [ ] Each subtest has a descriptive name (`t.Run(\"descriptive name\", ...)`).\n- [ ] Mocks are reset between tests (reconstruct in `SetupTest` or `beforeEach`).\n- [ ] No `time.Sleep` used for synchronization (use `sync.WaitGroup` or channels).\n- [ ] Flaky test guardrails applied (`t.TempDir()`, `-count=10` for reproduction).\n\n## TDD Workflow\n\nFollow the RED → GREEN → REFACTOR loop:\n\n1. **RED**: write a failing test that captures the new behavior\n2. **GREEN**: implement the smallest change to pass\n3. **REFACTOR**: clean up while tests stay green\n\n```go\n\u002F\u002F add_test.go\nfunc Add(a, b int) int \u002F\u002F Provided by production code.\n\nfunc TestAdd(t *testing.T) { \u002F\u002F RED\n    got := Add(2, 3)\n    want := 5\n    if got != want {\n        t.Errorf(\"Add(2, 3) = %d; want %d\", got, want)\n    }\n}\n\n\u002F\u002F add.go\nfunc Add(a, b int) int { \u002F\u002F GREEN\n    return a + b\n}\n\n\u002F\u002F REFACTOR: simplify\u002Frename once tests pass\n```\n\n## Code Examples\n\n### Basic Unit Test\n\n```go\n\u002F\u002F calculator_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    got := Add(2, 3)\n    want := 5\n    if got != want {\n        t.Errorf(\"Add() = %d; want %d\", got, want)\n    }\n}\n```\n\n### Table-Driven Test\n\n```go\n\u002F\u002F math_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    tests := []struct {\n        name     string\n        a, b     int\n        expected int\n    }{\n        {\"positive\", 2, 3, 5},\n        {\"negative\", -1, 1, 0},\n        {\"zeros\", 0, 0, 0},\n        {\"large\", 100, 200, 300},\n    }\n\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            got := Add(tt.a, tt.b)\n            if got != tt.expected {\n                t.Errorf(\"Add(%d, %d) = %d; want %d\", tt.a, tt.b, got, tt.expected)\n            }\n        })\n    }\n}\n```\n\n### Parallel Table-Driven Test\n\n```go\n\u002F\u002F math_test.go\npackage main\n\nimport \"testing\"\n\nfunc TestAdd(t *testing.T) {\n    tests := []struct {\n        name     string\n        a, b     int\n        expected int\n    }{\n        {\"positive\", 2, 3, 5},\n        {\"negative\", -1, 1, 0},\n        {\"zeros\", 0, 0, 0},\n        {\"large\", 100, 200, 300},\n    }\n\n    for _, tt := range tests {\n        tt := tt \u002F\u002F capture range variable for parallel execution\n        t.Run(tt.name, func(t *testing.T) {\n            t.Parallel() \u002F\u002F run subtests concurrently\n            got := Add(tt.a, tt.b)\n            if got != tt.expected {\n                t.Errorf(\"Add(%d, %d) = %d; want %d\", tt.a, tt.b, got, tt.expected)\n            }\n        })\n    }\n}\n```\n\n> **Warning:** Always reassign the loop variable (`tt := tt`) before `t.Parallel()` to avoid capturing the iteration variable by reference.\n\n### Testify Suite + Assertions\n\n```bash\n# Install: go get github.com\u002Fstretchr\u002Ftestify@v1.10.0\n```\n\n```go\n\u002F\u002F user_store_test.go\npackage main\n\nimport (\n    \"testing\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fassert\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fsuite\"\n)\n\ntype User struct { Name string }\n\ntype UserStore struct {\n    users []User\n}\n\nfunc (s *UserStore) Seed(users []User) {\n    s.users = append(s.users, users...)\n}\n\nfunc (s *UserStore) Find(name string) *User {\n    for _, u := range s.users {\n        if u.Name == name {\n            return &u\n        }\n    }\n    return nil\n}\n\ntype UserStoreTestSuite struct {\n    suite.Suite\n    store *UserStore\n}\n\nfunc (s *UserStoreTestSuite) SetupTest() {\n    s.store = &UserStore{}\n    s.store.Seed([]User{{\"alice\"}, {\"bob\"}})\n}\n\nfunc (s *UserStoreTestSuite) TestFindExistingUser() {\n    user := s.store.Find(\"alice\")\n    assert.NotNil(s.T(), user)\n    assert.Equal(s.T(), \"alice\", user.Name)\n}\n\nfunc TestUserStoreSuite(t *testing.T) {\n    suite.Run(t, new(UserStoreTestSuite))\n}\n```\n\n### Mocking (testify mock)\n\n```go\n\u002F\u002F notifier_test.go\npackage main\n\nimport (\n    \"testing\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fmock\"\n    \"github.com\u002Fstretchr\u002Ftestify\u002Fassert\"\n)\n\ntype Notifier interface {\n    Send(message string) error\n}\n\ntype MockNotifier struct {\n    mock.Mock\n}\n\nfunc (m *MockNotifier) Send(message string) error {\n    args := m.Called(message)\n    return args.Error(0)\n}\n\ntype Service struct {\n    notifier Notifier\n}\n\nfunc (s *Service) Publish(message string) error {\n    return s.notifier.Send(message)\n}\n\nfunc TestSendsNotifications(t *testing.T) {\n    notifier := new(MockNotifier)\n    notifier.On(\"Send\", \"hello\").Return(nil)\n\n    service := Service{notifier: notifier}\n    err := service.Publish(\"hello\")\n\n    assert.NoError(t, err)\n    notifier.AssertExpectations(t)\n}\n```\n\n### HTTP Handler Test\n\n```go\n\u002F\u002F handler_test.go\npackage main\n\nimport (\n    \"net\u002Fhttp\"\n    \"net\u002Fhttp\u002Fhttptest\"\n    \"testing\"\n)\n\nfunc TestHelloHandler(t *testing.T) {\n    req := httptest.NewRequest(http.MethodGet, \"\u002Fhello\", nil)\n    rec := httptest.NewRecorder()\n\n    HelloHandler(rec, req)\n\n    assert.Equal(t, http.StatusOK, rec.Code)\n    assert.Equal(t, \"Hello, World!\", rec.Body.String())\n}\n```\n\n### Testable Example\n\n```go\n\u002F\u002F add_test.go\npackage main\n\nimport \"fmt\"\n\nfunc ExampleAdd() {\n    sum := Add(2, 3)\n    fmt.Println(sum)\n    \u002F\u002F Output: 5\n}\n```\n\n### Fuzz Test (Go 1.18+)\n\n```go\n\u002F\u002F add_fuzz_test.go\npackage main\n\nimport \"testing\"\n\nfunc FuzzAdd(f *testing.F) {\n    f.Add(2, 3)\n    f.Add(-1, 1)\n    f.Add(0, 0)\n\n    f.Fuzz(func(t *testing.T, a, b int) {\n        result := Add(a, b)\n        \u002F\u002F property: a + b == b + a\n    })\n}\n```\n\n## Running Tests\n\n```bash\ngo test .\u002F...                          # all packages\ngo test -v .\u002F...                       # verbose\ngo test -run TestAdd                   # run matching tests\ngo test -run \"TestAdd\u002Fpositive\"        # run matching subtest\ngo test -count=1 .\u002F...                 # disable cache\ngo test -race .\u002F...                    # race detector\ngo test -bench=. -benchmem             # benchmarks with memory\ngo test -fuzz=FuzzAdd -fuzztime=10s    # fuzz testing\n```\n\n## Coverage\n\n```bash\ngo test -cover .\u002F...\ngo test -coverprofile=coverage.out .\u002F...\ngo tool cover -func=coverage.out       # per-function coverage\ngo tool cover -html=coverage.out       # HTML report\n```\n\n```bash\n# CI with coverage gate\ngo test -coverprofile=coverage.out -covermode=atomic .\u002F...\ngo tool cover -func=coverage.out | tail -1 | awk '{print $NF}' | tr -d '%'\n```\n\n## Debugging Failures\n\n1. Re-run with `-v -count=1` for uncached verbose output.\n2. Use `t.Log()` \u002F `t.Logf()` for debug output (shown with `-v`).\n3. Run with `-race` to catch data races.\n4. Use `go test -gcflags=-l` to disable inlining for clearer stack traces.\n5. Expand to full suite once the root cause is fixed.\n\n## Test Flags and Conventions\n\n```go\n\u002F\u002F testing.Short for skipping slow tests\nfunc TestIntegration(t *testing.T) {\n    if testing.Short() {\n        t.Skip(\"skipping integration test in short mode\")\n    }\n}\n\n\u002F\u002F Running: go test -short .\u002F...\n```\n\n```go\n\u002F\u002F TestMain for custom setup\nfunc TestMain(m *testing.M) {\n    \u002F\u002F setup\n    code := m.Run()\n    \u002F\u002F teardown\n    os.Exit(code)\n}\n```\n\n## CI\u002FCD Integration (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test\non: [push, pull_request]\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-go@v5\n        with: { go-version: '1.23' }\n      - run: go test -v -race -count=1 -coverprofile=coverage.out .\u002F...\n      - run: go tool cover -func=coverage.out\n```\n\n## Flaky Tests Guardrails\n\n- Never use `time.Sleep` for synchronization; use `sync.WaitGroup` or channels.\n- Make temp directories unique with `t.TempDir()`.\n- Avoid real time, network, or external services in unit tests.\n- Use `clock.NewMock()` from `github.com\u002Fbenbjohnson\u002Fclock` for time-dependent code.\n- Run tests with `-count=10` to reproduce flakiness.\n\n## Test Case Design Patterns\n\nApply these systematic patterns before writing test code to ensure robust coverage beyond the happy path.\n\n### 1. Boundary Value Analysis\nTest at the edges of valid input domains: empty, zero, maximum, nil, and just-outside valid ranges.\n\n```go\n\u002F\u002F validator_test.go\nfunc TestValidateInputBoundary(t *testing.T) {\n    tests := []struct {\n        name  string\n        input string\n    }{\n        {\"empty\", \"\"},\n        {\"whitespace\", \" \"},\n        {\"too long\", strings.Repeat(\"a\", 10001)},\n    }\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            _, err := ValidateInput(tt.input)\n            if err == nil {\n                t.Errorf(\"expected error for %q\", tt.input)\n            }\n        })\n    }\n}\n```\n\n### 2. Negative \u002F Error Case Testing\nVerify the system behaves correctly under invalid or unexpected conditions.\n\n```go\n\u002F\u002F calculator_test.go\nfunc TestDivideByZero(t *testing.T) {\n    _, err := Divide(10, 0)\n    if err == nil {\n        t.Error(\"expected error for divide by zero\")\n    }\n}\n```\n\n### 3. State-Based Testing\nFor objects with internal state, verify transitions between states are correct and irreversible where expected.\n\n```go\n\u002F\u002F connection_test.go\nfunc TestConnectionStateTransitions(t *testing.T) {\n    conn := NewConnection()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed, got %v\", conn.State())\n    }\n    conn.Open()\n    if conn.State() != Open {\n        t.Errorf(\"expected open, got %v\", conn.State())\n    }\n    conn.Close()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed, got %v\", conn.State())\n    }\n    \u002F\u002F Idempotency\n    conn.Close()\n    if conn.State() != Closed {\n        t.Errorf(\"expected closed after double close, got %v\", conn.State())\n    }\n}\n```\n\n## Common Test Smells to Avoid\n\n- **Assertion Roulette**: Many assertions without context, making failure diagnosis ambiguous. *Fix: Use descriptive `t.Run` subtest names and testify `assert.Equal(t, expected, actual, \"context\")`.*\n- **Happy Path Bias**: Only testing successful scenarios, leaving error paths uncovered. *Fix: Test non-nil error returns, empty\u002Fnil inputs, edge values.*\n- **Mock Overdose**: Too many mocks hiding integration issues or coupling tests to implementation. *Fix: Mock only at interface boundaries; prefer real fakes (in-memory store) for collaborators.*\n- **The Free Ride**: Tests that execute code but assert nothing meaningful. *Fix: Every test must have at least one specific, falsifiable assertion.*\n- **Obscure Test**: Long table-driven tests with cryptic names or no descriptive subtest names. *Fix: Use `t.Run(\"descriptive name\")` for each subtest case.*\n- **Flaky Test**: Non-deterministic results from goroutines, time, or shared state. *Fix: Use `t.TempDir()`, `-count=10` for reproduction, `-race` for data races.*\n\n## Best Practices\n\n### DO\n\n- Keep tests deterministic and isolated\n- Use table-driven tests for multiple cases\n- Use `t.Helper()` for test helper functions\n- Use `t.Cleanup()` for deferred teardown\n- Name tests with `TestXxx` and subtests with descriptive names\n- Use `testify\u002Fassert` for readable assertions\n- Run with `-race` in CI\n\n### DON'T\n\n- Don't use `time.Sleep` for synchronization\n- Don't depend on real network or external services in unit tests\n- Don't write global state that leaks between tests\n- Don't test unexported functions directly (except for internal packages)\n- Don't use `panic` for test failures — use `t.Error` \u002F `t.Fatal`\n- Don't ignore test errors with `_`\n\n### Common Pitfalls\n\n- **Cache masking failures** → Use `-count=1` in CI to disable test caching.\n- **Relying on wall clock** → Inject clock interfaces or use `time.Now()` mocking via `clock`.\n- **Flaky goroutine tests** → Use `sync.WaitGroup` and channels, not sleeps.\n- **Global state pollution** → Reset package-level vars in `TestMain` or `SetupTest`.\n- **Over-mocking** → Prefer integration testing for core business logic.\n- **Missing race detection** → Add `-race` to CI test runs.\n- **Testing internals** → Export only what's needed; test through public API.\n- **Orphaned testdata** → Clean up `testdata` directories periodically.\n\n## Optional Appendix: Advanced Testing\n\n### GoMock (Alternative Mocking)\n\n> **Note:** `github.com\u002Fgolang\u002Fmock` has been archived by Google. Use Uber's maintained fork instead.\n\n```bash\ngo install go.uber.org\u002Fmock\u002Fmockgen@latest\nmockgen -source=notifier.go -destination=mock_notifier.go -package=main\n```\n\n### Dockertest (Integration)\n\n```go\nimport (\n    \"testing\"\n    \"github.com\u002Fory\u002Fdockertest\u002Fv3\"\n)\n\nfunc TestPostgres(t *testing.T) {\n    pool, err := dockertest.NewPool(\"\")\n    \u002F\u002F ... spin up container, run tests\n}\n```\n\n### Mutation Testing (gremlins)\n\n```bash\n# Install: go install github.com\u002Fgo-gremlins\u002Fgremlins\u002Fcmd\u002Fgremlins@latest\ngremlins unleash                # run all mutation tests\ngremlins unleash --tag \"unit\"   # filter by build tags\n# Output: KILLED\u002FMUTATED count per file with survival rate\n```\n\n> Mutation testing validates test quality by introducing code changes (e.g., `>` → `>=`, removing early returns). **Target ≥80% kill rate** — surviving mutants indicate missing assertions or untested paths.\n\n## Alternatives\n\n- **Ginkgo + Gomega**: BDD-style testing, more verbose.\n- **Gocheck**: older xUnit-style framework, less common in new projects.\n- **apitest**: declarative HTTP API testing.\n",{"name":5,"metadata":24,"description":27,"compatibility":28},{"author":25,"source":26},"github-spec-kit","templates\u002Fpassive-skills\u002Fgo-testing\u002FSKILL.md","Use ONLY when user explicitly requests Go test code, testing\u002Ftestify configuration, test failure diagnosis, or coverage improvement for Go projects.\nTriggers: \"write test go\", \"go testing\", \"testify\", \"uber mock\", \"go coverage\", \"go benchmark\", \"table-driven test\", \"go fuzz\", \"t.Parallel\", \"httptest\".\nDo NOT activate for: general Go coding without test context, go mod\u002Fbuild errors, Go module setup, or Go toolchain installation. ","Requires spec-kit project structure with .specify\u002F directory","main","021f5cbe02157229460a577e9a585f2da6d78cb0",".codex\u002Fskills\u002Fgo-testing","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck","https:\u002F\u002Fgithub.com\u002Fchenziyang110","2026-08-07 18:10:54",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add chenziyang110\u002Flaunchdeck --skill go-testing",{"tool":41,"command":42},"bunx","bunx skills add chenziyang110\u002Flaunchdeck --skill go-testing",{"tool":44,"command":45},"pnpm","pnpm dlx skills add chenziyang110\u002Flaunchdeck --skill go-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fgo-testing\u002FSKILL.md",true,[],[50,57,63,69,76,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7875F3HQ1GF5F6BR36KY3JE","launchdeck-agent","Codex host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fcodex\u002Fskill\u002FSKILL.md",[],[],{"skillNo":58,"name":52,"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},"01M7875DV2DQR33K1NFJHKAMZP","Claude host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fclaude\u002Fskill\u002FSKILL.md",[],[],{"skillNo":64,"name":52,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M78759JQ7A6FQ8KDQTNYS3X9","Use this skill aggressively for local project lifecycle operations even when the user does not mention Launchdeck: start this project, run the dev server, dev, build, test, restart service, stop service, show logs, inspect ports, port is occupied, clean cache; and when the user explicitly asks to configure this local project for Launchdeck or create or generate a project-adapted `.launchdeck.yml`, including 为这个项目生成 Launchdeck 配置. Do not use for ordinary code edits, docs-only work, general explanations, API design discussion, or production deployment unless the user also asks to operate or configure a local project or service.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Fagent\u002Finstaller-payload\u002Fskill\u002Flaunchdeck-agent\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M78753ZJQ7G2CZT1W1G8WRJV","zig-testing","Use ONLY when user explicitly requests Zig test code, built-in test runner configuration,\ntest failure diagnosis, or coverage for Zig projects.\n\nTriggers: \"write test zig\", \"zig test\", \"testing.allocator\", \"zig coverage\",\n\"comptime test\", \"zig expectError\", \"zig snapshot test\", \"zig fuzz\".\n\nDo NOT activate for: general Zig coding without test context, build.zig configuration\nfor non-test targets, Zig compiler errors, or Zig build system setup.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fzig-testing\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M78750JXY4Z5D5W1EX3PQ31Z","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7874X2T83EQQFRCEY5SJJVC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fverification-before-completion\u002FSKILL.md",[],[]]