Community写作与编辑github.com

并行工作

用于同时运行多个子智能体的模式——扇出加屏障、制作人/检查人、生成并过滤、锦标赛排名、根因假设扇出,以及带条件停止和上限的循环。

并行工作 是什么?

该技能提供了一组并行工作模式,旨在帮助AI智能体高效、安全地处理独立任务单元。它通过“扇出-扇入”模式同时启动多个任务,并利用屏障等待所有任务完成后再合并结果;通过“制作人/检查人”模式分离任务执行与审核角色,避免偏见;通过“生成并过滤”模式产生多个候选方案后按预设标准筛选;通过“锦标赛”模式利用两两比较对大量项目进行可靠排名;通过“假设扇出”模式从不同证据源独立形成根因假设,再逐个反驳;通过“循环直到停止”模式重复执行任务直到满足停止条件或达到预设上限。该技能适用于Claude Code、Cursor等支持多智能体调度的平台,核心价值在于显式管理并行任务的协调成本(如合并冲突、结果依赖),确保在不依赖智能体间持续通信的情况下实现可预测、可中断的并行处理,尤其适合批量编辑、大规模评审、根因分析和重复性检查等场景。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/agent-orchestration/skills/parallel-work

Installed? Explore more 写作与编辑 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜欢的 AI 中提问

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

文档

并行工作 是做什么的?

并行化为每个单元提供全新的上下文和速度。它需要协调成本:必须等待的扇入、不能冲突的合并、不能由制作人担任的评审人。在单元真正独立时使用,并显式支付协调成本。

前提条件

  • 单元是独立的:没有一个单元需要另一个单元的结果才能开始。
  • 你知道单元是什么。原因未知 → 先进行一次调查分派。
  • 写入是隔离的:每个单元写入不同的文件,或者每个单元在自己的工作树中运行,并且只提交该单元修改的文件(机制:参见 delegate/references/harness-notes/claude-code.md 的隔离部分)。

缺少任何一个 → 序列化,或先进行调查。

模式

扇出、扇入。 同一阶段的 N 次分派,每个单元一次,一起发送。一次整合性分派等待所有分派完成——这个等待就是屏障——并将它们的交付文件合并为一个。将每个单元的输出保存在一个文件中;整合器读取路径,而不是你的上下文。

机械扇出。 一个 process 分派决定确切的更改。N 次通用分派逐字应用它,每次针对其自己的目标。一个 review 分派检查整个集合。编排器本身从不应用编辑,无论集合有多小。

制作人/检查人。 产生结果的人永远不会评审它。将 review 路由给不同的智能体——如果存在,则路由给该领域的评审员类型智能体,否则路由给不同角色的专家——并附上成功标准和工件路径,不包含制作人的任何推理过程。

生成并过滤。 扇出以产生候选方案;一次分派对它们进行去重并根据书面评分标准评分;只有存活者才能继续。在生成之前编写评分标准。

锦标赛。 用于对太大而无法在一个窗口中评审的集合进行排名:两两比较的分派,每个分派包含两个项目,括号保存在一个文件中。比较判断比绝对分数更可靠。

假设扇出。 用于根因分析:每个不相交的证据源(日志、代码、数据)进行一次分派,仅从其源形成假设。然后对每个假设进行一次分派,试图反驳它。在反驳中存活下来的就是发现结果。

循环直到停止。 用于未知大小的工作:重复分派,直到可观察的条件成立——没有新的发现,门控输出中的零错误,检查清单文件没有未勾选的项目。在第一次迭代之前设置上限(默认为 5)。达到上限时,报告 PARTIAL 并附上剩余内容。

检查清单扇出

一个包含 - [ ] 项目的 Markdown 文件就是一个现成的单元列表:每个未勾选的项目进行一次分派,每个分派被告知在完成时勾选其自己的行,然后循环直到停止,直到“没有未勾选的项目剩余”。对命名相同文件的项目进行序列化。

上限和停止条件

每个循环和每个扇入在开始之前都有一个写下来的数字:迭代次数、重新分派次数或单元数量。达到上限会给用户一个 PARTIAL 或 BLOCKED 报告,而不是静默重试。

持久团队

某些工具框架提供具有共享任务列表和消息传递的长期存在的智能体团队。它们增加了智能体执行不一致的指令和通信开销,并且它们在不同工具框架之间不可移植。上述模式不需要任何这些。只有当智能体必须在任务中间交换消息时才考虑使用团队,并且此时需要参考工具框架文档。

参考

Individual skills in this repo

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

Jamie-BitFlight/agentskill-kaizen-meta-docs

Agentskill kaizen plugin documentation index. Load when needing to read about cross-platform notes, improvement plans, or DuckDB integration.

Jamie-BitFlight/bash-51-features

Bash 5.1 release features and improvements with practical examples. Use when working with Bash 5.1 features, epoch time variables, redirection enhancements, or when user asks about Bash 5.1 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-52-features

