Art of War Agents

SkillDB 作者 wanikua v1.2.0

源码 ↗

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install skilldb:wanikua~art-of-war-agents
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/skilldb%3Awanikua~art-of-war-agents/file -o art-of-war-agents.md
Git 仓库获取源码
git clone https://github.com/openclaw/skills/commit/d819b37cec956bd5b6607d882574e3e0dea2ed26
---
name: art-of-war-agents
description: Apply Sun Tzu's Art of War to AI agent orchestration. Use for: task assessment (五事七计), deployment decisions, multi-agent strategy, token cost optimization, risk management, and agent collaboration patterns. Maps all 13 chapters to practical agent workflows with decision trees and troubleshooting.
---

# 📜 Art of War Agents

> 兵者,国之大事,死生之地,存亡之道,不可不察也
>
> "War is vital — the province of life or death. It must be thoroughly studied."

**Sun Tzu's 13 chapters → AI agent orchestration patterns.**

This skill provides a complete framework for strategic agent deployment: when to use agents, which ones, how to organize them, and how to avoid wasting tokens on unwinnable battles.

---

## ⚡ Quick Reference Card

```
┌─────────────────────────────────────────────────────────────┐
│           ART OF WAR AGENT DECISION FLOW                    │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  1. 始计 → 值得做吗?(五事七计评估)                          │
│     ├─ Score ≥70% → 部署                                    │
│     ├─ Score 50-70% → 先补弱点                              │
│     └─ Score <50% → 不做,重新规划                          │
│                                                             │
│  2. 谋攻 → 能不做吗?(上兵伐谋)                             │
│     ├─ 可自动化/消除 → 不做                                 │
│     ├─ 单 agent 可解 → 单 agent                               │
│     └─ 必须多 agent → 继续                                  │
│                                                             │
│  3. 作战 → 预算多少?(速战速决)                             │
│     ├─ <10k tokens → 单 agent,快速迭代                       │
│     └─ >10k tokens → 多 agent,设检查点                      │
│                                                             │
│  4. 军形 → 有风险吗?(先胜后战)                             │
│     ├─ 高风险 → 防御优先,多重验证                          │
│     └─ 低风险 → 速度优先                                    │
│                                                             │
│  5. 部署 → 监控信号 (行军篇)                                │
│     ├─ 重复提问 → 补充上下文                                │
│     ├─ 输出变长但质量降 → 强制简洁                          │
│     ├─ 过度自信 → 要求来源                                  │
│     └─ 循环论证 → 介入重定向                                │
│                                                             │
│  6. 验证 → 三反原则 (用间篇)                                │
│     └─ 至少 3 个独立来源交叉验证                              │
│                                                             │
└─────────────────────────────────────────────────────────────┘
```

---

## 🎯 Core Principles

### 知彼知己 (Know Enemy, Know Yourself)
- **知彼**: Understand the task deeply — requirements, constraints, success criteria
- **知己**: Know your agents' capabilities, limitations, and costs
- **百战不殆**: With both, every agent deployment is calculated, not hopeful

### 上兵伐谋 (Best Strategy Attacks Plans)
- Planning > Execution. Invest in task analysis before spawning agents
- A well-planned single agent beats three confused agents
- "Win before fighting" — structure the problem so the solution is obvious

### 奇正相生 (Orthodox + Unorthodox)
- **正**: Standard workflows, proven patterns, reliable agents
- **奇**: Creative approaches, novel combinations, experimental agents
- Use 正 for reliability, 奇 for breakthrough. Never rely on 奇 alone.

### 速战速决 (Speed is Essential)
- Prolonged agent runs waste tokens and drift from intent
- Set clear termination conditions upfront
- If an agent isn't making progress in 2-3 iterations, reassess

### 先胜后战 (Victory Before Battle)
- Ensure conditions favor success before deploying agents
- If you can't articulate what "winning" looks like, don't start
- Retreat is better than wasting resources on unwinnable tasks

---

