一键导入
concurrency-and-threading-principles
Concurrency/parallelism patterns: race prevention, deadlock avoidance, message passing, async/channels/mutexes/worker pools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Concurrency/parallelism patterns: race prevention, deadlock avoidance, message passing, async/channels/mutexes/worker pools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Session bootstrap + workflows for Pathfinder semantic navigation tools. Covers: discovery protocol, tool chaining patterns (explore, impact, audit, debug), search optimization, LSP degraded mode, and error recovery.
Playwright browser automation via MCP. Covers E2E testing, UI review, web scraping, screenshot capture, and general browser interaction. MCP-first — CLI is fallback only.
Safe command execution: input sanitization, timeout handling, output capture, error propagation. For spawning processes, shell commands, system calls.
Git conventions: conventional commits, branch naming, PR hygiene, release tagging.
Structured incident workflow: severity classification, triage, diagnosis, mitigation, postmortem, and prevention. Template-driven with blameless review.
Constructs, validates, and traverses a Directed Acyclic Graph (DAG) from scope cards for safe level-based parallel dispatch. Determines execution order via topological sort. Detects cycles and invalid dependencies.
| name | concurrency-and-threading-principles |
| description | Concurrency/parallelism patterns: race prevention, deadlock avoidance, message passing, async/channels/mutexes/worker pools. |
| user-invocable | false |
Multiple threads + shared data + write + no sync = race.
Prevention: locks/mutexes, immutability, message passing, thread-local storage.
Detection: Go=-race, Rust=Miri, C/C++=TSan, Java=JCStress/FindBugs.
Two+ threads waiting for each other. Four conditions (ALL required): mutual exclusion, hold-and-wait, no preemption, circular wait.
Prevention (break any one): lock ordering (same order always), try_lock with timeout, avoid nested locks, lock-free data structures.
Immutable = thread-safe. No sync needed. Share freely. If must change → message passing.
"Share memory by communicating" (Go proverb). Channels/queues instead of shared memory. Reduces lock need. Easier to reason about and test.
Timeouts, retries, circuit breakers. Don't crash app on one thread failure. Supervisors for fault tolerance. Backpressure for producer-consumer.