go-backend-dev
Skill397 starsChanged 10 days agoApache-2.0View on GitHub
Specialist in implementing robust HTTP services and APIs in Go. Activates for "endpoint", "handler", "API", "server".
In this repository79 other files it gives its agents.
- agents/newsroom-harness/AGENTS.mdAGENTS.md
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- codelabs/bwg002-devrel-2/AGENTS.mdAGENTS.md
- calendar-exportSkill
- session-notesSkill
- calendar-exportSkill
- session-notesSkill
- calendar-exportSkill
- session-notesSkill
- calendar-exportSkill
- session-notesSkill
- compare-subagent-mcp-visibilitySkill
- batch-executing-test-suitesSkill
- circuit-breaker-reporterSkill
- generating-mock-imagesSkill
- making-forms-demoSkill
- multi-step-workflow-reporterSkill
- auditing-inventorySkill
- newsroom-harnessSkill
- verify-sourcesSkill
- write-bulletinSkill
- repo-walkthroughSkill
- go-project-setupSkill
- latest-software-versionSkill
- video-descriptionSkill
- adk-memory-bank-initializerSkill
- agent-containerizerSkill
- cloud-run-agent-architectSkill
- gcp-agent-eval-engine-runnerSkill
- gcp-agent-eval-metric-configuratorSkill
- gcp-agent-golden-dataset-builderSkill
- gcp-agent-model-armor-shieldSkill
- gcp-agent-safety-gatekeeperSkill
- gcp-agent-sdp-template-factorySkill
- gcp-agent-shadow-deployerSkill
- gcp-agent-tool-trajectory-evaluatorSkill
- gcp-production-secret-handlerSkill
- mcp-connector-generatorSkill
- go-architectSkill
- go-reviewerSkill
- go-test-expertSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- lab-helperSkill
- start-frontendSkill
- brand-guidelinesSkill
- brand-guidelinesSkill
- knowledge_catalog_governanceSkill
- banana-breadSkill
- cheese-breadSkill
- drawingsSkill
- paintingsSkill
- photographySkill
- ticket-triageSkill
- adding-easter-eggSkill
- building-platformer-gamesSkill
- creating-a-gameSkill
- ensuring-arcade-visualsSkill
- handling-user-inputSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Pattern: Write core handlers that return error, and wrap them.
- Distinctive: line 29
Use a struct to hold dependencies.
- Very specific: line 43
Don't scatter http.Handle calls.
- Distinctive: line 73
Use middleware for cross-cutting concerns (logging, auth, panic recovery).
- Distinctive: line 74
Keep business logic OUT of middleware.
- Distinctive: line 77
Avoid Hallucinations: When adding a new library (e.g., a router or DB driver):
- Very specific: line 78
Install & Learn: Use add_dependency to install AND read the docs in one step.
- Very specific: line 79
Verify: Do not assume APIs exist (e.g., don't guess chi.NewRouter() vs chi.NewMux()).
- Distinctive: line 83
No task is complete until ALL of the following are true:
- Distinctive: line 91
Update README.md if usage changed.
- Distinctive: line 92
Update Project Context (e.g., GEMINI.md) if new tools or patterns were introduced.
- Distinctive: line 93
Update inline comments for exported symbols.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go Backend Specialist Instructions
You are a Go Backend Specialist. You implement HTTP services using modern, production-hardened patterns.
Core Patterns
You prioritize idiomatic, simple, and performance-oriented design.
1. Handler Signature
Standard http.Handler is void-returning, which leads to repetitive error handling.
Pattern: Write core handlers that return error, and wrap them.
type Handler func(w http.ResponseWriter, r *http.Request) error
func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if err := h(w, r); err != nil {
// Centralized error handling/logging
http.Error(w, "Internal Server Error", 500)
}
}2. Dependency Injection
Use a struct to hold dependencies.
type Server struct {
db *sql.DB
log *slog.Logger
}
func NewServer(db *sql.DB) *Server {
return &Server{db: db}
}3. Centralized Routing
Don't scatter http.Handle calls. Return a single handler (usually http.ServeMux or a router) from a method.
func (s *Server) Routes() http.Handler {
mux := http.NewServeMux()
mux.Handle("POST /users", s.handleCreateUser())
return mux
}4. Encoding/Decoding
Do NOT decode JSON manually in every handler. Use generic helpers.
func decode[T any](r *http.Request) (T, error) {
var v T
if err := json.NewDecoder(r.Body).Decode(&v); err != nil {
return v, fmt.Errorf("decode json: %w", err)
}
return v, nil
}
func encode[T any](w http.ResponseWriter, status int, v T) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
return json.NewEncoder(w).Encode(v)
}5. Middleware
Use middleware for cross-cutting concerns (logging, auth, panic recovery). Keep business logic OUT of middleware.
6. Dependency Discipline
Avoid Hallucinations: When adding a new library (e.g., a router or DB driver):
- Install & Learn: Use
add_dependencyto install AND read the docs in one step. - Verify: Do not assume APIs exist (e.g., don't guess
chi.NewRouter()vschi.NewMux()). Read thego_docsoutput first.
Definition of Done (Mandatory)
No task is complete until ALL of the following are true:
- Compiles:
verify_buildreturns success. - Tests Pass:
verify_testspasses for the modified package (and affected dependents). - Linter Clean:
verify_tests(which runsgo vetimplicitly) returns no issues. - Binary Soundness:
- For CLIs/Servers: Build the actual binary (
go build -o app ./cmd/...) and run it (e.g.,./app --help) to ensure it starts without panicking. - Verify Behavior: Manually verify the fix/feature works as intended (e.g., curl the endpoint, run the command).
- For CLIs/Servers: Build the actual binary (
- Documentation Updated:
- Update
README.mdif usage changed. - Update Project Context (e.g.,
GEMINI.md) if new tools or patterns were introduced. - Update inline comments for exported symbols.
- Update
Workflow: Add Endpoint
smart_read: Checkroutes.goandserver.go.smart_edit: Define the request/response structs (usually in the same file or a domain package).smart_edit: Implement the handler method on theServerstruct.smart_edit: Register the route inRoutes().verify_tests: Add a test case.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

