Communitygithub.com

并行执行优化器

当用户希望通过并行工作、并发代理、批量工具调用、隔离工作区或多条独立验证通道显著加快任务速度,同时保持正确性时使用此技能。

并行执行优化器 是什么?

并行执行优化器是一个高级技能,专为需要最大化执行速度的AI代理(如Claude Code、Cursor、Codex)设计。其核心方法是将任务紧迫性转化为依赖关系图,通过识别可并行执行的独立工作通道(如仓库检查、文件读取、API调用、浏览器检查、构建测试和部署验证)来提升效率。技能强调使用通道矩阵来规划并行性,确保写入表面不冲突,并通过批量读取、隔离工作区和异步会话管理来减少等待时间。最终目的是在保证正确性的前提下,通过结构化验证表而非模糊的“更快”承诺来证明速度提升。该技能适用于需要加速复杂、多步骤开发流程的场景,尤其适合多仓库、多服务或大型代码库的优化。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/parallel-execution-optimizer

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

并行执行优化器 是做什么的?

当速度来自于同时执行独立工作时使用此技能: 仓库检查、文件读取、API检查、浏览器检查、构建/测试通道、 部署回读或多工作区实现阶段。

核心模式

在行动之前,将紧迫性转化为依赖关系图。

  1. 定义目标和完成信号。
  2. 将工作拆分为多个通道。
  3. 将每个通道标记为并行、串行或门控。
  4. 同时运行独立的读取/检查。
  5. 通过文件、工作区、分支、服务或数据集保持写入隔离。
  6. 仅在证据表明通道兼容后才进行合并。
  7. 以验证表结束,而非模糊的速度声明。

通道矩阵

在大型推送之前,编写一个紧凑的矩阵:

通道 | 可以并行运行? | 写入面 | 风险 | 验证
仓库扫描 | 是 | 无 | 低 | rg/git status 输出
后端补丁 | 可能 | src/api | 中 | 单元测试
前端补丁 | 可能 | app/components | 中 | 浏览器截图
部署回读 | 构建后 | 远程服务 | 高 | 实时 URL + 日志

仅当通道的写入面不冲突时,才并行运行它们。

执行规则

  • 批量处理文件读取、搜索、状态检查和元数据查询。
  • 对大型不相关的实现通道使用隔离工作区。
  • 在单独的会话中启动长时间运行的测试、构建、回填和部署, 然后有目的地轮询它们。
  • 如果某个通道发现阻塞问题并改变计划,暂停依赖通道 并更新矩阵。
  • 除非用户明确要求持续服务,否则不要让后台进程在本次交互之外持续运行。
  • 在没有明确门控的情况下,不要并行化破坏性命令、迁移操作、对同一表的写入 或影响在线客户的操作。

输出格式

报告时使用此格式:

并行执行结果:
- 运行的通道数:5
- 完成的通道数:4
- 阻塞的通道:部署回读,等待 DNS 传播
- 快速路径:批量仓库扫描 + 聚焦测试
- 验证:lint 通过,单元测试通过,实时冒烟测试通过

失败模式

  • 过多的并发导致冲突的编辑。
  • 对工具进行基准测试而非对任务进行基准测试。
  • 在正确性未得到验证之前将“快速”视为完成。
  • 忘记轮询正在运行的会话。
  • 在成功摘要中隐藏跳过的检查。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相关技能