## The Thirteen Chapters → Agent Patterns

### 1. 始计篇 (Laying Plans) — Task Assessment

**Before deploying any agent, run the Five Constants + Seven Metrics:**

**五事 (Five Constants):**
1. **道 (Wisdom)**: Does this task align with overall goals?
2. **天 (Timing)**: Is now the right time? Dependencies ready?
3. **地 (Environment)**: Do we have the right context/data/tools?
4. **将 (Capability)**: Which agent(s) have the right skills?
5. **法 (Process)**: What's the workflow? Success criteria?

**七计 (Seven Metrics):**
- Which side has better task clarity?
- Which side has more capable agents?
- Which side has better context/data?
- Which side has clearer success criteria?
- Which side has better tool access?
- Which side has more disciplined execution?
- Which side will waste fewer resources?

**Decision**: If you can't answer these, don't deploy. Plan first.

### 2. 作战篇 (Waging War) — Cost Awareness

**Agent runs cost tokens. Treat them like war costs:**

- **速战速决**: Set iteration limits. Force conclusions.
- **因粮于敌**: Use existing outputs/data; don't regenerate what exists
- **胜久则钝**: Long-running agents lose focus and waste tokens
- **预算先行**: Estimate token cost before starting; track as you go

**Rule**: If a task can be done in 1 agent iteration, don't use 3.

### 3. 谋攻篇 (Attack by Stratagem) — Planning Over Force

**Hierarchy of agent deployment:**

1. **上策**: Restructure the problem so it solves itself (no agent needed)
2. **中策**: Single focused agent with clear instructions
3. **下策**: Multiple agents in complex orchestration

**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.

### 4. 军形篇 (Tactical Dispositions) — Defense First

**Before offense, ensure defense:**

- What can go wrong? (Hallucination, outdated info, tool failures)
- What's the rollback plan if the agent makes things worse?
- What guardrails prevent catastrophic outputs?

**先为不可胜**: Make yourself undefeatable first — have validation, version control, and undo capability.

**以待敌之可胜**: Then wait for the opportunity — deploy when conditions are favorable.

### 5. 兵势篇 (Energy/Impetus) — Momentum & Combination

**Create unstoppable momentum:**

- **势 (Shi)**: Build configurations where each agent output naturally triggers the next
- **奇正**: Combine standard agents (正) with creative approaches (奇)
- **节 (Timing)**: Release agents in waves, not all at once

**Example pattern**: Research agent → Synthesis agent → Critique agent → Final polish
Each builds on the previous, creating momentum.

### 6. 虚实篇 (Weak Points & Strong) — Strategic Targeting

**Avoid strength, attack weakness:**

- Identify the **critical bottleneck** in the task
- Don't waste agent capacity on parts you can handle yourself
- Deploy agents where they have **comparative advantage**

**避实击虚**: 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.

### 7. 军争篇 (Maneuvering) — Indirect Approaches

**The longest path may be fastest:**

- Sometimes 2-3 focused agents beat 1 generalist agent
- Sometimes doing background research first saves 10 iterations later
- "Appear weak when strong" — let the agent explore naive approaches first, then guide

**以迂为直**: A seeming detour (extra planning, extra validation) often reaches the goal faster.

### 8. 九变篇 (Nine Variations) — Adaptability

**Agents must adapt to changing conditions:**

- Have **contingency plans**: If agent A fails, what's plan B?
- **将在外,君命有所不受**: Give agents autonomy within boundaries
- Recognize when to **change strategy** mid-execution

**Five dangerous agent faults:**
1. Reckless iteration (burns tokens)
2. Excessive caution (never completes)
3. Quick temper (argues with user)
4. Over-optimization (loses the goal)
5. Blind compliance (no pushback on bad instructions)

Watch for these; intervene early.

### 9. 行军篇 (Marching) — Environmental Awareness

**Read the signals:**

- **相敌 (Observing the enemy)**: Watch agent outputs for drift, hallucination, confusion
- **信号 (Signals)**: