golang-context
Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or u
Asset-Profil
Coding- und Entwickler-Agents
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Szenario
Coding-Agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent-Fit
Claude Code + OpenAI Agents + CLI
Geeignet für Codex, Claude Code, Cursor, CLI oder benutzerdefinierte Agents.
Installieren
Bereit
npx skills add samber/cc-skills-golang --skill golang-context
Wartung
Aktuell
2 Tage seit dem letzten Push
Risiko
Prüfung nötig
Dependency or permission surface needs review
GitHub-Qualität
3.0K
82/100 Qualität · 79/100 Vertrauen
Abdeckungs-Tags
Review-Notizen
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent-Adoptionskarte
Vertrauen, Audit und Installationsbereitschaft auf einen Blick
Diese Werte kombinieren öffentliche Repository-Metadaten, OpenAgentSkill-Reviewsignale, Wartungsaktualität und Installationsbereitschaft. Sie helfen bei der Vorauswahl, ersetzen aber keine menschliche Prüfung.
Qualität
StarkSolid option that is likely worth shortlisting for production workflows.
Vertrauen
Nur SandboxNützlicher Kandidat mit fehlenden oder gemischten Vertrauenssignalen. Bis der Ergebniszyklus die Passung belegt, in einem isolierten Arbeitsbereich verwenden.
Audit
Prüfung nötigMaschinenlesbare Prüfung von Installationsbereitschaft, Sicherheitsmetadaten, Wartung und Akzeptanzrisiko.
OpenAgentSkill Trust Score v5
Menschliche Prüfung vor Installation
Nur in einer Sandbox ausführen und nahe Alternativen vergleichen, bevor sie produktiv eingesetzt wird.
Stars
3.0K GitHub-Stars
Repository-Aktivität
3.0K Stars und 197 Forks
Wartung
2 Tage seit dem letzten Push
Lizenz
MIT
Installieren
npx skills add samber/cc-skills-golang --skill golang-context
Installationssicherheit
Standard-Paket- oder Laufzeit-Installationspfad
Berechtigungsfläche
shell or command execution, network or browser access
Agent-Ergebnisse
Noch keine Agent-Ergebnisdaten
Dokumentation
Starker README/SKILL.md-Kontext
Risikoübersicht
Vor Produktion prüfen
- Quality score needs review
- Permission surface needs review: shell or command execution, network or browser access
- Dependency/runtime risk: command execution surface, network or browser surface
- Permission surface: shell or command execution, network or browser access
Installationsbereitschaft
Installationspfad verfügbar
- Installationspfad ist verfügbar
- Repository-Belege sind verfügbar
- Lizenz ist angegeben
- Noch keine Agent-Proven-Ergebnisbelege
Agent-lesbare Metadaten
Maschinenlesbare Entscheidungsdaten für diesen Skill.
Nutze diesen Block oder das eingebettete JSON, um zu entscheiden, ob ein Agent diesen Skill installieren, eine Alternative wählen oder zuerst menschliche Prüfung anfordern soll.
Geeignete Aufgaben
- Coding-Agents-Workflows
- Claude-Code-Teams
- Teams, die GitHub-Adoptionssignale schätzen
- Inspect source files
Geeignete Agents
Installationsentscheidung
- Befehl
- npx skills add samber/cc-skills-golang --skill golang-context
- Richtlinie
- Prüfen
- Menschliche Prüfung
- Ja
Vertrauen und Risiko
- Vertrauen
- 71/100
- Audit
- 84/100
- Risikoebene
- Prüfung nötig
Ergebnis-Loop
- Endpoint
- /api/agent/outcome
- Event-ID
- resolve
- Ergebnisse
- 5
Installationsbefehl
npx skills add samber/cc-skills-golang --skill golang-contextNicht verwenden, wenn
- Teams, die ein vom Anbieter unterstütztes SLA benötigen
- Hochregulierte Umgebungen ohne interne Sicherheitsprüfung
- No major risk signals from current metadata
- Hinweise auf Hochrisiko-Berechtigungen: Shell- oder Befehlsausführung
- Dependency or permission surface needs review
Alternative
Frontend Design
170.9K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
Taste Skill: Anti-Slop Frontend
79.0K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
Canvas Design
170.9K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
Anthropic Brand Guidelines
170.9K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent-Sicherheit v2
56/100 · Vor Installation prüfen
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
Hoch
Shell- oder Befehlsausführung
Die Skill-Metadaten verweisen auf Terminal-, CLI-, Shell-, Subprozess- oder Befehlsausführungs-Workflows.
Mittel
Netzwerkzugriff
Die Skill ruft wahrscheinlich Remote-Seiten, APIs, Repositories oder externe Dienste ab.
Mittel
Datenbankzugriff
Die Skill kann Schemata prüfen, Datenbanken abfragen oder mit persistenten Speichern arbeiten.
- Hinweise auf Hochrisiko-Berechtigungen: Shell- oder Befehlsausführung
- Dependency or permission surface needs review
Installationsziele
Diesen Skill im Agent-Workflow installieren
Über den öffentlichen Endpunkt erhältst du Befehl, Sicherheitscheckliste, Ziel-Prompts und kanonische Links.
OpenAgentSkill CLI
Resolve policy, run the source installer safely, and report a verified install receipt.
$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install samber-golang-contextAgent-Auflösungsplan
Lass einen Agent die Eignung vor der Installation prüfen.
Die Resolve API liefert die beste Skill, Alternativen, Sicherheitsrichtlinien, Auditnotizen, Installationsziel und einen direkt nutzbaren Prompt.
JSON öffnen
/api/agent/resolve?task=Use%20golang-context%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve-Text
/api/agent/resolve?task=Use%20golang-context%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Installationsübergabe
/api/skills/samber-golang-context/install
Agent sollte prüfen
- Task fit and alternatives from Resolve API.
- Audit score, trust score, and safety policy warnings.
- Install target compatibility for Codex, Claude Code, Cursor, or CLI.
Prompt kopieren
Task: Use golang-context in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20golang-context%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/samber-golang-context/install
Install command: npx skills add samber/cc-skills-golang --skill golang-context
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent-Übergabe
Gib dem Agent den Installationspfad, nicht noch ein Verzeichnis.
Über den öffentlichen Endpunkt erhältst du Befehl, Sicherheitscheckliste, Ziel-Prompts und kanonische Links.
Installationsübergabe
/api/skills/samber-golang-context/install
LLM-Textformat
/api/skills/samber-golang-context/install?format=text
Alternativen finden
/api/skills/search?q=golang-context&limit=3
Agent-Prompt
Use golang-context for this task. Review https://www.openagentskill.com/api/skills/samber-golang-context/install, then install with: npx skills add samber/cc-skills-golang --skill golang-contextRegistry-Metadaten
Agent-lesbares Profil für die automatische Skill-Auswahl.
Die Registry API stellt Entscheidungs-, Vertrauens-, Audit-, Use-Case- und Installationssignale ohne UI-Scraping bereit.
Manifest
/api/registry/manifest/samber-golang-context
LLM-Text
/api/registry/manifest/samber-golang-context?format=text
Installationsalias
/api/registry/install/samber-golang-context
Empfehlen
/api/registry/recommend?task=Use%20golang-context%20in%20an%20agent%20workflow&limit=3
Agent-Fit
Coding-Agents
Use-Case-Tags
Plattformen
Claude Code, OpenAI Agents
Audit-Bericht
Prüfung nötig · 84/100
Maschinenlesbare Prüfung von Installationsbereitschaft, Sicherheitsmetadaten, Wartung und Akzeptanzrisiko.
Agent-Entscheidungspanel
Primäre Wahl für Coding-Agents
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Rolle im Stack
Primäre Wahl
Primäre Eignung
Coding-Agents
Vertrauenslabel
Produktionsbereit
Installationspfad
Befehl bereit
Verwenden wenn
- Coding-Agents-Workflows
- Claude-Code-Teams
- Teams, die GitHub-Adoptionssignale schätzen
Evidenz
- 3,010 GitHub-Stars
- recent repository activity
- install command or GitHub repo available
- Qualitätsprofil 82/100
- 2 OpenAgentSkill-Interaktionen
zuerst prüfen
- No major risk signals from current metadata
Implementierungspfad
- 1Installieren Sie es in einem Sandbox-Agent und führen Sie eine Coding-Agents-Aufgabe vollständig aus.
- 2Compare output quality, latency, and failure behavior against at least one alternative.
- 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.
Vertrauensprofil
Nur Sandbox
Nützlicher Kandidat mit fehlenden oder gemischten Vertrauenssignalen. Bis der Ergebniszyklus die Passung belegt, in einem isolierten Arbeitsbereich verwenden.
GitHub-Akzeptanz
Bestanden3.0K GitHub-Stars
Star-/Fork-Aktivität
Info3.0K Stars und 197 Forks; Issue-Aktivität ist in den aktuellen Metadaten nicht verfügbar
Aktuelle Wartung
Bestanden2 Tage seit dem letzten Push
Lizenzklarheit
BestandenMIT
Positive Signale
- KI-Prüfung genehmigt
- Installationspfad ist verfügbar
- Repository-Belege sind verfügbar
- Kürzlich gewartetes Repository
- Aussagekräftiges GitHub-Adoptionssignal
- Der Installationsbefehl weist kein offensichtliches Hochrisikomuster auf
- Ergebniszyklus ist bereit, benötigt aber den ersten echten Agent-Lauf
Vor Installation prüfen
- Quality score needs review
- Permission surface needs review: shell or command execution, network or browser access
- Dependency/runtime risk: command execution surface, network or browser surface
- Permission surface: shell or command execution, network or browser access
- Noch keine echten Agent-Ergebnisberichte
- Vor unbeaufsichtigter Installation ist menschliche Prüfung erforderlich
Empfohlene Aktion
Nur in einer Sandbox ausführen und nahe Alternativen vergleichen, bevor sie produktiv eingesetzt wird.
Qualitätsprofil
Stark Kandidat für Agent-Workflows
Solid option that is likely worth shortlisting for production workflows.
Workflow-Eignung
Diese Skill in diesen Szenarien nutzen
Build and ship code
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Verify behavior
Testing and QA
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow-Eignung
Zum vollständigen Workflow hinzufügen
Inspect, patch, and verify code
Coding review agent
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
Frontend and UI
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
Browser QA agent
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternativen-Shortlist
Vor Installation vergleichen
Similar skills that may fit this task.
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Taste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Canvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Anthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
Übersicht
--- name: golang-context description: "Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or unexpired contexts, choosing between context.Background/TODO/WithoutCancel, or storing values in context. Not for code that merely accepts ctx as first parameter." user-invocable: true license: MIT compatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang. metadata: author: samber version: "1.3.0" openclaw: emoji: "🔗" homepage: https://github.com/samber/cc-skills-golang requires: bins: - go install: [] allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent paths: - "**/*.go" ---
> **Community default.** A company skill that explicitly supersedes `samber/cc-skills-golang@golang-context` skill takes precedence.
# Go context.Context Best Practices
`context.Context` is Go's mechanism for propagating cancellation signals, deadlines, and request-scoped values across API boundaries and between goroutines. Think of it as the "session" of a request — it ties together every operation that belongs to the same unit of work.
## Best Practices Summary
1. The same context MUST be propagated through the entire request lifecycle: HTTP handler → service → DB → external APIs 2. `ctx` MUST be the first parameter, named `ctx context.Context` 3. NEVER store context in a struct — pass explicitly through function parameters 4. NEVER pass `nil` context — use `context.TODO()` if unsure 5. `cancel()` MUST be called on all control-flow paths for `WithCancel`/`WithTimeout`/`WithDeadline`, unless ownership of the context and cancel function is explicitly returned or transferred 6. `context.Background()` MUST only be used at the top level (main, init, tests) 7. **Use `context.TODO()`** as a placeholder when you know a context is needed but don't have one yet 8. NEVER create a new `context.Background()` in the middle of a request path 9. Context value keys MUST be unexported types to prevent collisions 10. Context values MUST only carry request-scoped metadata — NEVER function parameters 11. **Use `context.WithoutCancel`** (Go 1.21+) when spawning background work that must outlive the parent request
## Creating Contexts
| Situation | Use | | --- | --- | | Entry point (main, init, test) | `context.Background()` | | Function needs context but caller doesn't provide one yet | `context.TODO()` | | Inside an HTTP handler | `r.Context()` | | Need cancellation control | `context.WithCancel(parentCtx)` | | Need a deadline/timeout | `context.WithTimeout(parentCtx, duration)` |
## Context Propagation: The Core Principle
The most important rule: **propagate the same context through the entire call chain**. When you propagate correctly, cancelling the parent context cancels all downstream work automatically.
```go // ✗ Bad — creates a new context, breaking the chain func (s *OrderService) Create(ctx context.Context, order Order) error { return s.db.ExecContext(context.Background(), "INSERT INTO orders ...", order.ID) }
// ✓ Good — propagates the caller's context func (s *OrderService) Create(ctx context.Context, order Order) error { return s.db.ExecContext(ctx, "INSERT INTO orders ...", order.ID) } ```
## Deep Dives
- **[Cancellation, Timeouts & Deadlines](./references/cancellation.md)** — How cancellation propagates: `WithCancel` for manual cancellation, `WithTimeout` for automatic cancellation after a duration, `WithDeadline` for absolute time deadlines. Patterns for listening (`<-ctx.Done()`) in concurrent code, `AfterFunc` callbacks, and `WithoutCancel` for operations that must outlive their parent request (e.g., audit logs).
- **[Context Values & Cross-Service Tracing](./references/values-tracing.md)** — Safe context value patterns: unexported key types to prevent namespace collisions, when to use context values (request ID, user ID) vs function parameters. Trace context propagation: OpenTelemetry trace headers, correlation IDs for log aggregation, and marshaling/unmarshaling context across service boundaries.
- **[Context in HTTP Servers & Service Calls](./references/http-services.md)** — HTTP handler context: `r.Context()` for request-scoped cancellation, middleware integration, and propagating to services. HTTP client patterns: `NewRequestWithContext`, client timeouts, and retries with context awareness. Database operations: always use `*Context` variants (`QueryContext`, `ExecContext`) to respect deadlines.
## Cross-References
- → See the `samber/cc-skills-golang@golang-concurrency` skill for goroutine cancellation patterns using context - → See the `samber/cc-skills-golang@golang-database` skill for context-aware database operations (QueryContext, ExecContext) - → See the `samber/cc-skills-golang@golang-observability` skill for trace context propagation with OpenTelemetry - → See the `samber/cc-skills-golang@golang-design-patterns` skill for timeout and resilience patterns
## Enforce with Linters
Many context pitfalls are caught automatically by linters: `govet`, `staticcheck`. → See the `samber/cc-skills-golang@golang-lint` skill for configuration and usage.
Technische Details
- Version
- 1.0.0
- Lizenz
- MIT
- Letzte Aktualisierung
- 20. Aug. 2026
- Veröffentlicht
- 20. Aug. 2026
Entscheidungsübersicht
Primäre Wahl
3,010 GitHub-Stars
Audit
Installationsprüfung
Installations- und Adoptionsprüfung
- Sicherheit
- 80/100
- Wartung
- 100/100
- Installieren
- 92/100
Von Agent belegte Evidenz
Von Agent belegte Evidenz
Ergebnisberichte nach Resolve, Prüfung, Installation und einem begrenzten Lauf.
- Erfolgsrate
- —
- Letzter Fehler
- —
- Ergebnisse
- 0
- Ausgabequalität
- —
- Fehlgeschlagen
- 0
- Nicht relevant
- 0
- Installationen
- 0
- Durch Risiko blockiert
- 0
- Einrichtung erforderlich
- 0
- Produktion
- 0
Noch keine Agent-Ergebnisdaten. Der erste Lauf kann Erfolg, Einrichtungsbedarf, Risikoblockaden, Fehler oder Irrelevanz über /api/agent/outcome melden.
Installieren
Zum Agent-Workflow hinzufügen
Kostenlos und Open Source. Bericht vor der Installation in Produktions-Agents prüfen.
Wachstums-Loop
Share-Kit
Szenariobasierter Entwurf für golang-context, bereit für einen manuellen X-Post.
A practical pick for design or creative work: golang-context: Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, reque... 3.0K stars https://www.openagentskill.com/skills/samber-golang-context?ref=x
Optionale Antwort mit Installationsbefehl
Listing + install path for golang-context: https://www.openagentskill.com/skills/samber-golang-context?ref=x Install: npx skills add samber/cc-skills-golang --skill golang-context
Quelle des Eintrags
Registry-indexiert
Dieser Eintrag wurde aus öffentlichen Quellen indexiert und ist erst nach Genehmigung eines Maintainer-Anspruchs offiziell.
- Ersteller
- samber
- Quelle
- samber/cc-skills-golang
- Indexiert von
- OpenAgentSkill Community-Index
Die Zuordnung verlinkt auf das öffentliche Repository oder Creator-Profil. Creator können den Eintrag beanspruchen, um Eigentümersignale zu aktualisieren.
Diesen Skill beanspruchenEigentümeranspruch
Diesen Skill-Eintrag beanspruchen
Dieser Registry-indexiert-Eintrag wird samber zugeschrieben, ist aber noch nicht offiziell markiert. Beanspruche ihn, um ein verifiziertes Eigentümersignal hinzuzufügen und künftige Launch-, Installations- und Audit-Updates vertrauenswürdiger zu machen.
Creator-Backlink-Kit
Evidenz-Badges in deine README einfügen
Zeige den kanonischen Eintrag, aktuelle Vertrauens- und Audit-Signale sowie echte Agent-Proven-Evidenz dort, wo Entwickler das Repository bewerten.
[](https://www.openagentskill.com/skills/samber-golang-context)
[](https://www.openagentskill.com/skills/samber-golang-context)
[](https://www.openagentskill.com/skills/samber-golang-context/audit)
[](https://www.openagentskill.com/skills/samber-golang-context)Autor
samber
@samber
Tags
Plattform-Fit
Gesundheitssignale
- GitHub-Stars
- 3.0K
- Qualitätswert
- 48/100
- Letzter GitHub-Push
- 20. Aug. 2026
- Framework-Hinweise
- Unbekannt
- OpenAgentSkill-Aufrufe
- 2
- Installationskopien
- 0
- Externe Klicks
- 0
Community-Signal
Teile mit, ob dieser Skill für deinen Agent-Workflow nützlich ist. Zusammengefasstes Feedback verbessert das Ranking im Laufe der Zeit.
Vertrauen & Sicherheit
Nur Sandbox
- GitHub-Akzeptanz3.0K GitHub-StarsBestanden
- Star-/Fork-Aktivität3.0K Stars und 197 Forks; Issue-Aktivität ist in den aktuellen Metadaten nicht verfügbarInfo
- Aktuelle Wartung2 Tage seit dem letzten PushBestanden
- LizenzklarheitMITBestanden
- README/SKILL.md-VollständigkeitMetadaten enthalten ausreichend Nutzungs- und Workflow-KontextBestanden
- Abhängigkeits-/Laufzeitrisikocommand execution surface, network or browser surfacePrüfen
Ähnliche Skills
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
170.9K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
79.0K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
170.9K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
170.9K Stars