简介
Battle-Tested Agent
原始描述
19 production-hardened patterns for AI agents — memory, verification, ambiguity handling, compaction survival, delegation, proof-based handoffs, stale-worker...
通过你的 Agent 添加
安装目录:battle-tested-agent/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: battle-tested-agent version: 1.4.0 description: > 17 production-hardened patterns for AI agents — memory, verification, ambiguity handling, compaction survival, delegation, handoffs, and self-improvement. Use when hardening an agent for production reliability, when an agent keeps hallucinating or losing context, when handoffs between agents drop details, when you need a pre-deploy checklist, or when someone says "my agent is unreliable" or "how do I make this more robust." Works with OpenClaw, Claude Code, Cowork, or any SKILL.md-based agent setup. Now includes Pattern 2a: Isolated Agent Fabrication Guard for crons and sub-agents that report real-world data without orchestrator review. author: Zye ⚡ (Don Zurbrick) license: MIT tags: [production, reliability, memory, compaction, multi-agent, security, self-improvement, heartbeat, delegation, battle-tested] homepage: https://github.com/zurbrick/battle-tested-agent metadata: openclaw: emoji: "⚔️" requires: bins: ["bash", "grep", "find", "wc"] optionalBins: ["openclaw"]
Battle-Tested Agent
16 production-hardened patterns for AI agents. Every one earned from failure.
Use this skill when you are:
- hardening an agent that will run repeatedly or autonomously
- tightening memory, verification, or anti-hallucination behavior
- reducing compaction failures, weak handoffs, or orchestration drift
- reviewing an agent workspace for missing production patterns
- debugging why an agent keeps losing context, guessing, or dropping work
Do not use this skill for:
- persona writing or onboarding polish
- one-off prompt tweaks with no reusable pattern behind them
- adding new tools, servers, or runtime capabilities
- turning a simple workspace into process theater
Default workflow
-
Audit first Run
bash scripts/audit.sh <workspace>to see which patterns are present. The script checks for all 16 patterns and tells you what to fix first. -
Start with the smallest tier that fits Implement starter patterns first, then intermediate, then advanced. Do not cargo-cult every pattern into every agent.
-
Patch the actual failure mode Change the mechanism, not just the wording. "ALWAYS check X" is not a fix — a verification gate is a fix.
-
Keep patterns lightweight Add only the pieces that materially reduce failures or operator burden.
Pattern tiers
- Starter (5): baseline reliability for almost every agent
- Intermediate (5): daily-driver patterns for briefs, heartbeats, and recurring work
- Advanced (6): multi-agent orchestration, handoffs, and self-improvement discipline
Pattern clusters
Some patterns reinforce each other naturally. Adopt them together when the failure mode calls for it:
- Trust chain: WAL Protocol + Anti-Hallucination + Agent Verification — ensures data is captured, sourced, and measured before reporting
- Handoff loop: Delegation Rules + 5-Point Handoff + Task State Tracking — prevents work from disappearing between agents
- Survival kit: Working Buffer + Compaction Injection Hardening — keeps context alive across long sessions and compaction events
- Quality gate: QA Gates + Verify Implementation + Decision Logs — ensures output quality and traceable reasoning
When patterns conflict
If two patterns seem to give contradictory advice:
- Safety patterns win over speed patterns. Ambiguity Gate overrides Simple Path First when the request is ambiguous. Verify before acting, even if the simple path is obvious.
- Evidence patterns win over action patterns. Anti-Hallucination overrides "just try it" when reporting data. Never guess a number to move faster.
Assets — how to use them
The assets/ folder contains starter files you copy into your workspace and customize.
They are templates, not drop-in replacements.
# Merge delegation and decision log rules into your existing AGENTS.md
cp assets/AGENTS-additions.md ~/workspace/ # Review, then merge
# Add QA gates
cp assets/QA-gates.md ~/workspace/QA.md
# Set up self-improvement tracking
mkdir -p ~/workspace/.learnings
cp assets/learnings-template.md ~/workspace/.learnings/LEARNINGS.md
cp assets/errors-template.md ~/workspace/.learnings/ERRORS.md
cp assets/features-template.md ~/workspace/.learnings/FEATURE_REQUESTS.md
Read references/audit-usage.md for the full rollout order and bootstrap workflow.
References
references/starter-patterns.md— WAL, anti-hallucination, ambiguity, simple-path-first, unblock-before-shelvereferences/intermediate-patterns.md— verification, working buffer, QA gates, decision logs, verify implementationreferences/advanced-patterns.md— delegation, handoffs, orchestration, task tracking, compaction hardening, recurrence trackingreferences/audit-usage.md— audit script usage, install/copy snippets, and expected outcomes
Included scripts
scripts/audit.sh— workspace audit for all 16 patterns (supports AGENTS.md, CLAUDE.md, SOUL.md, and system.md)
Rules of thumb
- Audit before expanding
- Prefer progressive disclosure over giant core files
- Silence is better than hallucination
- Ambiguity is a stop sign, not permission
- The orchestrator should preserve oversight, not sink into implementation
- Mechanism changes beat wording changes
- After acting, verify the new state before declaring success
- Partial progress is not success; recovery steps matter as much as first-attempt steps
Outcome
A leaner, more resilient agent that survives compaction, hands work off cleanly, reports only what is verified, and improves without spiraling into bureaucracy.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。