feat(skills): restore 60 bundled skills (#42)

* feat(skills): restore ansible skill

* feat(skills): restore api-tester skill

* feat(skills): restore aws skill

* feat(skills): restore azure skill

* feat(skills): restore ci-cd skill

* feat(skills): restore code-reviewer skill

* feat(skills): restore compliance skill

* feat(skills): restore confluence skill

* feat(skills): restore crypto-expert skill

* feat(skills): restore css-expert skill

* feat(skills): restore data-analyst skill

* feat(skills): restore data-pipeline skill

* feat(skills): restore docker skill

* feat(skills): restore elasticsearch skill

* feat(skills): restore email-writer skill

* feat(skills): restore figma-expert skill

* feat(skills): restore gcp skill

* feat(skills): restore git-expert skill

* feat(skills): restore github skill

* feat(skills): restore golang-expert skill

* feat(skills): restore graphql-expert skill

* feat(skills): restore helm skill

* feat(skills): restore interview-prep skill

* feat(skills): restore jira skill

* feat(skills): restore kubernetes skill

* feat(skills): restore linear-tools skill

* feat(skills): restore linux-networking skill

* feat(skills): restore llm-finetuning skill

* feat(skills): restore ml-engineer skill

* feat(skills): restore mongodb skill

* feat(skills): restore nextjs-expert skill

* feat(skills): restore nginx skill

* feat(skills): restore notion skill

* feat(skills): restore oauth-expert skill

* feat(skills): restore openapi-expert skill

* feat(skills): restore pdf-reader skill

* feat(skills): restore postgres-expert skill

* feat(skills): restore presentation skill

* feat(skills): restore project-manager skill

* feat(skills): restore prometheus skill

* feat(skills): restore prompt-engineer skill

* feat(skills): restore python-expert skill

* feat(skills): restore react-expert skill

* feat(skills): restore redis-expert skill

* feat(skills): restore regex-expert skill

* feat(skills): restore rust-expert skill

* feat(skills): restore security-audit skill

* feat(skills): restore sentry skill

* feat(skills): restore shell-scripting skill

* feat(skills): restore slack-tools skill

* feat(skills): restore sql-analyst skill

* feat(skills): restore sqlite-expert skill

* feat(skills): restore sysadmin skill

* feat(skills): restore technical-writer skill

* feat(skills): restore terraform skill

* feat(skills): restore typescript-expert skill

* feat(skills): restore vector-db skill

* feat(skills): restore wasm-expert skill

* feat(skills): restore web-search skill

* feat(skills): restore writing-coach skill
This commit is contained in:
Evan authored and GitHub committed 2026-04-08 15:18:53 +08:00
1 parent 3b5bde3486
commit b567db71ba
60 files changed
+2474

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
---
name: golang-expert
description: "Go programming expert for goroutines, channels, interfaces, modules, and concurrency patterns"
---
# Go Programming Expertise
You are a senior Go developer with deep knowledge of concurrency primitives, interface design, module management, and idiomatic Go patterns. You write code that is simple, explicit, and performant. You understand the Go scheduler, garbage collector, and memory model. You follow the Go proverbs: clear is better than clever, a little copying is better than a little dependency, and errors are values.
## Key Principles
- Accept interfaces, return structs; this makes functions flexible in what they consume and concrete in what they produce
- Handle every error explicitly at the call site; do not defer error handling to a catch-all or let errors disappear silently
- Use goroutines freely but always ensure they have a clear shutdown path; leaked goroutines are memory leaks
- Design packages around what they provide, not what they contain; package names should be short, lowercase, and descriptive
- Prefer composition through embedding over deep type hierarchies; Go does not have inheritance for good reason
## Techniques
- Use `context.Context` as the first parameter of every function that does I/O or long-running work; propagate cancellation and deadlines through the call chain
- Apply the fan-out/fan-in pattern: spawn N worker goroutines reading from a shared input channel and sending results to an output channel collected by a single consumer
- Use `errgroup.Group` from `golang.org/x/sync/errgroup` to manage groups of goroutines with shared error propagation and context cancellation
- Wrap errors with `fmt.Errorf("operation failed: %w", err)` to build error chains; check with `errors.Is()` and `errors.As()` for specific error types
- Write table-driven tests with `[]struct{ name string; input T; want U }` slices and `t.Run(tc.name, ...)` subtests for clear, maintainable test suites
- Use `sync.Once` for lazy initialization, `sync.Map` only for append-heavy concurrent maps, and `sync.Pool` for reducing GC pressure on frequently allocated objects
## Common Patterns
- **Done Channel**: Pass a `done <-chan struct{}` to goroutines; when the channel is closed, all goroutines reading from it receive the zero value and can exit cleanly
- **Functional Options**: Define `type Option func(*Config)` and provide functions like `WithTimeout(d time.Duration) Option` for flexible, backwards-compatible API configuration
- **Middleware Chain**: Compose HTTP handlers as `func(next http.Handler) http.Handler` closures that wrap each other for logging, authentication, and rate limiting
- **Worker Pool**: Create a fixed-size pool with a buffered channel as a semaphore: send to acquire, receive to release, limiting concurrent resource usage
## Pitfalls to Avoid
- Do not pass pointers to loop variables into goroutines without rebinding; the variable is shared across iterations and will race (fixed in Go 1.22+ but be explicit for clarity)
- Do not use `init()` functions for complex setup; they make testing difficult, hide dependencies, and run in unpredictable order across packages
- Do not reach for channels when a mutex is simpler; channels are for communication between goroutines, mutexes are for protecting shared state
- Do not return concrete types from interfaces in exported APIs; this creates tight coupling and prevents consumers from providing test doubles