golang-concurrency
Design and Review Go Concurrency
Concurrent Go code can hide goroutine leaks, shared-state races, and blocked pipelines. This skill guides implementation and review with lifecycle checklists and synchronization examples.
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "golang-concurrency" from https://skillstore.io/skills/samber-golang-concurrency.md and its manifest at https://skillstore.io/api/skills/samber-golang-concurrency/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“golang-concurrency”。 Review a function that calls WaitGroup.Add inside each new goroutine.
预期结果:
- Wait can return before goroutines register, leaving work running after the function returns.
- Register work before launching goroutines and defer completion inside each worker.
- For suitable Go 1.25+ tasks, consider WaitGroup.Go; use errgroup when error propagation or cancellation is required.
正在使用“golang-concurrency”。 Choose synchronization for a cache with frequent writes to overlapping keys.
预期结果:
- Start with a plain map protected by a mutex or RWMutex.
- sync.Map targets write-once/read-many or disjoint-key access patterns, so it is not the default choice here.
- Keep critical sections short and benchmark the actual workload.
正在使用“golang-concurrency”。 Audit a fan-in function whose input channels may stay open after cancellation.
预期结果:
- An unconditional channel receive cannot observe cancellation while the input is idle.
- Select between cancellation and each receive, and handle closed channels explicitly.
- Test cancellation with every input open and idle, then verify all workers and the output closer finish.
安全审计
中风险All 66 static alerts are false positives involving formatting, illustrative Go identifiers, documentation links, or localhost profiling commands. No evidence found of malicious instructions, credential theft, or external data exfiltration. One semantic availability finding covers pipeline examples whose blocking receives can prevent cancellation and retain goroutines.
已确认安全问题 (1)
风险因素
⚙️ 外部命令 (50)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/samber-golang-concurrency/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/samber-golang-concurrency?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/samber-golang-concurrency?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-concurrency/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/samber-golang-concurrency.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
samber. (2026). golang-concurrency security audit report (audit version 1) [Author version 1.2.1]. Skillstore. https://skillstore.io/skills/samber-golang-concurrency/audits/1BibTeX 引用
@techreport{samber-samber-golang-concurrency-2026,
author = {samber},
title = {golang-concurrency security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-concurrency/audits/1},
note = {Author version 1.2.1}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-concurrency security audit report (audit version 1)"
version: "1.2.1"
type: report
authors:
- name: "samber"
date-released: "2026-10-15"
url: "https://skillstore.io/skills/samber-golang-concurrency/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-concurrency:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
Build a bounded background worker
Design worker ownership, concurrency limits, error propagation, and shutdown behavior before adding background tasks.
Review concurrent pull requests
Inspect changed goroutines, channel closure, shared state, and cancellation paths using a focused review checklist.
Audit service concurrency
Coordinate a codebase review across lifecycle management, synchronization, channel ownership, and resource bounds.
试试这些提示
For this Go shared-state example, compare channels, mutexes, and atomics. Recommend the simplest option and explain ownership: [code].
Review this Go diff for goroutine leaks, unsafe channel closure, shared-state races, and missing cancellation. Explain each issue and propose focused fixes: [diff].
Implement [task] in Go [version] with errgroup, a limit of [N], first-error cancellation, and ordered results. Include shutdown tests.
Audit [scope] for channel ownership, blocked receives, cancellation, and concurrency bounds. Coordinate focused reviewers when available; prioritize findings and propose idle-input cancellation tests.
最佳实践
- Define each goroutine owner, stop signal, and waiting mechanism before implementation.
- Test cancellation during blocked sends and receives, then run race and goroutine leak checks.
- Match APIs to the project Go version and justify concurrency limits with workload measurements.
避免
- Launching unbounded goroutines without shutdown or waiting mechanisms.
- Closing producer channels from consumers or mutating shared data without synchronization.
- Copying pipeline examples without testing cancellation when input channels remain open.
常见问题
What does this skill cover?
Which assistants can use it?
Does it require a Go installation?
Does it automatically run a concurrency analyzer?
Are its examples ready for production?
Can it diagnose an existing production hang?
开发者详情
作者
samber许可证
MIT
作者版本
v1.2.1
Skillstore 修订
r1
引用
2d5afc74d3bbf9fe6e6fe78b7148ae41abe5e6ba
维护新鲜度
2026/10/15
使用量
0 次下载 · 0 次浏览
文件结构