AgentSkillsCN

thread-safety-tooling

线程安全性验证工具集。当 C/C++ 代码引入线程、锁或原子操作时,或在可能出现竞态条件/死锁的情况下,务必使用该工具集。它提供 TSan 工具以及编译期线程安全性分析指导。

SKILL.md
--- frontmatter
name: thread-safety-tooling
description: "Thread-safety verification toolkit. Use when C/C++ code introduces threads/locks/atomics or when race conditions/deadlocks are plausible. Provides TSan and compile-time thread-safety analysis guidance."
metadata:
  short-description: Thread-safety verification

Purpose

Make concurrency changes verifiable, not hope-driven.

When to use

Use this skill when touching:

  • C/C++ concurrency primitives
  • shared mutable state with locks or atomics
  • code paths with plausible races or deadlocks

How to use

  1. Open references/thread-safety-tooling.md.
  2. Choose verification stack (TSan / static thread-safety analysis / stress tests).
  3. Provide reproducible commands or CI steps (placeholders if repo differs).
  4. Define a minimal stress scenario (what to load; what to assert).
  5. Record known limitations and suppression strategy (avoid blanket suppressions).

Output expectation

  • Produce a Concurrency Verification Matrix:
    • Tool → What it catches → How to run → Cost/limits