One-click install
npx skills add https://github.com/smallnest/chao-go-sync --skill chao-go-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chao-go-sync
Source: https://github.com/smallnest/chao-go-sync/tree/main
Command: npx skills add https://github.com/smallnest/chao-go-sync --skill chao-go-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go 并发诊断与优化:帮助开发者快速识别死锁、数据竞争、goroutine 泄漏等并发问题,并提供性能优化和设计建议。

Core Features & Use Cases

  • 提供死锁诊断、数据竞争检测、goroutine 泄漏分析、锁重入规避等能力。
  • 覆盖标准库与扩展原语、分布式同步原语,提供版本迁移与并发设计建议。
  • 针对代码审查、性能优化、架构设计、并发问题排查等场景提供实用工作流与模式速查。

Quick Start

请输入一个 Go 并发相关的问题,AI 将给出诊断与改进建议。

Frequently Asked Questions about chao-go-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a deadlock or data race in my Go concurrency code?

Diagnose Go concurrency deadlocks and data races by submitting your code for analysis, which identifies root causes like improper Mutex usage or missing synchronization, and provides specific correction guidance.

What is the best way to detect goroutine leaks in Go applications?

Detecting goroutine leaks in Go applications requires analyzing concurrent execution paths to find blocked goroutines, applying diagnostic workflows to trace channel operations and context cancellations for precise leak resolution.

When should I use sync.Map instead of a standard map with a Mutex in Go?

Use sync.Map instead of a standard map with a Mutex in Go when handling concurrent reads and writes with disjoint keys, leveraging its internal design to reduce lock contention and optimize performance in high-read scenarios.

Does this cover Go concurrency patterns using official extensions like ErrGroup and SingleFlight?

Yes, this covers Go concurrency patterns using official extensions like ErrGroup and SingleFlight, providing design guidance on applying these primitives for error propagation and duplicate request suppression across standard library versions 1.20 to 1.27.

How do I migrate my Go concurrency code to use the latest sync primitives across different Go versions?

To migrate Go concurrency code to use the latest sync primitives across different versions, apply version migration guidance that maps deprecated functions to modern equivalents, ensuring compatibility from Go 1.20 through 1.27.

Can I get design guidance for distributed synchronization primitives like etcd in Go?

Yes, you can get design guidance for distributed synchronization primitives like etcd in Go, receiving architectural recommendations on integrating distributed locks and coordination mechanisms to maintain data consistency across networked services.