agentsclimarketplace

Agent architect

Skill ravi2799/ai-agent-skills/skills/agent-architect

Skills that help AI agents build better AI agents — prompt engineering, architecture, evaluation, and more.

Install
npx -y skills add ravi2799/ai-agent-skills --skill agent-architect

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

  • 3 stars3 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

Use this skill when designing, reviewing, or debugging multi-agent systems. Triggers include "design an agent system", "how should I structure my agents", "review this agent architecture", "why is my agent looping", "add another agent", "single vs multi-agent", or any task involving agent orchestration, handoffs, tool selection, memory design, or multi-agent coordination.

SKILL.md

9.7 KB, as published. Nobody here has run it

Agent Architect Skill

A skill that governs how to design, review, or debug multi-agent systems.

Identify which operation applies, then follow the corresponding section.


Operation: DESIGN — Designing an Agent System

Required Input from Previous Phases

If data-scientist (Phase 0) and context-engineer (Phase 0.5) have run, use their output:

  • Problem Statement — from data-scientist (what we're solving, who needs it, what success looks like)
  • Data Profile — from data-scientist (what data exists, what's signal vs noise)
  • Context Spec — from context-engineer (how data loads into context, token budget, loading strategy)

Do not re-discover what Phase 0 already answered. The problem statement IS your starting point — design the agent to solve THAT problem with THAT data.

Pre-Design Checklist

Before proposing any architecture, verify:

  • I have the problem statement from data-scientist (or directly from the user)
  • I have the context spec from context-engineer (if data is involved)
  • I have considered whether a single agent can handle it (start here)
  • I know the tools available or needed
  • I know the input/output contract — what goes in, what comes out
  • I have identified failure modes and how to handle them

If any item is unclear, ask the user before designing.

Rule 1 — Start with One Agent

A single agent with good tools solves most problems. Add agents only when:

  • The task has distinct phases requiring different expertise or tool sets
  • Context window limits force splitting long workflows
  • Parallel execution of independent subtasks provides meaningful speedup
  • Safety boundaries require separating privileged from unprivileged operations

If none of these apply, use one agent.

Rule 2 — One Task, One Agent (Critical for Accuracy)

An agent that does one thing does it well. An agent that does many things does all of them poorly.

Splitting responsibilities into single-task agents dramatically improves accuracy because:

  • The agent's full context window focuses on one objective
  • Tool selection is unambiguous — fewer tools means fewer wrong choices
  • Prompts stay short and specific — no competing instructions
  • Failures are isolated — one agent failing does not corrupt another's work
  • Evaluation is straightforward — test one behavior, not a bundle

Every agent must have:

  • One task — describable in a single sentence without "and"
  • A defined tool set — only the tools needed for that one task
  • Clear input/output contracts — what it receives, what it returns
  • No overlap with other agents' responsibilities

Test: If your agent description contains "and" (e.g., "parses logs and generates reports"), split it into two agents.

Before:

Agent: "general helper" — has all tools, handles everything
  Result: mediocre at all tasks, picks wrong tools, bloated context

After:

Agent 1: "code reviewer" — receives a diff, returns structured feedback
  Tools: read_file, grep, run_tests
  Input: { diff: string, context: string }
  Output: { issues: [{severity, file, line, message}], summary: string }

Agent 2: "report generator" — receives review results, produces markdown report
  Tools: write_file, format_markdown
  Input: { issues: [...], summary: string }
  Output: { report_path: string }

Rule 3 — Choose an Orchestration Pattern

PatternWhen to UseHow It Works
SequentialOrdered pipeline (parse → validate → transform)Each agent's output feeds the next agent's input
ParallelIndependent subtasks (lint + test + typecheck)Run simultaneously, aggregate results
HierarchicalComplex task needing delegationOrchestrator breaks task down, delegates to specialists, synthesizes
RouterInput determines which specialist to useClassifier directs to the right agent based on input type

Prefer deterministic routing (if/else, regex, keyword match) over LLM-based routing when the categories are well-defined. Use LLM routing only when input is ambiguous.

Rule 4 — Design State and Memory

  • Use structured formats (JSON objects) for state that agents read/write
  • Use unstructured text for progress notes and reasoning traces
  • Keep shared state minimal — pass only what the next agent needs
  • For long-running tasks, use checkpoints (git commits, file snapshots) so work is not lost on failure

Rule 5 — Define Handoff Protocols

For each handoff between agents, specify:

  1. Trigger — what condition causes the handoff
  2. Payload — exactly what data transfers (not "everything")
  3. Context — minimal background the receiving agent needs
  4. Fallback — what happens if the receiving agent fails

Rule 6 — Design for Failure

Every agent system must handle:

  • Agent failure — one agent errors or returns garbage → retry with backoff, then escalate
  • Loops — agent calls the same tool repeatedly → circuit breaker after N attempts
  • Context overflow — input too large → summarize or chunk before passing
  • Wrong routing — input goes to the wrong agent → add a catch-all with re-routing logic

Rule 7 — Design for Observability

Log these events at minimum:

  • Agent activation (which agent, why, what input)
  • Tool calls (which tool, what arguments, what result)
  • Handoffs (from which agent, to which agent, what payload)
  • Failures (what failed, what fallback was taken)
  • Final output (what was returned to the user)

Operation: REVIEW — Reviewing an Agent Architecture

Evaluation Dimensions

DimensionScore 1Score 5
SimplicityOver-engineered, too many agentsMinimal agents, each clearly justified
Responsibility clarityOverlapping or vague rolesEach agent has one sentence job description
Tool coverageMissing tools or unnecessary toolsEach agent has exactly the tools it needs
Error handlingNo failure handlingRetries, circuit breakers, fallbacks defined
State managementEntire context shared everywhereMinimal, structured state passed explicitly
ObservabilityNo loggingAll decisions, handoffs, and failures logged

Output Format

## Agent Architecture Review

### Scores
| Dimension              | Score (1-5) | Notes |
|------------------------|-------------|-------|
| Simplicity             |             |       |
| Responsibility clarity |             |       |
| Tool coverage          |             |       |
| Error handling         |             |       |
| State management       |             |       |
| Observability          |             |       |

### Overall Score: X / 30

### Critical Issues
- ...

### Suggestions
- ...

Common Anti-Patterns

  • The everything agent — one agent with all tools and no clear role
  • Premature multi-agent — using 5 agents where 1 would suffice
  • Context dumping — passing entire conversation history between agents instead of a summary
  • LLM router for known categories — using an LLM to classify when a regex or keyword match works
  • No failure path — no defined behavior when an agent errors
  • Circular handoffs — Agent A calls Agent B calls Agent A

Operation: DEBUG — Diagnosing Agent Issues

Systematic Diagnosis

When an agent system misbehaves, check in this order:

  1. Check routing — Is the right agent receiving the task? Log the routing decision.
  2. Check tool definitions — Are tool names, descriptions, and schemas correct? The model reads these to decide which tool to call.
  3. Check context size — Is the agent receiving too much or too little context? Measure token count.
  4. Check handoff contracts — Is the payload between agents complete? Missing fields cause downstream failures.
  5. Check for loops — Is an agent calling the same tool repeatedly? Add a call counter.
  6. Check output format — Is the agent returning what the next step expects? Schema mismatches cause silent failures.

Common Failure Modes

SymptomLikely CauseFix
Agent loops on same toolTool returns unhelpful result, agent retriesImprove tool error messages, add circuit breaker
Agent calls non-existent toolTool name mismatch or hallucinationVerify tool names match exactly, reduce tool count
Context overflow errorsToo much state passed between agentsSummarize context, pass only what's needed
Wrong agent handles taskRouter misclassifies inputAdd examples to router, use deterministic rules
Agent produces empty outputMissing required contextCheck input contract, ensure all required fields present
Cascading failuresNo error isolation between agentsAdd try/catch per agent, define fallback behavior

Post-Design Verification

After designing, reviewing, or debugging, confirm:

  • Each agent has a one-sentence role description
  • No two agents have overlapping responsibilities
  • Tool sets are minimal — no agent has tools it does not need
  • Input/output contracts are explicit for every handoff
  • Failure handling is defined for every agent
  • State passed between agents is minimal and structured
  • The system could be explained to a new team member in under 2 minutes

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.