Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sweetteabittersugar-parallel-execution
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/parallel-execution
What's inside
- Skill name
parallel-execution- Description
- 并行执行方法论 —— 独立任务识别、并行策略、结果合并与冲突避免
- License
- MIT
- Instructions
- 104 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 这是什么 并行执行是将可以同时进行的任务并发处理以缩短总耗时的方法论。在多 Agent 系统、大型构建流程、数据处理管道中,合理运用并行可显著提升效率。 # 何时使用 - 多个 Agent 需要同时执行不同的独立任务 - 数据处理管道中无依赖关系的阶段 - CI/CD 中多个测试套件可以同时运行 - 代码审查中需要从多个维度同时评估 - 构建系统中独立模块可并行编译 # 核心规则 1. **无依赖才并行**:两个任务之间存在依赖关系(B 需要 A 的输出),就不能并行。必须先完成 A 再开始 B。 2. **并行上限有界**:无限并行会导致资源竞争、上下文切换开销碾压收益。并行数不超过可用资源数。 3. **独立上下文**:并行任务各自拥有独立的工作空间、数据副本。共享状态必须通过显式同步机制。 4. **失败隔离**:一个并行任务的失败不应该导致其他任务中断。收集所有结果后统一判断。 5. **结果幂等合并**:合并逻辑应该能够处理部分成功和全部成功的不同情况。重新执行合并不应产生不同结果。 # 工作流程 1. **任务分解** - 列出所有待完成的任务 - 绘制任务依赖图:节点是任务,边是依赖关系(A → B 表示 B 依赖 A) - 识别完全独立的任务组(图中没有边连接的节点) - 将独立任务标记为可并行执行 2. **资源评估** - 评估可用资源数量:CPU 核心数、内存、API 并发限制、Agent 实例数 - 评估每个任务所需资源 - 计算最大并行数 = min(独立任务数,可用资源数 / 单任务资源) - 设置安全余量:实际并行数 = 最大并行数 × 0.8 3. **并行调度** - 启动第一批并行任务,数量不超过上限 - 使用任务队列,完成一个即启动下一个 - 对于有依赖的任务,在所有前置任务完成后自动触发 - 监控每个任务的进度和状态 4. **结果收集** - 为每个任务定义结果格式(统一接口) - 收集所有任务的结果(成功或失败) - 对结果进行分类:成功、部分成功、失败、超时 - 记录失败原因和上下文 5. **结果合并** - 定义合并策略:拼接、聚合、投票、取最优 - 处理冲突:当多个结果相互矛盾时的裁决规则 - 生成统一报告:汇总所有任务的输出 - 验证合并结果的完整性和一致性 # 常见并行模式 ## 扇出-扇入 所有并行任务独立执行,最后汇总。适用于批量处理独立数据。 - 扇出:将任务分发到多个 worker - 扇入:收集所有 worker 的结果 - 适用场景:批量代码审查、多维度分析、批量数据转换 ## 竞速执行 同一任务由多个执行者同时处理,取最快返回的正确结果。 - 适用于有多个候选方案且不确定哪个最快 - 需要定义「正确结果」的验证标准 - 成本是单次的 N 倍,仅在速度优先于成本时使用 ## 流水线并行 每个阶段处理不同任务,像工厂流水线。 - 阶段间通过缓冲区连接 - 瓶颈在速度最慢的阶段 - 适用场景:代码分析 → 修复 → 审查 → 测试 # 冲突避免策略 - **资源分区**:每个并行任务分配互不重叠的资源范围 - **写时复制**:共享数据默认只读,需要修改时创建私有副本 - **文件锁**:必须写入同一文件时使用文件锁协调 - **版本向量**:分布式场景下用版本向量检测和解决冲突 - **最终合并者**:指定单一实体负责合并,避免多源写入冲突 # 并行度决策矩阵 | 场景 | 并行度 | 理由 | |------|--------|------| | 独立 API 调用 | 高(5-10) | I/O 等待时间长,上下文开销小 | | CPU 密集型计算 | 中(CPU 核心数) | 超过核心数无益 | | 文件读写 | 低(2-4) | 磁盘 I/O 是瓶颈 | | Agent 推理 | 低(3-5) | 每个 Agent 消耗大量上下文 | # 参考标准 - Amdahl 定律:加速比受限于不可并行部分 - Gustafson 定律:问题规模增大时并行效率提升 - MapReduce 编程模型 —— 大规模数据并行处理范式 - Celery/Temporal 等任务调度系统的并发配置 - CSP(通信顺序进程)和 Actor 模型的并发理念
From Sweetteabittersugar/agency, MIT.
More from Sweetteabittersugar/agency
- 0.555score
architecture-patterns
Sweetteabittersugar
架构设计模式参考 —— 常见架构风格的决策框架、优劣对比与适用场景
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
browser-compatibility
Sweetteabittersugar
浏览器兼容性检查 —— 目标浏览器覆盖率、特性支持度验证与降级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
caching-strategy
Sweetteabittersugar
缓存策略参考 —— 多级缓存架构、失效策略、缓存穿透/击穿/雪崩防护
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
database-design
Sweetteabittersugar
数据库设计规范 —— 范式设计、索引策略、分库分表、命名约定与迁移管理
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
dependency-audit
Sweetteabittersugar
依赖审计方法论 —— CVE 扫描、许可证合规、版本锁定与升级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
docker-patterns
Sweetteabittersugar
Docker 最佳实践 —— 多阶段构建、镜像层优化、安全运行、编排模式
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
e2e-testing
Sweetteabittersugar
端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
error-handling-patterns
Sweetteabittersugar
错误处理模式 —— 异常分类体系、重试与降级策略、错误码规范与用户友好提示
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
health-check-patterns
Sweetteabittersugar
健康检查模式 —— 存活探针、就绪探针、依赖健康检查与服务健康度仪表板
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
microservices
Sweetteabittersugar
微服务架构模式 —— 服务拆分原则、通信模式、数据一致性与治理框架
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
query-optimization
Sweetteabittersugar
查询优化指南 —— 慢查询分析、索引调优、执行计划解读与 N+1 问题治理
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
rag-patterns
Sweetteabittersugar
RAG 模式 —— 检索增强生成架构设计、分块策略、向量检索优化与评估方法
SkillBFreshness: B★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jun 9, 2026 (4 months ago)
- Last release
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Sweetteabittersugar/agency
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Sweetteabittersugar
- 0.555score
browser-compatibility
Sweetteabittersugar
浏览器兼容性检查 —— 目标浏览器覆盖率、特性支持度验证与降级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
caching-strategy
Sweetteabittersugar
缓存策略参考 —— 多级缓存架构、失效策略、缓存穿透/击穿/雪崩防护
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
database-design
Sweetteabittersugar
数据库设计规范 —— 范式设计、索引策略、分库分表、命名约定与迁移管理
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
dependency-audit
Sweetteabittersugar
依赖审计方法论 —— CVE 扫描、许可证合规、版本锁定与升级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
docker-patterns
Sweetteabittersugar
Docker 最佳实践 —— 多阶段构建、镜像层优化、安全运行、编排模式
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
architecture-patterns
Sweetteabittersugar
架构设计模式参考 —— 常见架构风格的决策框架、优劣对比与适用场景
SkillBFreshness: B★ 3Claude Code +9
Cite this page
parallel-execution skill. Agent Mart. https://agentmart.dev/skills/sweetteabittersugar-parallel-execution (last updated 2026-10-24)