stevenacoffman/tool-reference
Reference skills for tools: Terraform, gh, gqlgen, genqlient, sqlc, pgxpool, leafwiki, and Go test tooling.
Use when writing Go code that calls a GraphQL API with genqlient (github.com/Khan/genqlient): genqlient.yaml config, .graphql operations, @genqlient directives, generated code, authenticated clients, errors and partial data, scalar and type bindings, nullable fields, fragments, and tests.
Use when performing any GitHub operation from the command line with the gh CLI: creating PRs, managing issues, checking Actions status, working with releases, gists, codespaces, or organizations.
Use when the user wants to create, push, rebase, sync, navigate, or view stacks of dependent PRs with the gh-stack GitHub CLI extension: stacked diffs, dependent pull requests, branch chains, and incremental code review.
Use when the user asks about change-aware testing, affected tests, or avoiding a full test suite run. Covers gta (Go Test Affected) to find and run only the packages affected by current changes.
Use when the user asks to run tests, write tests, check coverage, debug test failures, or use gotestsum. Covers running and writing Go tests in this 19-module workspace.
Use when building a GraphQL server in Go with gqlgen (github.com/99designs/gqlgen): gqlgen.yml, code generation, resolvers and dependency injection, schema design, middleware, dataloaders for N+1, errors, subscriptions, custom directives, resolver tests, and Apollo Federation.
Use when running or curating an LLM wiki or other self-hosted wiki knowledge base with LeafWiki (Go, markdown on disk under data/root/): editing or ingesting pages, resyncing after external edits, wiki lint passes, and adding frontmatter so pages are also valid Open Knowledge Format (OKF) concepts.
Use when writing property-based or metamorphic tests in Go with rapid (pgregory.net/rapid): PBT, generative or randomized testing, metamorphic relations, or code with no test oracle, whose outputs vary between runs, or that is concurrent or nondeterministic.
Use when setting up database connections, tuning pool settings, or using the DBTX interface. Covers creating and configuring PostgreSQL connection pools in this repo with pgxpool.
Use when writing SQL queries, regenerating sqlc code, or calling generated Querier methods. Covers generating and using sqlc-generated Go code in this repo.
Use when Terraform errors on variables in a backend block, when sharing backend configuration across environments without copy-paste, or when setting up an S3 and DynamoDB remote backend for the first time.
Use when managing multiple Terraform environments (staging, production), asking whether workspaces give enough isolation, or preventing a staging change from reaching production.
Use when creating multiple Terraform resources with count where items have distinct names, IDs, or settings, or when removing one item destroys seemingly unrelated resources. Prefer for_each.
Use when a Terraform module or configuration is large or monolithic, when deciding whether to split a module, or when plan and apply are slow, tests are impractical, or changes feel high-risk.
Use when renaming a Terraform resource, moving a resource into a module, or restructuring module layout without destroying and recreating live infrastructure, using moved blocks.
Use when an EKS cluster and Kubernetes resources (Deployments, Services) are in the same Terraform module, when the Kubernetes provider errors on cluster outputs, or when depends_on does not fix provider initialization.
Use when keeping secrets out of Terraform state, or asking whether sensitive = true, AWS Secrets Manager, or environment variables solve the secrets-in-state problem.