Communitygithub.com

平行執行最佳化工具

在用戶希望透過平行工作、並行代理、批次工具呼叫、隔離工作樹或大量獨立驗證通道來大幅提升速度,同時不犧牲正確性時使用。

平行執行最佳化工具 是什麼?

這個技能專門設計用來在處理可獨立執行的工作時最大化速度,例如倉庫檢查、檔案讀取、API 檢查、瀏覽器驗證、建置/測試通道、部署回讀或多工作樹的實作流程。它透過將任務拆解為依賴圖,並明確區分平行、序列與閘控通道,來確保正確性與效率。支援的平台包括 Claude Code、Cursor 與 Codex 等 IDE 內建代理,以及任何可執行批次指令的 CLI 環境。使用時需遵循核心模式:定義目標與完成訊號、分割工作通道、評估寫入表面衝突、隔離寫入操作,最後以驗證表而非空泛的速度聲明來報告結果。此技能特別強調避免破壞性指令的平行化,並要求定期輪詢背景工作,防止遺漏檢查或產生衝突的編輯。

相容平台~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 的新對話。

說明文件

Parallel Execution Optimizer

當速度來自同時執行獨立工作時使用此技能: 倉庫檢查、檔案讀取、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.

相關技能