
Golang Popular Libraries
Choose Go libraries with stdlib-first discipline—especially JSON—after profiling instead of defaulting to popular third-party stacks.
Overview
Golang Popular Libraries is an agent skill for the Build phase that guides stdlib-first Go dependency choices with profiling-backed justification for third-party libraries.
Install
npx skills add https://github.com/samber/cc-skills-golang --skill golang-popular-librariesWhat is this skill?
- Stdlib-first JSON rule: prefer encoding/json until pprof proves JSON is the bottleneck
- Pushback scenarios train agents to reject premature jsoniter or sonic adoption
- Frames thousands of RPS as insufficient alone to justify extra dependencies
- Part of cc-skills-golang eval-style traps with explicit behavioral assertions
- Encodes popular-library guidance as decision prompts, not a flat package list
- Eval trap scenario documents four behavioral assertions for stdlib-first JSON guidance
- Worked example context cites thousands of JSON requests per second without automatic third-party justification
Adoption & trust: 3.8k installs on skills.sh; 2k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent keeps recommending fast JSON or utility libraries before you have proof the standard library is actually limiting your Go API.
Who is it for?
Solo Go backend builders choosing JSON and common libraries for APIs and CLIs who want measured dependency discipline.
Skip if: Teams that already profiled JSON as the bottleneck and need a focused migration guide only—skip the pedagogy and implement.
When should I use this skill?
Choosing Go libraries for APIs or services, debating encoding/json versus faster JSON packages, or when a colleague recommends popular libraries before profiling.
What do I get? / Deliverables
You get stdlib-first recommendations with explicit profiling gates and pushback on premature popular-library adoption.
- Stdlib-first library recommendation with profiling caveats
- Explicit pushback rationale against premature third-party JSON libraries
Recommended Skills
Journey fit
How it compares
Opinionated Go library selection coaching, not a generated go.mod or automated benchmark runner.
Common Questions / FAQ
Who is golang-popular-libraries for?
Indie and solo developers shipping Go APIs or CLIs with Claude Code, Cursor, or Codex who want agents to respect stdlib-first and profiling norms.
When should I use golang-popular-libraries?
During Build backend work when picking JSON libraries, reviewing colleague advice about jsoniter or sonic, or when designing high-throughput handlers before adding dependencies.
Is golang-popular-libraries safe to install?
It is guidance-only with no mandated network installs in the excerpt; review the Security Audits panel on this Prism page and read the full cc-skills-golang repo for any eval scripts.
SKILL.md
READMESKILL.md - Golang Popular Libraries
[ { "id": 1, "name": "stdlib-first-json", "description": "encoding/json should be tried first even for high-throughput use cases; third-party libraries are only justified after profiling confirms JSON is the bottleneck", "prompt": "I'm building a high-throughput Go API that processes thousands of JSON requests per second. A colleague says: 'You should use jsoniter or sonic from the start — encoding/json is known to be slow and you'll need the performance. There's no reason to start with a worse library when we know we'll need the fast one.' Is this advice correct? What JSON library should I use?", "trap": "The colleague's argument sounds pragmatic — why start with a known-slower library if you'll switch later anyway? But the skill teaches stdlib-first: add dependencies only when profiling confirms they are the bottleneck. The model should push back on the colleague and recommend starting with encoding/json.", "assertions": [ {"id": "1.1", "text": "Pushes back on the colleague's advice — recommends starting with encoding/json despite the high-throughput context"}, {"id": "1.2", "text": "Explains that the standard library should be the default until profiling confirms JSON is actually the bottleneck"}, {"id": "1.3", "text": "Notes that encoding/json may be sufficient — thousands of requests per second does not automatically justify a third-party library"}, {"id": "1.4", "text": "Recommends profiling first (pprof) before reaching for jsoniter or sonic"}, {"id": "1.5", "text": "If mentioning alternatives (jsoniter, sonic), frames them as options for after measurement proves stdlib is insufficient, not as defaults"} ] }, { "id": 2, "name": "pgx-over-lib-pq", "description": "Tests whether the model recommends pgx over lib/pq for PostgreSQL when advanced features or performance matter", "prompt": "I'm starting a new Go project that needs to connect to PostgreSQL. Which driver should I use?", "trap": "Without the skill, the model recommends lib/pq because it's more commonly seen in tutorials, missing that pgx is faster and has more features", "assertions": [ {"id": "2.1", "text": "Recommends pgx (github.com/jackc/pgx) as the primary recommendation"}, {"id": "2.2", "text": "Mentions that pgx is faster than lib/pq"}, {"id": "2.3", "text": "Notes that pgx supports all PostgreSQL types and advanced features"}, {"id": "2.4", "text": "May mention lib/pq as an alternative but positions pgx as the preferred choice"}, {"id": "2.5", "text": "Does NOT recommend lib/pq as the primary choice without mentioning pgx"} ] }, { "id": 3, "name": "chi-for-minimal-router", "description": "Tests whether the model recommends chi for lightweight routing needs instead of full frameworks", "prompt": "I need a simple HTTP router for my Go REST API. It just needs path parameters and middleware support. I want to stay close to net/http. What should I use?", "trap": "Without the skill, the model recommends Gin or Echo (full frameworks) when chi's lightweight, net/http-compatible router is a better fit", "assertions": [ {"id": "3.1", "text": "Recommends chi (github.com/go-chi/chi) as a strong match for the stated requirements"}, {"id": "3.2", "text": "Explains that chi is lightweight and composes well with net/http"}, {"id": "3.3", "text": "Notes that chi has minimal dependencies"}, {"id": "3.4", "text": "May mention Gin/Echo as alternatives but positions chi as the better fit for staying close to net/http"}, {"id": "3.5", "text": "Does NOT recommend a full framework (Gin, Echo, Fiber) as the primary choice when the user explicitly wants to stay close to net/http"} ] }, { "id": 4, "name": "slog-over-external-loggers", "description": "Tests whether the model considers log/slog (Go 1.21+) before recommending external logging libraries", "prompt": "I need structured l