Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add hxy91819/mason-skills --skill multi-agent-project-setupgit clone --depth 1 https://github.com/hxy91819/mason-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hxy91819/mason-skills/multi-agent-project-setup)<a href="https://agentmods.dev/skills/hxy91819/mason-skills/multi-agent-project-setup"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/multi-agent-project-setup/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hxy91819/mason-skills/multi-agent-project-setup"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/multi-agent-project-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.04161 |
| Opus 5.5 | $0.00026 | $0.01664 |
| Sonnet 5.5 | $0.00013 | $0.00832 |
| Haiku 4.5 | $0.00006 | $0.00416 |
Grade A, and why
multi-agent-project-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
多 Agent 协作项目的初始化配置
单人项目的默认配置在十几个线程并行时变成一条单车道:每个 MR 跑全量 CI、master 一动就重跑、状态记在共享文件里、等待挂在会话里。一个四人团队带十几个 Agent 并行开发的平台项目 2026-11-05 实测:每天 130 个合入,工作 MR 从建到合入 p50 41 分钟、p90 106 分钟,一半 CI 容量花在记账 MR 上;数字与事故见实测证据,向用户出示依据或判断自己项目是否同病时再读。
每条配置过一遍二十线程测试:二十个线程同时这么做会怎样,会不会互相拖住。
原则
- 门禁只保护别人:合入前的检查只为保证别的线程 rebase 到的主干能编译、单元测试绿;其余检查合入后跑,红了告警、向前修。没有生产用户时成立,开放用户后按环境重新评估。
- 共享状态出仓库:会被多线程同时改的东西(工作簿、台账、证据)放本机被 git 忽略的目录,或拆成每阶段一个文件。
- 等待不占会话:超过 20 分钟的等待放持久进程,结束时唤醒线程。
- 规则进检查:能用 lint 或 CI 保证的约定做成检查,不写成提醒。
- 环境只从主干来:共享环境的每类变更只有一条登记过的通道,排障只读。
- 有数才有判断:队列、滞后、停摆、机器健康都有指标、阈值和告警去向。
流程
- 量基线,至少半天样本:合入数与构成(工作 / 发布 / 记账)、工作 MR 从建到合入 p50 与 p90、CI 墙钟与取消数、检查池并发与排队、发布滞后、同时活跃线程数、开发机 load。样本不足半天不下结论。
- 逐项对照清单,缺项按"做法"落地。整改顺序固定:先减少走全量 CI 的 MR 数,再减少每个 MR 的 CI 轮数,再把容器类检查挪到合入后,最后才加机器。
- 同口径复测,写进项目的 operations 记录。门禁改动先落地,再用自然流量验收,不为凑样本等。
完成判据:清单每行都有"已有 / 已落地 / 不适用(原因)"三选一,复测数字与基线并列。
配置清单
仓库与文档
| 做法 | 为什么 | 验证 |
|---|---|---|
主检出留主干,每个任务独立 worktree,交付后 git worktree remove |
十几个线程改同一检出会互相覆盖 | git worktree list 没有超过一天的闲置 worktree |
.local/ 进 .gitignore,作本机状态目录(工作簿、证据、临时产物) |
这些内容进仓库就要走 MR 和 CI | git check-ignore .local/x 通过 |
AGENTS.md 只放常驻规则加"任务 → 先读"路由表,细节按任务加载;读文档先 rg 标题再按章节读 |
一次 cat 多份文档会截断,Agent 还要补读 | AGENTS.md 一屏内,路由表每行一个任务 |
| 术语表加 ADR,名词只有一个写法 | 名字撞车让线程各改各的 | 新名词先进术语表再出现在代码 |
| 数据库迁移编号用 UTC 时间戳 | 顺序号在并行分支上抢号 | 迁移文件名匹配 YYYYMMDDHHMMSS_ |
| 会被多方追加的登记表和账本:一条记录一个文件,读取时组合;CI 禁止往汇总文件追加,加载器遇到重复键报错 | 并行 MR 都往文件末尾追加,反复冲突;有一次 git 合并没报冲突,YAML 里却多出同名顶层键,旧状态被静默覆盖 | 汇总文件只剩索引字段;两个分支互相 rebase,两个方向都无冲突 |
| 建 worktree 的工具从最新主干建分支,并打印落后的提交数和近 7 天规则文档的变化 | 一个线程落后主干 17 个提交,照旧规则跑了 18 分钟全量检查 | 新建 worktree 的输出里有落后数和规则变化 |
合入与 CI
| 做法 | 为什么 | 验证 |
|---|---|---|
| 合并结果 CI 一次绿灯即合入;master 漂移只评论留证,不重跑(双边都新增迁移时例外) | 漂移重跑让每个 MR 跑两三轮,合入要一小时 | 合入工具日志里没有"重跑" |
| 主干检查每次合入触发,正在跑的跑完,排队的只跑最新提交(superseded 跳过,不用 cancel-in-progress) | 取消策略下合入密集时主干检查一次都跑不完 | 任一小时内主干检查至少一次成功 |
| 门禁三层:合入前只跑弹性公共池上的静态检查;改迁移、镜像、部署输入时才在合入前跑容器类;合入后主干检查跑全部 | 容器类检查占自有检查池,是排队的根源 | 纯 Go 或前端改动的 MR 墙钟 5–6 分钟 |
纯文档 MR 只跑链接检查,不占自有检查池;用于编译或测试输入的 .md 按例外清单走全量 |
文档 MR 走全量白占 14 分钟 | 文档 MR 墙钟 2 分钟内 |
| 统一合入工具:核对远端头、MR 快照、检查对应的 SHA 三者一致,快照陈旧用工具刷新 | 线程用 close/reopen 刷新快照,顶掉正在跑的构建 | 取消数里没有同 SHA 替换 |
| 一个阶段一个 MR,审查修复进同一 MR | 一个任务开十几个 MR,每个都占一轮 CI | 分支名对应的 MR 数为 1 |
| 自有检查池并发按机器 load 和内存定,排队中位超过 5 分钟再加节点 | 机器没满时加机器不解决问题 | 检查池 load、可用内存、排队中位三个数并列 |
| 主干红时,先按失败用例名或固定标题标记搜在途的修复 MR,有就等它合入再 rebase;自己修时标题带同一个标记 | 主干红时所有 MR 一起红,各自在自己的 MR 里修,会修出好几份 | 修主干的 MR 标题都带这个标记 |
按路径分流时,用 git diff --name-only -z 读取路径,只算 merge-base..HEAD;白名单之外的改动一律走全量 |
按行读取时中文文件名被转义,纯文档 MR 被判成代码改动;拿目标分支 HEAD 比较,把目标分支新增的代码也算了进来,白跑约 10 分钟检查 | 含中文文件名的纯文档 MR 走文档通道 |
MR 检查用 BASE_SHA 证明历史迁移没被改过,缺 BASE_SHA 就失败 |
历史迁移被改,库里已经执行过的版本和代码对不上 | 改历史迁移的 MR 必红 |
CI 平台声明的语义要实测:含 bash 语法的步骤显式用 bash -euo pipefail 调用;排队超时和执行超时分开设 |
公共池声明了 bash,实际仍用 /bin/sh 启动;构建机并发配小时,排队超过默认 10 分钟就报失败 |
ShellCheck 按实际解释器跑 |
测试前清掉 CI 事件变量,设 LANG/LC_ALL=C.UTF-8 和 TZ=UTC;测试用系统分配的端口 |
测试里新建的 git 仓库继承了 CI 变量,去远端 fetch,11 次主干检查红了 7 次;C locale 下中文报错不可读;固定端口互相冲突 | 满载重放 200 轮零失败 |
CI 机器上的临时容器和匿名卷经统一入口创建,打上"受管"和到期时间标签,每次作业开始先回收到期的;docker rm 必须带 -v |
任务被取消或被 SIGKILL 时 trap 不执行;rm -f 不带 -v,9 天积了 1259 个匿名卷、274G |
强杀后由下一次作业回收;检查脚本拦下不带 -v 的 rm |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +16 lines 901d93308214
- 2d ago First seen · 108 lines · 65 tokens per session scan A e92a8417e774
multi-agent-project-setup is a skill published in the GitHub repository hxy91819/mason-skills (3 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 4,161 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-05.
multi-agent-project-setup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| multi-agent-project-setuphxy91819/mason-skills | Skill | 3 | today | MIT | A | 65 | Claude Code, Codex |
| deployment-patternsaffaan-m/ECC | Skill | 299k | yesterday | MIT | A | 41 | Claude Code, Kiro |
| agent-github-modesruvnet/ruflo | Skill | 81k | yesterday | MIT | A | 21 | Claude Code |
| baby-sitlangchain-ai/open-swe | Skill | 11k | today | MIT | A | 30 | Claude Code, Codex |
| chinese-git-workflowjnMetaCode/superpowers-zh | Skill | 8.5k | 12d ago | MIT | A | 69 | Claude Code |
| atmos-hookscloudposse/atmos | Skill | 1.4k | today | Apache-2.0 | A | 46 | Claude Code |
| atmos-procloudposse/atmos | Skill | 1.4k | today | Apache-2.0 | A | 38 | Claude Code |