agent-design
Design AI agents with recommended patterns and architectures
What this skill does
# Agent Design
Skill for designing high-performance AI agents following 2025 patterns.
## Documentation
- [patterns.md](docs/patterns.md) - Multi-agent architecture patterns
- [workflows.md](docs/workflows.md) - Recommended workflows
## Fundamental Distinction
### Workflows vs Agents
| Type | Control | When to use |
|------|---------|-------------|
| **Workflow** | Code orchestrates LLM | Predictable tasks, need for control |
| **Agent** | LLM directs its actions | Flexibility, adaptive decisions |
**Golden rule:** Start simple, add complexity if necessary.
## Agent Architecture
### Minimal Structure
```yaml
Agent:
identity: Who am I?
capabilities: What can I do?
tools: What tools do I have?
constraints: What are my limits?
workflow: How should I proceed?
```
### Complete Structure (Production)
```markdown
---
name: my-agent
description: Short description
model: sonnet|opus
tools: [list of tools]
skills: [associated skills]
---
# Identity
[Who the agent is]
# Capabilities
[What it can do]
# Workflow
[Steps to follow]
# Tools
[How to use each tool]
# Constraints
[Limits and rules]
# Examples
[Use cases]
# Forbidden
[What it must NEVER do]
```
## Agent Patterns
### 1. Single Agent (Simple)
```
User → Agent → Response
```
**Usage:** Simple tasks, rapid prototyping.
### 2. Agent + Tools
```
User → Agent ↔ Tools → Response
↑
Tool Results
```
**Usage:** Tasks requiring external access (API, files, DB).
### 3. Orchestrator + Subagents
```
User → Orchestrator → Subagent 1 (specialized)
→ Subagent 2 (specialized)
→ Subagent 3 (specialized)
↓
Synthesis → Response
```
**Usage:** Complex tasks, separation of responsibilities.
### 4. Sequential Pipeline
```
User → Agent 1 → Agent 2 → Agent 3 → Response
(Analyze) (Plan) (Execute)
```
**Usage:** Linear processes (e.g., Analyst → Architect → Developer).
## Fresh Eyes Principle
**Key 2025 concept:** Each sub-agent must have a "fresh" context.
```
❌ Bad: Pass entire history to each sub-agent
✅ Good: Give only necessary information
Orchestrator:
- Keeps complete history
- Extracts relevant context for each sub-agent
- Synthesizes results
```
## Design Checklist
### Before creating an agent
- [ ] Is the objective clear?
- [ ] Would a simple workflow suffice?
- [ ] What tools are needed?
- [ ] What guardrails are required?
### During design
- [ ] Is identity well defined?
- [ ] Is workflow explicit?
- [ ] Are error cases handled?
- [ ] Are examples relevant?
### After creation
- [ ] Standard case tests?
- [ ] Edge case tests?
- [ ] Security tests (jailbreak)?
- [ ] Acceptable performance?
## Claude Code Agent Template
```markdown
---
name: [kebab-case-name]
description: [1-2 lines max]
model: sonnet
color: blue
tools: Read, Edit, Write, Bash, Grep, Glob
skills: [associated-skills]
---
# [Agent Name]
[Purpose description]
## Core Principles
1. **[Principle 1]**: [Short explanation]
2. **[Principle 2]**: [Short explanation]
## Workflow (MANDATORY)
### Phase 1: [Name]
```
[Numbered actions]
```
### Phase 2: [Name]
```
[Numbered actions]
```
## Output Format
[Response structure]
## Forbidden
- [Prohibition 1]
- [Prohibition 2]
```
## Anti-Patterns to Avoid
### ❌ Omniscient agent
```
You know everything and can do anything.
```
### ✅ Specialized agent
```
You are an expert in [specific domain].
For topics outside your domain, redirect to the appropriate agent.
```
### ❌ Implicit instructions
```
Do what's logical.
```
### ✅ Explicit instructions
```
Step 1: Analyze the problem
Step 2: Propose 3 solutions
Step 3: Recommend the best with justification
```
### ❌ No error handling
```
Execute the task.
```
### ✅ Explicit error handling
```
IF the task fails:
1. Identify the cause
2. Propose an alternative
3. Ask for confirmation before retrying
```
## Forbidden
- Never create an agent without explicit workflow
- Never give access to all tools without necessity
- Never ignore the principle of least privilege
- Never forget security guardrails
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.