Bash 5.2 release features and improvements with practical examples. Use when working with Bash 5.2 features, variable handling enhancements, readline improvements, or when user asks about Bash 5.2 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-53-features

Bash 5.3 release features and improvements with practical examples. Use when working with Bash 5.3 features, new command substitution, GLOBSORT, loadable builtins, or when user asks about Bash 5.3 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-development

This skill should be used when the user asks to "write a bash script", "create a shell script", "implement bash function", "parse arguments in bash", "handle errors in bash", or mentions bash development, shell scripting, script templates, or modern bash patterns.

Jamie-BitFlight/bash-lint

This skill should be used when the user asks to "lint bash script", "run shellcheck", "format shell script", "use shfmt", "fix shellcheck errors", or mentions shell script linting, formatting, code quality, or pre-commit hooks for bash.

Jamie-BitFlight/bash-logging

This skill should be used when the user asks to "add logging to bash script", "colorize output", "implement log levels", "CI/CD sections", "terminal colors in bash", or mentions logging functions, emoji output, collapsible CI sections, or shlocksmith.

Jamie-BitFlight/bash-portability

This skill should be used when the user asks about "POSIX compatibility", "portable shell scripts", "cross-shell compatibility", "bashisms", "shebang selection", or mentions writing scripts that work on different shells (bash, sh, dash, zsh) or different systems.

Jamie-BitFlight/bash-testing

This skill should be used when the user asks to "test bash script", "write shell tests", "use shunit2", "use shellspec", "create test suite for bash", or mentions unit testing, test frameworks, mocking, or test-driven development for shell scripts.

Jamie-BitFlight/brainstorming-skill

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or when users request help with ideation, marketing, and strategic planning. Explores user intent, requirements, and design before implementation using research-validated prompt patterns.

Jamie-BitFlight/clang-format

Configure clang-format code formatting. Use when: user mentions clang-format or .clang-format, analyzing code style/patterns, creating/modifying formatting config, troubleshooting formatting, brace styles/indentation/spacing/alignment/pointer alignment, or codifying conventions.

Jamie-BitFlight/commitlint

When setting up commit message validation for a project. When project has commitlint.config.js or .commitlintrc files. When configuring CI/CD to enforce commit format. When extracting commit rules for LLM prompt generation. When debugging commit message rejection errors.

Jamie-BitFlight/conventional-commits

When writing a git commit message. When task completes and changes need committing. When project uses semantic-release, commitizen, git-cliff. When choosing between feat/fix/chore/docs types. When indicating breaking changes. When generating changelogs from commit history.

Jamie-BitFlight/dasel-reference

Use when querying, modifying, or converting JSON, YAML, TOML, XML, CSV, HCL, or INI with dasel v3. Complete reference for selectors, functions, conditionals, variables, spread operator, type casting, and format-specific patterns.

Jamie-BitFlight/data-exploration

Use when exploring unknown structured data files with dasel v3 — discover schema, list keys, find nested values, sample arrays, identify data types across JSON, YAML, TOML, XML, CSV, HCL, INI formats

Jamie-BitFlight/data-transformation

Use when modifying, converting, or transforming structured data with dasel v3 — in-place mutations, format conversion, batch operations, array manipulation, object construction, and merge patterns across JSON, YAML, TOML, XML, CSV, HCL, INI

Jamie-BitFlight/delegate

Decompose substantive work into phases, dispatch each phase to a sub-agent, and adjudicate what comes back. Use whenever a request asks for implementation, investigation, a fix, a review, or any change to files — including small ones — and whenever you are about to read source or run a diagnostic yourself instead of handing it off. Also use when a report from a sub-agent needs judging, when a phase needs re-dispatching, or when a user names one instance of a pattern. Does not apply when your own prompt begins "Your ROLE_TYPE is sub-agent." — then follow references/sub-agent-contract.md instead.

Jamie-BitFlight/enterprise-hibernate-hbm

Dasel v3 query patterns for Hibernate .hbm.xml mapping files — entity-table binding, Java property-to-column extraction, one-to-many set/list/bag relationship tracing, many-to-one foreign key discovery, batch scanning across 60+ HBM files. Use when querying Hibernate ORM class mappings, extracting schema metadata from Java persistence layer, or auditing entity-column relationships in enterprise legacy codebases.

Jamie-BitFlight/enterprise-installanywhere

Dasel v3 query patterns for InstallAnywhere .iap_xml installer definitions — use when querying action sequences, discovering variables, resolving platform conditions, navigating panels, or comparing installer variants. Files are 2.5+ MB, 65,000+ lines — too large for context reads, requires structural dasel queries.

Jamie-BitFlight/enterprise-maven-pom

Dasel v3 selector patterns for Maven POM XML files — use when querying dependency versions, filtering by groupId or scope, extracting module hierarchy from parent POMs, or detecting version conflicts across enterprise multi-module Java projects. Load this skill when working with pom.xml files using dasel.

相关技能