Task Concurrency Patterns

任务并发与依赖管理模式 — 多 Agent/多步骤任务的并发安全、读写分离、依赖编排。适用于:(1) 多 Worker 并行任务 (2) 复杂项目拆分执行 (3) 需要 blocks/blockedBy 依赖关系的工作流。灵感源自 Claude Code Task System + Coordinator Concurrency Rules。

9 stars 8 forksProductivity & Notes

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add kadaliao/claude-code-skills-collection --skill task-concurrency-patterns
Manual install
git clone --depth 1 https://github.com/kadaliao/claude-code-skills-collection.git /tmp/claude-code-skills-collection
mkdir -p ~/.claude/skills
cp -r /tmp/claude-code-skills-collection/task-concurrency-patterns ~/.claude/skills/task-concurrency-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Task Concurrency Patterns

## 并发安全规则

### 读写分离
```
只读任务(研究/搜索/分析)→ 自由并行,无限制
写操作(实现/编辑/部署)  → 同一文件区域串行
验证任务                  → 可与不同文件区域的实现并行
```

### 并发安全声明

每个任务/工具需声明并发安全性:
- `concurrencySafe: true` → 可以并行执行(如搜索、读取)
- `concurrencySafe: false` → 必须串行(如文件写入、数据库迁移)

## 任务状态机

```
pending → in_progress → completed
```

每个任务包含:
- `subject` — 简短标题
- `description` — 需要做什么
- `activeForm` — 进行时文案(如 "Running tests")
- `blocks` — 此任务阻塞的任务 ID 列表
- `blockedBy` — 阻塞此任务的任务 ID 列表

## 依赖编排

### 串行依赖
```
Task A (研究) → Task B (实现) → Task C (验证)
B.blockedBy = [A.id]
C.blockedBy = [B.id]
```

### 扇出(并行研究)
```
Task A1 (研究模块1) ─┐
Task A2 (研究模块2) ──┼→ Task B (综合 + 实现)
Task A3 (研究模块3) ─┘
B.blockedBy = [A1.id, A2.id, A3.id]
```

### 扇入(并行实现 + 统一验证)
```
Task B1 (实现模块1) ─┐
Task B2 (实现模块2) ──┼→ Task C (集成验证)
C.blockedBy = [B1.id, B2.id]
```

## 失败处理

1. Worker 失败 → Continue 同一个 Worker(已有错误上下文)
2. 纠正失败 → 换方案,仍然 Continue
3. 三次失败 → 报告用户,提供已尝试的方案列表

## 实际应用模式

### 模式 1: 研究→综合→实现→验证
最常见。研究阶段并行,综合你来做,实现串行,验证独立。

### 模式 2: 快速修复
跳过研究,直接实现+验证。适用于已知问题。

### 模式 3: 大规模重构
多轮迭代:规划→分批实现→每批验证→下一批。
每批内部可并行(不同文件),批间串行。

## 停止正在跑的任务

发现方向错误时,立即停止 Worker:
```
启动 Worker 做 JWT 重构
→ 用户说"别搞 JWT,只修空指针"
→ 停止 Worker
→ Continue 同一个 Worker,给新指令
```

不要让错误方向的 Worker 跑完再修正 — 浪费资源。
Read the full skill on GitHub

Details

Skill name
task-concurrency-patterns
Path
task-concurrency-patterns/SKILL.md
Repo updated
31 March 2026

FAQ

What does the Task Concurrency Patterns skill do?

任务并发与依赖管理模式 — 多 Agent/多步骤任务的并发安全、读写分离、依赖编排。适用于:(1) 多 Worker 并行任务 (2) 复杂项目拆分执行 (3) 需要 blocks/blockedBy 依赖关系的工作流。灵感源自 Claude Code Task System + Coordinator Concurrency Rules。

How do I install the Task Concurrency Patterns skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add kadaliao/claude-code-skills-collection --skill task-concurrency-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Task Concurrency Patterns popular?

It lives in kadaliao/claude-code-skills-collection, which has 9 GitHub stars and 8 forks.

Related skills

Adversarial Verification

9

kadaliao/claude-code-skills-collection

对抗性验证技能 — 验证代码变更/部署/任务交付物的正确性。不是确认"它能工作",而是尝试"把它搞坏"。用于:(1) 完成非平凡任务后自验 (2) 审查 PR/MR (3) 部署后验证 (4) bobooo 说"验证一下"。灵感源自 Claude Code Verification Agent 设计。

AI, LLMs & Agents

Coordinator Orchestrator

9

kadaliao/claude-code-skills-collection

多 Agent 协调者模式 — 你是指挥官,不是执行者。调度 Worker 做研究/实现/验证,你负责综合和决策。适用于:(1) 复杂任务需要多步骤并行 (2) 需要研究→综合→实现→验证的工作流 (3) bobooo 说"用 CC 做"时的编排模式。灵感源自 Claude Code Coordinator Mode。

AI, LLMs & Agents

Lightweight Explorer

9

kadaliao/claude-code-skills-collection

轻量探索模式 — 用最少 token 完成代码搜索和调研。核心理念:只读搜索不需要加载全部工具和项目规则。适用于:(1) 搜索代码库找文件/函数 (2) 调研项目架构 (3) 多文件分析 (4) 回答"代码里哪里有 X"类问题。灵感源自 Claude Code Explore Agent 设计。

AI, LLMs & Agents

Meeting Notes to Action Items

9

tomique34/claude-skill-creator

Convert meeting notes, demo sessions, and discussions into actionable tasks with clear owners, priorities, and deadlines. Use when processing any meeting notes, demo feedback, product reviews, or discussions that need to become TODO lists, JIRA tickets, or Trello cards.

Productivity & Notes

Smart Memory Guard

9

kadaliao/claude-code-skills-collection

智能记忆管理 — 防膨胀、防漂移、分类写入。解决记忆文件无限增长、过时记忆误导行动、什么都记导致噪音太多的问题。适用于所有 OpenClaw Agent。触发条件:(1) 写入 MEMORY.md 前自动执行分类检查 (2) 基于记忆行动前验证漂移 (3) heartbeat 时检查膨胀 (4) 被主人说"记忆太乱了"时。灵感源自 Claude Code Memory 系统设计。

Productivity & Notes

Strapi Product Builder

9

strapi/skills

Run a structured, business-value-first product-planning interview that turns a fuzzy idea into a build-ready spec — BEFORE any code is written. Use this the moment someone is still figuring out WHAT to build and says things like "I have an idea for an app, help me think it through", "help me plan/scope/design my product", "where do I start?", "let's spec this out before I write code", or "turn this into a PRD". Covers any new app, site, SaaS, MVP, marketplace, or feature. Trigger on the planning intent alone — the user need NOT mention Strapi, a CMS, or any tech; a Strapi v5 + Strapi Cloud bac

Productivity & Notes

Browse the most popular Claude skills, all productivity & notes skills, or write your own with the skills generator.