golang
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- Engineering
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: golang
description: Use when the project uses Go for systems programming or backend services Check every error. The…
category: engineering
runtime: no special runtime
---
# golang output preview
## PART A: Task fit
- Use case: Use when the project uses Go for systems programming or backend services Check every error. The if err != nil pattern is intentional -- Go makes error handling explicit. Never discard errors with _. Wrap errors with context using fmt.Errorf("doing X: %w", err) so call chains produce readable messages. runs entirely locally. Works with Claude Code, Cursor,….
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Error Handling / Project Structure / Concurrency” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Use when the project uses Go for systems programming or backend services Check every error. The if err != nil pattern is intentional -- Go makes error handling explicit. Never discard errors with _. Wrap errors with context using fmt.Errorf("doing X: %w", err) so call chains produce readable messages. runs entirely locally. Works with Claude Code, Cursor,…”.
- **02** When the source has headings, the agent prioritizes “Error Handling / Project Structure / Concurrency” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Error Handling / Project Structure / Concurrency”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: golang
description: Use when the project uses Go for systems programming or backend services Check every error. The…
category: engineering
source: tomevault-io/skills-registry
---
# golang
## When to use
- Use when the project uses Go for systems programming or backend services Check every error. The if err != nil pattern…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Error Handling / Project Structure / Concurrency” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "golang" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Error Handling / Project Structure / Concurrency
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Go Best Practices
Error Handling
Check every error. The if err != nil pattern is intentional -- Go makes error handling explicit. Never discard errors with _. Wrap errors with context using fmt.Errorf("doing X: %w", err) so call chains produce readable messages.
Use sentinel errors (var ErrNotFound = errors.New("not found")) for expected conditions that callers check with errors.Is(). Use custom error types for errors that carry structured data.
Project Structure
Follow the standard layout: cmd/ for application entry points, internal/ for private packages, pkg/ for public libraries (if any). Keep main.go minimal -- it wires up dependencies and starts the server.
One package per directory. Package names should be short, lowercase, and descriptive. Avoid util or common packages -- they become dumping grounds.
Concurrency
Do not communicate by sharing memory -- share memory by communicating. Use channels for synchronization between goroutines. Use sync.Mutex only for protecting simple shared state where channels would be overkill.
Always ensure goroutines can be stopped. Pass context.Context and check ctx.Done(). Leaking goroutines is a memory leak that grows over time.
Use sync.WaitGroup when you need to wait for a known number of goroutines to complete. Use errgroup.Group when any goroutine failure should cancel the rest.
Interfaces
Define interfaces where they are used, not where they are implemented. Keep interfaces small -- one or two methods is ideal. The io.Reader and io.Writer interfaces are the gold standard.
Accept interfaces, return structs. This makes code testable -- callers can inject mocks that satisfy the interface.
Testing
Use table-driven tests for functions with multiple input/output combinations. Name test cases clearly. Use t.Run() for subtests so failures identify which case broke.
Use testing.T.Helper() in test helper functions so failure messages point to the calling test, not the helper.
Dependencies
Use go mod tidy to keep go.mod clean. Vendor dependencies with go mod vendor for reproducible builds in CI. Avoid unnecessary dependencies -- the standard library is comprehensive. Check if net/http, encoding/json, or os already do what you need.
Performance
Profile before optimizing with pprof. Pre-allocate slices with make([]T, 0, expectedCap) when the size is known. Avoid string concatenation in loops -- use strings.Builder. Reduce allocations by reusing buffers with sync.Pool for hot paths.
Source: calcosmic/Aether — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review