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
공급 자산 프로필
코딩 및 개발 Agent
코드 리뷰, 저장소 분석, 테스트, CI, GitHub, DevOps 및 개발 워크플로용 스킬입니다.
시나리오
코딩 Agent
저장소를 이해하고 코드를 수정하며 Pull Request를 검토할 수 있는 코딩 Agent가 필요합니다.
Agent 적합도
Claude Code + OpenAI Agents + CLI
Codex, Claude Code, Cursor, CLI 또는 맞춤형 Agent에 적합합니다.
설치
준비됨
npx skills add samber/cc-skills-golang --skill golang-context
유지보수
최신
마지막 푸시 후 3일
위험
검토 필요
Dependency or permission surface needs review
GitHub 품질
3.0K
82/100 품질 · 79/100 신뢰
커버리지 태그
검토 메모
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent 채택 스코어카드
신뢰, 감사, 설치 준비 상태를 한눈에 확인하세요
이 점수는 공개 저장소 메타데이터, OpenAgentSkill 검토 신호, 유지보수 최신성, 설치 준비 상태를 결합합니다. 후보 선정 신호일 뿐, 사람의 검토를 대체하지 않습니다.
품질
강함프로덕션 워크플로 후보군에 넣을 만한 탄탄한 선택입니다.
신뢰
샌드박스 전용신뢰 신호가 부족하거나 혼재된 유용한 후보입니다. 결과 루프가 작업 적합성을 입증할 때까지 격리된 작업 공간에서 사용하세요.
감사
검토 필요설치 준비 상태, 보안 메타데이터, 유지보수 및 채택 위험에 대한 기계 판독형 검토입니다.
OpenAgentSkill 신뢰 점수 v5
설치 전 사람 검토
실제 작업에 사용하기 전 샌드박스에서만 실행하고 유사 대안과 비교하세요.
스타
GitHub 스타 3.0K
저장소 활동
스타 3.0K, 포크 197
유지보수
마지막 푸시 후 3일
라이선스
MIT
설치
npx skills add samber/cc-skills-golang --skill golang-context
설치 안전성
표준 패키지 또는 런타임 설치 경로
권한 범위
shell or command execution, network or browser access
Agent 결과
아직 Agent 결과 데이터가 없습니다
문서
README/SKILL.md 맥락이 충분합니다
위험 요약
프로덕션 전 검토
- 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
설치 준비 상태
설치 경로 사용 가능
- 설치 경로를 사용할 수 있습니다
- 저장소 근거를 사용할 수 있습니다
- 라이선스가 명시되었습니다
- 아직 Agent 검증 결과 근거가 없습니다
Agent 읽기용 메타데이터
이 스킬의 기계 판독형 의사결정 데이터.
이 블록 또는 포함된 JSON을 사용해 Agent가 이 스킬을 설치할지, 대안을 고를지, 먼저 사람의 검토를 요청할지 판단할 수 있습니다.
적합한 작업
- 코딩 Agent 워크플로
- Claude Code 팀
- GitHub 채택 신호를 중시하는 팀
- Inspect source files
적합한 Agent
설치 결정
- 명령어
- npx skills add samber/cc-skills-golang --skill golang-context
- 정책
- 검토
- 사람 검토
- 예
신뢰와 위험
- 신뢰
- 71/100
- 감사
- 84/100
- 위험 수준
- 검토 필요
결과 루프
- 엔드포인트
- /api/agent/outcome
- 이벤트 ID
- resolve
- 결과
- 5
사용하지 말아야 할 경우
- 벤더 지원 SLA가 필요한 팀
- 내부 보안 검토가 없는 고규정 준수 환경
- 현재 메타데이터에서 주요 위험 신호가 발견되지 않았습니다
- 고위험 권한 힌트: Shell 또는 명령 실행
- Dependency or permission surface needs review
Agent 안전 v2
56/100 · 설치 전 검토
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
높음
Shell 또는 명령 실행
Skill 메타데이터가 터미널, CLI, Shell, 하위 프로세스 또는 명령 실행 워크플로를 참조합니다.
중간
네트워크 접근
Skill은 원격 페이지, API, 저장소 또는 외부 서비스에 접근할 수 있습니다.
중간
데이터베이스 접근
Skill은 스키마를 검사하고 데이터베이스를 질의하거나 영구 저장소를 다룰 수 있습니다.
- 고위험 권한 힌트: Shell 또는 명령 실행
- Dependency or permission surface needs review
설치 대상
Agent 워크플로에 이 스킬 설치
공개 설치 엔드포인트에서 명령어, 안전 체크리스트, 대상 프롬프트와 정규 링크를 가져옵니다.
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 해결 계획
설치 전에 Agent가 적합성을 검증하게 하세요.
Resolve API는 최우선 스킬, 대안, 안전 정책, 감사 메모, 설치 대상 및 Agent가 페이지를 스크래핑하지 않고 사용할 수 있는 프롬프트를 반환합니다.
JSON 열기
/api/agent/resolve?task=Use%20golang-context%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve 텍스트
/api/agent/resolve?task=Use%20golang-context%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
설치 핸드오프
/api/skills/samber-golang-context/install
Agent가 확인할 항목
- Resolve API에서 작업 적합도와 대안을 확인합니다.
- 감사 점수, 신뢰 점수 및 안전 정책 경고를 확인합니다.
- Codex, Claude Code, Cursor 또는 CLI의 설치 대상 호환성을 확인합니다.
프롬프트 복사
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 핸드오프
또 다른 디렉터리 페이지 대신 설치 경로를 Agent에게 제공합니다.
공개 설치 엔드포인트에서 명령어, 안전 체크리스트, 대상 프롬프트와 정규 링크를 가져옵니다.
설치 핸드오프
/api/skills/samber-golang-context/install
LLM 텍스트 형식
/api/skills/samber-golang-context/install?format=text
대안 찾기
/api/skills/search?q=golang-context&limit=3
Agent 프롬프트
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 메타데이터
자동 스킬 선택을 위한 Agent 읽기용 프로필.
Registry API를 통해 동일한 결정, 신뢰, 감사, 사용 사례, 설치 신호를 제공하므로 Agent가 UI를 스크래핑하지 않고도 순위를 매길 수 있습니다.
Agent 결정 패널
코딩 Agent용 우선 추천
우선 후보로 사용하되, 자신의 Agent 환경에서 README와 설치 경로를 검증하세요.
스택 내 역할
우선 추천
주요 적합도
코딩 Agent
신뢰 라벨
프로덕션 준비 완료
설치 경로
명령어 준비됨
사용 시점
- 코딩 Agent 워크플로
- Claude Code 팀
- GitHub 채택 신호를 중시하는 팀
근거
- GitHub 스타 3,010
- 최근 저장소 활동
- 설치 명령 또는 GitHub 저장소를 사용할 수 있습니다
- 품질 프로필 82/100
- OpenAgentSkill 상호작용 3건
먼저 검토
- 현재 메타데이터에서 주요 위험 신호가 발견되지 않았습니다
구현 경로
- 1샌드박스 Agent에 설치하고 코딩 Agent 작업을 처음부터 끝까지 한 번 실행하세요.
- 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.
신뢰 프로필
샌드박스 전용
신뢰 신호가 부족하거나 혼재된 유용한 후보입니다. 결과 루프가 작업 적합성을 입증할 때까지 격리된 작업 공간에서 사용하세요.
GitHub 채택도
통과GitHub 스타 3.0K
스타/포크 활동
정보스타 3.0K, 포크 197; 현재 메타데이터에서 이슈 활동을 확인할 수 없습니다
최근 유지보수
통과마지막 푸시 후 3일
라이선스 명확성
통과MIT
긍정 신호
- AI 검토 승인됨
- 설치 경로를 사용할 수 있습니다
- 저장소 근거를 사용할 수 있습니다
- 최근 유지보수된 저장소
- 의미 있는 GitHub 채택 신호
- 설치 명령에서 뚜렷한 고위험 패턴이 발견되지 않았습니다
- 결과 루프는 준비되었지만 첫 실제 Agent 실행이 필요합니다
설치 전 검토
- 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
- 아직 실제 Agent 결과 보고서가 없습니다
- 무인 설치 전에 사람 검토가 필요합니다
권장 작업
실제 작업에 사용하기 전 샌드박스에서만 실행하고 유사 대안과 비교하세요.
품질 프로필
강함 Agent 워크플로용 후보
프로덕션 워크플로 후보군에 넣을 만한 탄탄한 선택입니다.
워크플로 적합도
이 스킬을 사용할 시나리오
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.
워크플로 적합도
완전한 워크플로에 추가
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.
개요
--- 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.
기술 세부 사항
- 버전
- 1.0.0
- 라이선스
- MIT
- 최근 업데이트
- 2026년 8월 20일
- 게시일
- 2026년 8월 20일
결정 스냅샷
우선 추천
GitHub 스타 3,010
Agent 검증 증거
Agent 검증 증거
Resolve, 검토, 설치 및 한 번의 제한된 실행 후 결과 보고서입니다.
- 성공률
- —
- 최근 실패
- —
- 결과
- 0
- 출력 품질
- —
- 실패
- 0
- 관련 없음
- 0
- 설치
- 0
- 위험 차단
- 0
- 설정 필요
- 0
- 프로덕션
- 0
아직 Agent 결과 데이터가 없습니다. 첫 실행은 /api/agent/outcome을 통해 성공, 설정 필요, 위험 차단, 실패 또는 비관련 결과를 보고할 수 있습니다.
성장 루프
공유 키트
golang-context용 시나리오 기반 초안입니다. X에 수동으로 게시할 수 있습니다.
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
선택 사항: 설치 명령이 포함된 답글
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
등록 출처
Registry 색인
이 등록은 공개 소스에서 색인되었으며 유지보수자 소유권 주장이 승인될 때까지 공식으로 표시되지 않습니다.
- 제작자
- samber
- 색인 주체
- OpenAgentSkill 커뮤니티 인덱스
귀속은 공개 저장소 또는 제작자 프로필에 연결됩니다. 제작자는 등록을 주장하여 소유권 신호를 업데이트할 수 있습니다.
이 스킬 소유권 주장소유자 소유권 주장
이 스킬 등록 소유권 주장
이 Registry 색인 등록은 samber에게 귀속되어 있지만 아직 공식으로 표시되지 않았습니다. 소유권을 주장하면 확인된 소유자 신호가 추가되어 이후 출시, 설치 및 감사 업데이트를 더 신뢰할 수 있습니다.
크리에이터 백링크 키트
README에 증거 배지 추가
개발자가 저장소를 평가하는 위치에 정규 등록, 현재 신뢰 및 감사 신호, 실제 Agent-Proven 증거를 표시합니다.
[](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)작성자
samber
@samber
플랫폼 적합도
상태 신호
- GitHub 스타
- 3.0K
- 품질 점수
- 48/100
- 최근 GitHub 푸시
- 2026년 8월 20일
- 프레임워크 힌트
- 알 수 없음
- OpenAgentSkill 조회수
- 3
- 설치 명령 복사
- 0
- 외부 클릭
- 0
커뮤니티 신호
이 스킬이 Agent 워크플로에 유용한지 알려 주세요. 집계된 피드백은 시간이 지날수록 순위를 개선합니다.
신뢰와 안전
샌드박스 전용
- GitHub 채택도GitHub 스타 3.0K통과
- 스타/포크 활동스타 3.0K, 포크 197; 현재 메타데이터에서 이슈 활동을 확인할 수 없습니다정보
- 최근 유지보수마지막 푸시 후 3일통과
- 라이선스 명확성MIT통과
- README/SKILL.md 완성도메타데이터에 충분한 사용 및 워크플로 맥락이 포함되어 있습니다통과
- 의존성/런타임 위험command execution surface, network or browser surface확인