[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BQCDAHR4RNZGPBGK2H8NMS":3,"skill-same:01M7BQCDAHR4RNZGPBGK2H8NMS":55},{"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":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BQCDAHR4RNZGPBGK2H8NMS","go-database",null,"Use when writing or reviewing Go SQL queries, transactions, repositories, pools, migrations, or row mapping with database\u002Fsql, pgx, or an ORM; also for slow queries and queries in loops.","h0rn3t\u002Fgolang-skills","h0rn3t","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1213719?v=4","01M7BQBDJ8D4P5W7EQHBD464BX","Eugene Shershen","01M7BQBDJXMTCKNCEDKVEYDRGA",7,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-database\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-database\ndescription: Use when writing or reviewing Go SQL queries, transactions, repositories, pools, migrations, or row mapping with database\u002Fsql, pgx, or an ORM; also for slow queries and queries in loops.\n---\n\n# Go Database Access\n\n> Compatibility: Baseline Go 1.27 (see [COMPATIBILITY.md](..\u002Fgo-style-core\u002Freferences\u002FCOMPATIBILITY.md)). Go examples use\n> `database\u002Fsql`; `sql.Null[T]` requires Go 1.22+.\n\n## Resource Routing\n\n- `references\u002FSQL-PATTERNS.md` - Read when writing the rows loop, a transaction helper, nullable columns, batch lookups, keyset pagination, or pool settings — the full code for each rule below.\n- [references\u002FPOSTGRESQL.md](references\u002FPOSTGRESQL.md) - Read for PostgreSQL schema design, constraints, indexes, upserts, or migrations on live tables. Check the target PostgreSQL version; these rules do not apply to other databases.\n\n## Stdlib First\n\n> **Normative**: `database\u002Fsql` plus a driver covers most services. An ORM is\n> a new module, the last rung of the dependency ladder in\n> [go-packages](..\u002Fgo-packages\u002FSKILL.md).\n\n```\nWhat does the repository already use?\n├─ Nothing yet        → database\u002Fsql (+ pgx stdlib driver for Postgres)\n├─ Needs typed, generated queries → sqlc over database\u002Fsql\n├─ Postgres-only, hot path        → pgx native (batches, COPY, typed scans)\n└─ An ORM already     → keep it; WithContext on every call, Select the columns,\n                        Preload\u002FJoins instead of a query per row\n```\n\npgx native means one `*pgxpool.Pool` per process from `pgxpool.New(ctx, dsn)`\n— a `*pgx.Conn` is not safe for concurrent use — and rows read with\n`pgx.CollectRows(rows, pgx.RowToStructByName[T])`, which closes them and\nreturns their error.\n\n---\n\n## Every Query Carries a Context\n\n> **Normative**: `QueryContext`, `QueryRowContext`, `ExecContext`, `BeginTx`.\n> The ctx-less forms are unbounded and `noctx` in the lint gate flags them.\n\n---\n\n## `*sql.DB` Is a Pool\n\nOpen once in `run()`, `PingContext` to fail fast, inject it into repositories.\nNever open per request, never store it in a global.\n\nConfigure the pool — the defaults are unlimited open connections and no\nlifetime:\n\n| Setting | Why |\n|---|---|\n| `SetMaxOpenConns` | Per process: the server's `max_connections` minus admin headroom, divided by every process that shares it at peak — replicas during a rolling deploy, workers, migration jobs |\n| `SetMaxIdleConns` | Same as max open, or connections churn under load |\n| `SetConnMaxLifetime` | Rotate through load balancers and credential changes |\n| `SetConnMaxIdleTime` | Release idle connections back to the server |\n\nAn exhausted pool shows `db.Stats().WaitCount` climbing and every endpoint slow\nat once. Fix it where connections are held: rows left open, or a transaction\nkept across a network call. Raising `SetMaxOpenConns` past that budget only\nmoves the queue into the database. Instances that scale without a fixed count\nshare the budget through a pooler such as PgBouncer. Behind PgBouncer in\ntransaction pooling, pgx's default named prepared statements need PgBouncer\n1.21+ with `max_prepared_statements` > 0; otherwise set\n`default_query_exec_mode=exec` in the DSN.\n\nA read that must see this request's own write — the response to a create, an\nidempotency-key or permission check — goes to the primary pool; a replica\nanswers from before the write.\n\n---\n\n## Rows: Close and Check `Err`\n\n```go\nrows, err := db.QueryContext(ctx, q, customerID)\nif err != nil {\n    return nil, fmt.Errorf(\"list orders: %w\", err)\n}\ndefer rows.Close()\n\nvar orders []Order\nfor rows.Next() {\n    var o Order\n    if err := rows.Scan(&o.ID, &o.Total); err != nil {\n        return nil, fmt.Errorf(\"scan order: %w\", err)\n    }\n    orders = append(orders, o)\n}\nif err := rows.Err(); err != nil {\n    return nil, fmt.Errorf(\"list orders: %w\", err)\n}\nreturn orders, nil\n```\n\n- `rows.Err()` after the loop is not optional — a dropped connection ends the\n  loop silently and looks like an empty result. `rowserrcheck` flags it.\n- `defer rows.Close()` immediately after the error check; `sqlclosecheck`\n  flags a missing close.\n- Name the columns. `SELECT *` into a positional `Scan` returns\n  `sql: expected 6 destination arguments in Scan, not 5` on every row once a\n  migration adds a column — on each instance still on the old binary, the\n  expand step of expand-contract.\n- For lookups, match `sql.ErrNoRows` with `errors.Is` and map it to the domain\n  sentinel (`ErrNotFound`) at the repository boundary. For writes with\n  `RETURNING`, interpret a missing row according to the write contract. Keep\n  `sql.ErrNoRows` out of handlers — [go-error-handling](..\u002Fgo-error-handling\u002FSKILL.md) owns wrapping.\n- A value that must be unique is decided by its constraint, not by a lookup\n  before the `INSERT`: two concurrent requests both pass the lookup. Insert,\n  then map the violation to the domain sentinel — with pgx,\n  `pgErr, ok := errors.AsType[*pgconn.PgError](err); ok && pgErr.Code == \"23505\"`\n  (`pgErr.ConstraintName` names the key) — or write `ON CONFLICT DO NOTHING`\n  and read zero rows affected as the conflict.\n\n---\n\n## Transactions\n\n```go\ntx, err := db.BeginTx(ctx, nil)\nif err != nil {\n    return fmt.Errorf(\"begin: %w\", err)\n}\ndefer tx.Rollback() \u002F\u002F no-op after Commit; the ErrTxDone it returns is expected\n\n\u002F\u002F every statement of the unit runs on tx\n\nif err := tx.Commit(); err != nil {\n    return fmt.Errorf(\"commit transfer: %w\", err)\n}\nreturn nil\n```\n\n- Lock the rows the transaction writes in one fixed order —\n  `SELECT … WHERE id IN (…) ORDER BY id FOR UPDATE` — whichever way the money\n  moves: opposite transfers that lock from-then-to deadlock each other.\n- A write that must hit a row is `UPDATE … RETURNING id` read with `Scan`: a\n  missing row comes back as `sql.ErrNoRows`, mapped to `ErrNotFound`, and the\n  deferred rollback undoes the other side. A bare `ExecContext` succeeds on\n  zero rows and would commit the debit alone. The whole transfer is in\n  [SQL-PATTERNS.md](references\u002FSQL-PATTERNS.md#transaction-helper).\n- Check the `Commit` error; under Repeatable Read or Serializable any statement\n  can also fail with 40001, so the retry reruns the whole transaction on\n  either ([SQL-PATTERNS.md](references\u002FSQL-PATTERNS.md)).\n- Everything inside uses `tx`, never `db`: a `db` call inside a transaction\n  takes a second connection and deadlocks the pool at its limit.\n- Keep transactions short: no network calls, no user waits, no logging that\n  blocks. Lock order is part of the contract — same order everywhere.\n\n---\n\n## Parameters, Never Concatenation\n\n> **Normative**: Every value goes through a placeholder (`$N`, `?`). A value\n> formatted into SQL with `fmt.Sprintf` or `+` is an injection, full stop.\n\nIdentifiers that vary — a sort column, a table suffix — come from an allow-list\nswitch in Go, never from input. `gosec` in the lint gate flags string-built\nqueries; [go-security](..\u002Fgo-security\u002FSKILL.md) owns the threat model.\n\n---\n\n## Queries in Loops\n\nA query inside `for _, o := range orders` is the most common performance bug in\na service. Fix it with one query — `= ANY` over the IDs as one array\nparameter (pgx), an expanded `IN (...)`, or a `JOIN` — then map in Go.\nUnbounded lists take a `LIMIT` and keyset pagination (`WHERE id >` the last ID\nserved, `ORDER BY id`); deep `OFFSET` scans everything it skips.\n\nMeasure before restructuring: `EXPLAIN (ANALYZE, BUFFERS)` on the real\ndatabase decides whether an index or a rewrite is the fix.\n[go-performance](..\u002Fgo-performance\u002FSKILL.md) owns the benchmark discipline.\n\n---\n\n## Nullable Columns and Migrations\n\n- Use `NOT NULL` when the domain requires a value, and defaults only when\n  they have domain meaning. Preserve absent versus empty\u002Fzero values. Scan\n  nullable columns into `sql.Null[T]` (Go 1.22+) or a pointer; scanning `NULL`\n  into a `string` is a runtime error.\n- Migrations are versioned, forward-only files shipped with the binary via\n  `\u002F\u002Fgo:embed` ([go-packages](..\u002Fgo-packages\u002FSKILL.md)) and applied by a\n  migration step at deploy — never from `init()`. Each one states its rollback\n  or says it has none.\n\n---\n\n## Testing\n\nIntegration tests run against a real database (a container or a CI service),\nnot a mocked driver — a mock proves the code calls the mock. Unit-test only the\nrow-to-struct mapping. [go-testing](..\u002Fgo-testing\u002FSKILL.md) owns the\nintegration harness — build tag, DSN from the environment, skip when unset —\nin [`go-testing\u002Freferences\u002FINTEGRATION.md`](..\u002Fgo-testing\u002Freferences\u002FINTEGRATION.md#real-databases).\n\n> **Validation**: `golangci-lint run` with `rowserrcheck`, `sqlclosecheck`,\n> `noctx`, and `gosec` from the [go-linting](..\u002Fgo-linting\u002FSKILL.md) baseline,\n> then `go test -tags integration -race .\u002F...`. Report a skipped\n> integration run as skipped.\n\n---\n\n## Related Skills\n\n- [go-resilience](..\u002Fgo-resilience\u002FSKILL.md): idempotency, replay budgets, atomicity across remote side effects.\n- [go-context](..\u002Fgo-context\u002FSKILL.md): query timeouts and what may outlive the request.\n- [go-http](..\u002Fgo-http\u002FSKILL.md): the handler that calls the repository and maps its errors to status codes.\n","# Go Database Access\n\n> Compatibility: Baseline Go 1.27 (see [COMPATIBILITY.md](..\u002Fgo-style-core\u002Freferences\u002FCOMPATIBILITY.md)). Go examples use\n> `database\u002Fsql`; `sql.Null[T]` requires Go 1.22+.\n\n## Resource Routing\n\n- `references\u002FSQL-PATTERNS.md` - Read when writing the rows loop, a transaction helper, nullable columns, batch lookups, keyset pagination, or pool settings — the full code for each rule below.\n- [references\u002FPOSTGRESQL.md](references\u002FPOSTGRESQL.md) - Read for PostgreSQL schema design, constraints, indexes, upserts, or migrations on live tables. Check the target PostgreSQL version; these rules do not apply to other databases.\n\n## Stdlib First\n\n> **Normative**: `database\u002Fsql` plus a driver covers most services. An ORM is\n> a new module, the last rung of the dependency ladder in\n> [go-packages](..\u002Fgo-packages\u002FSKILL.md).\n\n```\nWhat does the repository already use?\n├─ Nothing yet        → database\u002Fsql (+ pgx stdlib driver for Postgres)\n├─ Needs typed, generated queries → sqlc over database\u002Fsql\n├─ Postgres-only, hot path        → pgx native (batches, COPY, typed scans)\n└─ An ORM already     → keep it; WithContext on every call, Select the columns,\n                        Preload\u002FJoins instead of a query per row\n```\n\npgx native means one `*pgxpool.Pool` per process from `pgxpool.New(ctx, dsn)`\n— a `*pgx.Conn` is not safe for concurrent use — and rows read with\n`pgx.CollectRows(rows, pgx.RowToStructByName[T])`, which closes them and\nreturns their error.\n\n---\n\n## Every Query Carries a Context\n\n> **Normative**: `QueryContext`, `QueryRowContext`, `ExecContext`, `BeginTx`.\n> The ctx-less forms are unbounded and `noctx` in the lint gate flags them.\n\n---\n\n## `*sql.DB` Is a Pool\n\nOpen once in `run()`, `PingContext` to fail fast, inject it into repositories.\nNever open per request, never store it in a global.\n\nConfigure the pool — the defaults are unlimited open connections and no\nlifetime:\n\n| Setting | Why |\n|---|---|\n| `SetMaxOpenConns` | Per process: the server's `max_connections` minus admin headroom, divided by every process that shares it at peak — replicas during a rolling deploy, workers, migration jobs |\n| `SetMaxIdleConns` | Same as max open, or connections churn under load |\n| `SetConnMaxLifetime` | Rotate through load balancers and credential changes |\n| `SetConnMaxIdleTime` | Release idle connections back to the server |\n\nAn exhausted pool shows `db.Stats().WaitCount` climbing and every endpoint slow\nat once. Fix it where connections are held: rows left open, or a transaction\nkept across a network call. Raising `SetMaxOpenConns` past that budget only\nmoves the queue into the database. Instances that scale without a fixed count\nshare the budget through a pooler such as PgBouncer. Behind PgBouncer in\ntransaction pooling, pgx's default named prepared statements need PgBouncer\n1.21+ with `max_prepared_statements` > 0; otherwise set\n`default_query_exec_mode=exec` in the DSN.\n\nA read that must see this request's own write — the response to a create, an\nidempotency-key or permission check — goes to the primary pool; a replica\nanswers from before the write.\n\n---\n\n## Rows: Close and Check `Err`\n\n```go\nrows, err := db.QueryContext(ctx, q, customerID)\nif err != nil {\n    return nil, fmt.Errorf(\"list orders: %w\", err)\n}\ndefer rows.Close()\n\nvar orders []Order\nfor rows.Next() {\n    var o Order\n    if err := rows.Scan(&o.ID, &o.Total); err != nil {\n        return nil, fmt.Errorf(\"scan order: %w\", err)\n    }\n    orders = append(orders, o)\n}\nif err := rows.Err(); err != nil {\n    return nil, fmt.Errorf(\"list orders: %w\", err)\n}\nreturn orders, nil\n```\n\n- `rows.Err()` after the loop is not optional — a dropped connection ends the\n  loop silently and looks like an empty result. `rowserrcheck` flags it.\n- `defer rows.Close()` immediately after the error check; `sqlclosecheck`\n  flags a missing close.\n- Name the columns. `SELECT *` into a positional `Scan` returns\n  `sql: expected 6 destination arguments in Scan, not 5` on every row once a\n  migration adds a column — on each instance still on the old binary, the\n  expand step of expand-contract.\n- For lookups, match `sql.ErrNoRows` with `errors.Is` and map it to the domain\n  sentinel (`ErrNotFound`) at the repository boundary. For writes with\n  `RETURNING`, interpret a missing row according to the write contract. Keep\n  `sql.ErrNoRows` out of handlers — [go-error-handling](..\u002Fgo-error-handling\u002FSKILL.md) owns wrapping.\n- A value that must be unique is decided by its constraint, not by a lookup\n  before the `INSERT`: two concurrent requests both pass the lookup. Insert,\n  then map the violation to the domain sentinel — with pgx,\n  `pgErr, ok := errors.AsType[*pgconn.PgError](err); ok && pgErr.Code == \"23505\"`\n  (`pgErr.ConstraintName` names the key) — or write `ON CONFLICT DO NOTHING`\n  and read zero rows affected as the conflict.\n\n---\n\n## Transactions\n\n```go\ntx, err := db.BeginTx(ctx, nil)\nif err != nil {\n    return fmt.Errorf(\"begin: %w\", err)\n}\ndefer tx.Rollback() \u002F\u002F no-op after Commit; the ErrTxDone it returns is expected\n\n\u002F\u002F every statement of the unit runs on tx\n\nif err := tx.Commit(); err != nil {\n    return fmt.Errorf(\"commit transfer: %w\", err)\n}\nreturn nil\n```\n\n- Lock the rows the transaction writes in one fixed order —\n  `SELECT … WHERE id IN (…) ORDER BY id FOR UPDATE` — whichever way the money\n  moves: opposite transfers that lock from-then-to deadlock each other.\n- A write that must hit a row is `UPDATE … RETURNING id` read with `Scan`: a\n  missing row comes back as `sql.ErrNoRows`, mapped to `ErrNotFound`, and the\n  deferred rollback undoes the other side. A bare `ExecContext` succeeds on\n  zero rows and would commit the debit alone. The whole transfer is in\n  [SQL-PATTERNS.md](references\u002FSQL-PATTERNS.md#transaction-helper).\n- Check the `Commit` error; under Repeatable Read or Serializable any statement\n  can also fail with 40001, so the retry reruns the whole transaction on\n  either ([SQL-PATTERNS.md](references\u002FSQL-PATTERNS.md)).\n- Everything inside uses `tx`, never `db`: a `db` call inside a transaction\n  takes a second connection and deadlocks the pool at its limit.\n- Keep transactions short: no network calls, no user waits, no logging that\n  blocks. Lock order is part of the contract — same order everywhere.\n\n---\n\n## Parameters, Never Concatenation\n\n> **Normative**: Every value goes through a placeholder (`$N`, `?`). A value\n> formatted into SQL with `fmt.Sprintf` or `+` is an injection, full stop.\n\nIdentifiers that vary — a sort column, a table suffix — come from an allow-list\nswitch in Go, never from input. `gosec` in the lint gate flags string-built\nqueries; [go-security](..\u002Fgo-security\u002FSKILL.md) owns the threat model.\n\n---\n\n## Queries in Loops\n\nA query inside `for _, o := range orders` is the most common performance bug in\na service. Fix it with one query — `= ANY` over the IDs as one array\nparameter (pgx), an expanded `IN (...)`, or a `JOIN` — then map in Go.\nUnbounded lists take a `LIMIT` and keyset pagination (`WHERE id >` the last ID\nserved, `ORDER BY id`); deep `OFFSET` scans everything it skips.\n\nMeasure before restructuring: `EXPLAIN (ANALYZE, BUFFERS)` on the real\ndatabase decides whether an index or a rewrite is the fix.\n[go-performance](..\u002Fgo-performance\u002FSKILL.md) owns the benchmark discipline.\n\n---\n\n## Nullable Columns and Migrations\n\n- Use `NOT NULL` when the domain requires a value, and defaults only when\n  they have domain meaning. Preserve absent versus empty\u002Fzero values. Scan\n  nullable columns into `sql.Null[T]` (Go 1.22+) or a pointer; scanning `NULL`\n  into a `string` is a runtime error.\n- Migrations are versioned, forward-only files shipped with the binary via\n  `\u002F\u002Fgo:embed` ([go-packages](..\u002Fgo-packages\u002FSKILL.md)) and applied by a\n  migration step at deploy — never from `init()`. Each one states its rollback\n  or says it has none.\n\n---\n\n## Testing\n\nIntegration tests run against a real database (a container or a CI service),\nnot a mocked driver — a mock proves the code calls the mock. Unit-test only the\nrow-to-struct mapping. [go-testing](..\u002Fgo-testing\u002FSKILL.md) owns the\nintegration harness — build tag, DSN from the environment, skip when unset —\nin [`go-testing\u002Freferences\u002FINTEGRATION.md`](..\u002Fgo-testing\u002Freferences\u002FINTEGRATION.md#real-databases).\n\n> **Validation**: `golangci-lint run` with `rowserrcheck`, `sqlclosecheck`,\n> `noctx`, and `gosec` from the [go-linting](..\u002Fgo-linting\u002FSKILL.md) baseline,\n> then `go test -tags integration -race .\u002F...`. Report a skipped\n> integration run as skipped.\n\n---\n\n## Related Skills\n\n- [go-resilience](..\u002Fgo-resilience\u002FSKILL.md): idempotency, replay budgets, atomicity across remote side effects.\n- [go-context](..\u002Fgo-context\u002FSKILL.md): query timeouts and what may outlive the request.\n- [go-http](..\u002Fgo-http\u002FSKILL.md): the handler that calls the repository and maps its errors to status codes.\n",{"name":5,"description":7},"main","59ac8ac7a0dd394878aaa0a7a7ecbc227356739f","skills\u002Fgo-database",2,"https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills","https:\u002F\u002Fgithub.com\u002Fh0rn3t","2026-11-14 04:23:12",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add h0rn3t\u002Fgolang-skills --skill go-database",{"tool":37,"command":38},"bunx","bunx skills add h0rn3t\u002Fgolang-skills --skill go-database",{"tool":40,"command":41},"pnpm","pnpm dlx skills add h0rn3t\u002Fgolang-skills --skill go-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-database\u002FSKILL.md",true,[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002FPOSTGRESQL.md","REFERENCE","参考文档",6440,"https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-database\u002Freferences\u002FPOSTGRESQL.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002FSQL-PATTERNS.md",7792,"https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-database\u002Freferences\u002FSQL-PATTERNS.md",[56,63,70,77,84,91],{"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},"01M7BQEMJBPJWY6CCGVKW27SH0","go-troubleshooting","Use when investigating a bug or ticket in a Go service whose cause is unknown — wrong or missing results, tenant-specific behavior, a regression, stage\u002Fprod\u002FCI differences, a panic, hang, deadlock, leak, unexplained CPU\u002FRSS growth, or a flaky test. Also use for pasted stack traces, profiles, logs, or requests to find a Go issue's root cause, even without the word debug. Does not cover rewriting ticket text, implementing an already-diagnosed fix alone (use its topic skill), or optimizing a known bottleneck (see go-performance).","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-troubleshooting\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},"01M7BQEFVSRHNDND750SB69WD8","go-testing","Use when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff. Also use when a user asks to write a test for a Go function, even if they don't mention specific patterns like table-driven tests or subtests. Does not cover benchmark performance testing (see go-performance).","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-testing\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},"01M7BQEA2DRH6H6WFYNJYJJRQQ","go-style-core","Use when resolving Go style or language mechanics such as formatting, nesting, declarations, initialization, scope, shadowing, loops, switches, or enum zero values. API design, naming, errors, and tests have specialized skills.","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-style-core\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7BQE3D1H45ANCXAWCS55CDK","go-security","Use when writing or reviewing Go code that touches untrusted input, secrets, or credentials — SQL, shell, or template injection, path traversal, SSRF, cookies and security headers, password hashing, TLS settings, token comparison, or what may appear in a log line. Also use when a handler accepts a file name, URL, or command argument from a client, or when asked to find \"vulnerabilities\", even if the user never says \"security\". Does not cover the os.Root and crypto\u002Frand mechanics (see go-defensive) or the dependency CVE scan in the gate (see go-linting).","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-security\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7BQDZYHG2YRJA3J26HFPKR7","go-resilience","Use when handling Go dependency failures or overload with retries, backoff\u002Fjitter, budgets, idempotency, duplicate delivery, circuit breakers, bulkheads, rate limits, backpressure, or degradation. Unknown root causes belong to go-troubleshooting.","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-resilience\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7BQDVG7DH2G9Z97Y8H3P3E9","go-performance","Use when optimizing slow or performance-critical Go code, allocations, string concatenation in loops, or benchmarks. Also use when writing or reviewing a cache, including implementing one from a stub — its key, its expiry, and how a miss loads. Concurrent code patterns belong to go-concurrency.","https:\u002F\u002Fgithub.com\u002Fh0rn3t\u002Fgolang-skills\u002Fblob\u002Fmain\u002Fskills\u002Fgo-performance\u002FSKILL.md",[],[]]