Skip to content
Back to skills

Agent Patterns

ASecurity

Choose the right LLM workflow or agent architecture (prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, autonomous loop) when designing an AI pipeline, agent, bot or automation, or when splitting a large task across subagents.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsgo

Works with

  • claude code

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add alptugince/claude-code-ai-harness-kit --skill agent-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alptugince-agent-patterns/badge)](https://www.skillsdirectory.com/skills/alptugince-agent-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-patterns
description: Choose the right LLM workflow or agent architecture (prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, autonomous loop) when designing an AI pipeline, agent, bot or automation, or when splitting a large task across subagents.
---

# Agent patterns

Start with the simplest thing that works. Add structure only when it measurably improves results.

## Decision guide
| Situation | Pattern |
|---|---|
| One call with good context and tools is enough | Augmented LLM (single call, structured output, tools, retrieval) |
| Fixed sequence of steps, each consuming the previous output | Prompt chaining, with programmatic gates between steps |
| Inputs fall into distinct categories that need different handling | Routing: a classifier with structured output picks the branch |
| Independent subtasks, or several perspectives on one task | Parallelization: sectioning (split) or voting (same task, several runs, aggregate) |
| Subtasks unknown until the input is analysed | Orchestrator-workers: a planner emits a structured list of subtasks, workers run them, a synthesizer merges |
| Clear quality criteria and iteration helps | Evaluator-optimizer: generator → grader with structured feedback → regenerate until it passes or a limit is hit |
| Open-ended task, unpredictable number and order of steps | Agent: tool calls in a loop with environment feedback until done |

## Build rules
- Structured outputs (JSON schema / typed models) at every decision point; routing and grading on free text is fragile.
- Every loop has a hard limit (iterations, tokens, time) and a defined failure result.
- Tools: few, well named, with clear descriptions, examples and errors that tell the model how to recover. Return concise, relevant tool results.
- Ground truth from the environment beats self-assessment: tests, compilers, schema validators and real execution make the best evaluators.
- Put human approval before irreversible or external actions (sending, publishing, paying, deleting, merging).
- Keep state explicit (a typed state object or files) so runs can be paused, inspected, resumed and replayed.
- Log every call, tool call and decision; those transcripts feed `memory-dream` and `skill-eval`.

## In Claude Code
- Orchestrator-workers and parallelization map to subagents: the main session plans and spawns subagents with a precise brief each (inputs, output format, what not to touch), then synthesizes.
- Evaluator-optimizer maps to a generator session plus the `reviewer` or `verifier` subagent, or to the project gate via the Stop hook.
- Routing maps to skills: good skill descriptions are the router.

## Verify the design
Before building the full system, run the chosen pattern on 3-5 real inputs and compare against the simpler alternative one row up in the table. Keep the extra structure only if it wins.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.