Install
openclaw skills install art-of-warApply Sun Tzu's Art of War principles to AI agent organization and task orchestration. Use when planning multi-agent workflows, evaluating whether to deploy agents, assessing task complexity, or optimizing agent collaboration strategies. Maps all 13 chapters to practical agent patterns.
openclaw skills install art-of-warApply Sun Tzu's 13 chapters to AI agent organization and orchestration. This skill provides a framework for strategic decision-making about when, how, and which agents to deploy for maximum effectiveness with minimum waste.
每次部署 agent 前,填这个表。填不完别发。
┌────────────────────────────────────────────────────┐
│ 五事自检 FIVE CONSTANTS │
├────────────────────────────────────────────────────┤
│ 道:这任务值得做吗?对齐目标吗? │
│ □ 是 □ 否 □ 不确定 │
│ │
│ 天:现在是时候吗?依赖准备好了吗? │
│ □ 是 □ 否 □ 不确定 │
│ │
│ 地:数据/上下文/工具齐了吗? │
│ □ 是 □ 否 □ 不确定 │
│ │
│ 将:有合适的 agent 吗?能力匹配吗? │
│ □ 是 □ 否 □ 不确定 │
│ │
│ 法:流程清楚吗?什么叫"做完"? │
│ □ 是 □ 否 □ 不确定 │
│ │
│ 得分:___/5 │
│ ≥4: 可以发 | 3: 先补弱点 | <3: 别发 │
└────────────────────────────────────────────────────┘
三反验证(输出事实前必做)
要验证的事实:________________
□ 来源 1(Agent 内部知识):________________
□ 来源 2(外部搜索/API):________________
□ 来源 3(用户上下文/文档):________________
一致 → 信 | 不一致 → 查
信号监控(迭代中盯这些)
⚠ 问同样的问题第二次 → 缺上下文,补
⚠ 输出越来越长 → 在填充,停
⚠ 过度自信 → 要来源,验
⚠ 回避问题 → 不会,直说
⚠ 循环论证 → 卡住,重定向
看到任一信号 → 立刻干预,别等第 5 次
迭代限制(写死)
最大迭代次数:3 次(默认)
Token 预算:_______
超时:_______ 分钟
到限不出结果 → 强制结论,停
Before deploying any agent, run the Five Constants + Seven Metrics:
五事 (Five Constants):
七计 (Seven Metrics):
Decision: If you can't answer these, don't deploy. Plan first.
Agent runs cost tokens. Treat them like war costs:
Rule: If a task can be done in 1 agent iteration, don't use 3.
Hierarchy of agent deployment:
Avoid siege warfare: Don't throw more agents at a poorly-defined problem.
全胜思维: The best outcome is winning without fighting — automate or eliminate the task entirely.
Before offense, ensure defense:
先为不可胜: Make yourself undefeatable first — have validation, version control, and undo capability.
以待敌之可胜: Then wait for the opportunity — deploy when conditions are favorable.
Create unstoppable momentum:
Example pattern: Research agent → Synthesis agent → Critique agent → Final polish Each builds on the previous, creating momentum.
Avoid strength, attack weakness:
避实击虚: If an agent struggles with nuance, handle the nuance yourself; let it handle the bulk work.
致人而不致于人: Control where the agent focuses; don't let it drift.
The longest path may be fastest:
以迂为直: A seeming detour (extra planning, extra validation) often reaches the goal faster.
Agents must adapt to changing conditions:
Five dangerous agent faults:
Watch for these; intervene early.
Read the signals:
When to intervene:
Six terrain types → Six task types:
| 地形 | 任务类型 | Agent 策略 |
|---|---|---|
| 通形 (Accessible) | 清晰定义的任务 | 直接部署,标准流程 |
| 挂形 (Entangling) | 容易陷入细节的任务 | 设时间限制,强制输出 |
| 支形 (Stalemate) | 信息不足的任务 | 先收集信息,再决策 |
| 隘形 (Narrow) | 高约束任务 | 精确指令,严格验证 |
| 险形 (Dangerous) | 高风险任务 | 多重验证,保守策略 |
| 远形 (Distant) | 长链条任务 | 分阶段,设检查点 |
Match resource commitment to task importance:
| 地 | 任务重要性 | Agent 投入 |
|---|---|---|
| 散地 (Home ground) | 日常任务 | 轻量 agent,快速迭代 |
| 轻地 (Light ground) | 低价值任务 | 最小可用方案 |
| 争地 (Contentious) | 竞争/时间敏感 | 优先资源,快速部署 |
| 交地 (Open ground) | 多方协作 | 明确接口,文档先行 |
| 衢地 (Intersecting) | 多目标 | 平衡资源,避免偏废 |
| 重地 (Serious) | 高价值任务 | 多 agent 协作,充分验证 |
| 圮地 (Difficult) | 信息不足 | 先探索,后投入 |
| 围地 (Desperate) | 受约束 | 创造性方案,突破限制 |
| 死地 (Death) | 背水一战 | 全力以赴,不留退路 |
Most tasks are 散地 or 轻地 — don't over-invest.
Fire = powerful tools (code execution, API calls, external data):
用火的时机 (When to use fire):
Warning: Fire can burn you. Validate tool outputs; don't trust blindly.
Five types of intelligence sources:
| 间 | Agent 应用 |
|---|---|
| 因间 (Local spies) | 利用现有文档/代码库 |
| 内间 (Inside spies) | 访问内部系统/数据库 |
| 反间 (Double agents) | 交叉验证多个信息源 |
| 死间 (Doomed spies) | 一次性查询(搜索、API) |
| 生间 (Living spies) | 持续监控(RSS、警报) |
关键原则:
Task arrives
↓
Can I do this myself in <5 min?
├─ Yes → Do it (don't deploy agent)
└─ No → Continue
↓
Is the task clearly defined?
├─ No → Plan first (始计篇)
└─ Yes → Continue
↓
What's the token budget?
├─ Low (<10k) → Single focused agent (谋攻篇)
└─ High → Multi-agent OK (兵势篇)
↓
What's the risk if wrong?
├─ High → Defense first (军形篇), multiple validation
└─ Low → Speed优先 (作战篇)
↓
Deploy with clear success criteria
↓
Monitor for drift (行军篇)
↓
Validate output (用间篇 - cross-check)
User: "I need to research competitors for our new product launch"
Apply 始计篇:
Decision: Deploy, but start with 因间 (existing reports) before 死间 (new searches).
User: "The agent keeps asking me the same questions"
Apply 行军篇: This is a signal (信号). The agent is on 挂形 (entangling ground).
Action:
User: "I need to build a complete market analysis report"
Apply 兵势篇 (create momentum):
Each output feeds the next, creating 势 (momentum).
兵者,国之大事,死生之地,存亡之道,不可不察也
"War is a matter of vital importance to the State; the province of life or death; the road to survival or ruin. It is mandatory that it be thoroughly studied."
Agent deployment is the same. Treat it seriously. Plan thoroughly. Execute decisively. Review honestly.