agentsclimarketplace

Agent patterns

Skill TheWatcher01/skills/.claude/skills/agent-patterns

Agent Skills collection — Reusable capabilities for AI coding agents. Install: npx skills add TheWatcher01/skills

Install
npx -y skills add TheWatcher01/skills --skill agent-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Design and implement autonomous AI agent architectures using SOTA patterns. USE when: building multi-agent systems, designing agent workflows, choosing between agent patterns (chaining vs routing vs parallelization), implementing orchestrator-worker pipelines, adding evaluator-optimizer loops, or when the user says "build an agent", "automate this workflow", "make agents work together", "design a multi-agent system". Based on Anthropic "Building Effective Agents" (Dec 2024).

SKILL.md

5.4 KB, as published. Nobody here has run it

Skill: Agent Patterns — SOTA

"The best agent is the simplest one that solves the problem." — Anthropic, 2024

Decision Tree — Choose Pattern

What does the task need?

├── Simple linear task → Prompt Chaining (A → B → C)
├── Different task types to handle → Routing (classify → specialist)
├── Independent subtasks → Parallelization (run in parallel, merge)
│   └── Need consensus → Voting (run N times, majority)
├── Complex task needing delegation → Orchestrator-Workers
│   └── Dynamic subtasks, unknown upfront → Orchestrator-Workers
├── Output quality critical → Evaluator-Optimizer loop
│   └── Generate → Evaluate → Refine → Repeat
└── Need real-world interaction → ReAct / Tool-Call loop

Pattern 1: Prompt Chaining

Best for: sequential transformations where each step builds on the last.

Input → [Step 1: Extract] → [Step 2: Transform] → [Step 3: Format] → Output

ZeroClaw SOP:
[[steps]]
  action = "call_model"
  prompt = "Step 1: Extract key facts from: {input}"

[[steps]]
  action = "call_model"
  prompt = "Step 2: Analyze these facts: {previous_output}"

Use when: research → summarize → format report.

Pattern 2: Routing

Best for: different task types needing different specialists.

Input → [Classifier] → Route A (code task) → Code Agent
                    ↘ Route B (research task) → Research Agent
                    ↘ Route C (data task) → Data Agent

ZeroClaw: Use hint: routing in model_routes

Use when: customer support tickets, mixed-task automation.

Pattern 3: Parallelization

Best for: independent subtasks that can run simultaneously.

Input ──→ [Agent A: Section 1] ──→ [Aggregator] → Output
       ├─→ [Agent B: Section 2] ──→
       └─→ [Agent C: Section 3] ──→

# Voting variant (for reliability):
Input → [Agent 1] → Vote → Majority
     → [Agent 2] → Vote →
     → [Agent 3] → Vote →

Use when: analyzing multiple documents, parallel research, consensus decisions.

Pattern 4: Orchestrator-Workers

Best for: complex tasks where subtasks aren't known upfront.

[Orchestrator]
    ↓ plans
[Worker 1] → result → [Orchestrator synthesizes]
[Worker 2] → result →       ↓
[Worker N] → result → Final output
# ZeroClaw delegate agent config
[agents.researcher]
provider = "openrouter"
model = "openai/gpt-oss-120b:free"
system_prompt = "You are a research specialist. Return structured findings only."
agentic = false

[agents.coder]
provider = "groq"
model = "llama-3.1-8b-instant"
system_prompt = "You are a code specialist. Return working code only."
agentic = false

Use when: software development (plan → implement → test), complex analysis.

Pattern 5: Evaluator-Optimizer

Best for: quality-critical outputs (code, reports, decisions).

[Generator] → Output → [Evaluator: score 1-10]
                              ↓
                     score < 8? → [Refiner] → loop
                     score ≥ 8? → Done

Implementation:

for attempt in range(max_attempts):
    output = generator.run(task)
    score, feedback = evaluator.score(output)
    if score >= threshold:
        return output
    task = f"Improve this output based on: {feedback}\n\nPrevious: {output}"

Use when: writing quality content, code correctness, decision validation.

ACI Design (Agent-Computer Interface)

"Tool documentation is more important than tool quantity."

Good tool design:

# ✅ Poka-yoke tool (hard to misuse)
def file_read(path: str, max_bytes: int = 10000) -> str:
    """Read file contents. Max 10KB. Returns empty string if not found."""
    ...

# ❌ Dangerous tool (easy to misuse)
def run_command(cmd: str) -> str:
    """Run any shell command."""
    ...

Principles:

  1. Minimize tools: 5 great tools > 20 mediocre ones
  2. Poka-yoke: defaults that prevent misuse
  3. Clear names: file_read_lines not process_data
  4. Error clarity: "File not found: config.toml" not "Error: ENOENT"
  5. Atomic operations: one tool = one action

Autonomy Levels (match to task risk)

TaskLevelPattern
Research, read-onlyread_onlyChaining/Routing
Code generation, analysissupervisedOrchestrator-Workers
File modificationssupervised + approvalEvaluator-Optimizer
System administrationsupervised + always_askChaining only

When NOT to Use Agents

  • Simple single-step tasks (just use direct LLM call)
  • Tasks needing 100% determinism (use traditional code)
  • Real-time requirements < 100ms (agents are slow)
  • Tasks where errors are unrecoverable (use human approval gate)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.