agent-workflow
Expert system for designing and architecting AI agent workflows based on proven Meta methodologies. Use when users need to build AI agents, create agent workflows, solve problems using agentic systems, integrate multiple tools into agent architectures, or need guidance on agent design patterns. Helps translate business problems into structured agent solutions with clear scope, tool integration, and multi-layer architecture planning.
What this skill does
# Agent Workflow Designer
## Overview
This skill guides the design and architecture of AI agent workflows using proven methodologies. When a user presents a problem, this skill helps structure an agent-based solution following the 9-step building process and 8-layer architecture framework validated at Meta.
## Workflow Decision Tree
When a user shares a problem or requests agent design help:
1. **Assess the problem scope**
- Is the problem clearly defined? → Proceed to Problem Analysis
- Is the problem vague? → Ask clarifying questions about desired outcomes and constraints
2. **Determine architecture complexity**
- Simple task (single action)? → Single agent with basic tools
- Complex task (multiple sub-tasks)? → Consider multi-agent orchestration
- Integration task (connecting systems)? → Focus on Layer 4 (Tooling) design
3. **Follow the appropriate workflow**
- **New agent from scratch** → Apply 9-Step Building Process
- **Existing agent improvement** → Focus on specific layers needing enhancement
- **Tool integration problem** → Apply MCP and tooling patterns
## 9-Step Agent Building Process
Use this sequential workflow when designing a new agent from scratch:
### Step 1: Define Purpose and Scope
**Key principle:** Start with job-to-be-done, not technology.
Ask the user:
- What specific outcome does the end user need?
- What are the constraints (budget, time, resources)?
- What's the success metric?
**Bad scope example:**
"An AI assistant for customer service"
**Good scope example:**
"An agent that takes customer complaints, pulls order history from Shopify API, and drafts refund approvals for orders under $200"
**Decision point:** Narrow scope = better performance. Resist building Swiss Army knives.
### Step 2: Structure Inputs and Outputs
Treat the agent as a function with structured interfaces:
**Inputs:**
- Use JSON schemas or Pydantic models, not free text
- Define required vs. optional fields
- Specify data types and validation rules
**Outputs:**
- Return data objects, not prose
- Define clear error states
- Include confidence scores when relevant
**Example structure:**
```json
Input: {
"complaint_text": "string",
"customer_id": "string",
"order_id": "string (optional)"
}
Output: {
"action": "approve_refund | escalate | request_info",
"refund_amount": "number",
"reasoning": "string",
"confidence": "number"
}
```
### Step 3: Write System Instructions
**Critical:** Spend 80% of design time here.
Include in system prompt:
- **Role definition:** "You are a sales qualification specialist..."
- **Behavioral guidelines:** "Always ask for budget before proposing solutions"
- **Output format requirements:** Specify JSON structure, word limits, tone
- **Edge case handling:** What to do when data is missing or ambiguous
**Testing strategy:** A great system prompt can make GPT-3.5 outperform poorly prompted GPT-4.
### Step 4: Enable Reasoning and External Actions
**ReAct Framework Pattern:**
1. **Reason:** Analyze the current state and decide next action
2. **Act:** Call an API, use a tool, or make a decision
3. **Observe:** Review the result and determine if goal is achieved
**Start simple:**
- Begin with if/then logic before complex reasoning chains
- Add tools incrementally (don't overwhelm with 50 tools at once)
- Test each tool integration independently
**Common tools to integrate:**
- Calculators for math operations
- Web browsers for research
- Database queries for data retrieval
- API calls to external systems
### Step 5: Orchestrate Multiple Agents (When Needed)
**When to use multi-agent architecture:**
- Task has clearly separable sub-tasks
- Different sub-tasks require different expertise
- Parallel processing would improve speed
**When NOT to use multi-agent:**
- Simple linear workflows
- Tasks that require continuous context
- When handoff complexity exceeds benefit
**Common 4-agent pattern:**
1. **Research Agent:** Gathers information from sources
2. **Analysis Agent:** Processes and synthesizes data
3. **Writing Agent:** Creates structured outputs
4. **QA Agent:** Reviews quality and accuracy
**Keep handoffs simple:** Complex orchestration = complex failures.
### Step 6: Implement Memory and Context
Three types of memory to consider:
**Conversation history:**
- What happened this session
- Recent user interactions
- Current task state
**User context:**
- User preferences and settings
- Past interaction patterns
- Historical decisions
**Knowledge retrieval:**
- Relevant information from knowledge base
- Similar past cases
- Domain-specific context
**Implementation guidance:**
- Start with simple conversation buffers
- Add vector databases only when needing semantic search across large datasets
- Consider memory retrieval latency in architecture
### Step 7: Add Multimedia Capabilities
Modern agents should handle:
- Voice input/output for accessibility
- Image understanding for visual tasks
- Document processing (PDF, DOCX, spreadsheets)
**Strategic approach:** Add capabilities based on actual user needs, not "nice-to-haves."
### Step 8: Format and Deliver Results
**Output is your product's UX.** Design outputs for:
**Human consumption:**
- Clear formatting and structure
- Scannable with headers and bullets
- Professional appearance
**System consumption:**
- Valid JSON/XML
- Consistent field names
- Error codes for handling
**Quality standard:** Great agent outputs look like a human created them.
### Step 9: Build Interface or API
Delivery method options:
- Chat interface for conversational tasks
- API endpoints for system integration
- Integration with existing tools (Slack, email, CRM)
**Best practice:** The best agents feel invisible—they just make things happen.
## 8-Layer Architecture Framework
When analyzing agent architecture needs, consider which layers require attention:
### Layer 1: Infrastructure
**Foundation:** Cloud, databases, APIs, compute resources
**Key considerations:**
- GPU/TPU requirements for inference
- Data storage and retrieval speed
- Load balancing for scale
- Monitoring and observability
**Common mistake:** Underestimating compute needs—agents make more API calls than traditional apps.
### Layer 2: Agent Internet
**Operating system for agents:** Identity, state management, inter-agent communication
**Current state:** Mostly custom-built, but platforms like LangChain and CrewAI are emerging.
### Layer 3: Protocol
**Standards for interoperability:** MCP (Model Context Protocol) is becoming the standard
**Key principle:** Bet on open standards, not proprietary solutions. MCP allows any tool to work with any agent.
### Layer 4: Tooling Enrichment
**Agent superpowers:** RAG systems, function calling, external integrations
**Quality over quantity:** 5 rock-solid tools > 50 flaky integrations
**Tool categories:**
- Data retrieval (databases, APIs)
- Computation (calculators, processors)
- Communication (email, messaging)
- Content creation (documents, reports)
### Layer 5: Cognition Reasoning
**The brain:** Planning, decision-making, error handling
**Critical elements:**
- Guardrails to prevent hallucinations
- Error recovery strategies
- Confidence scoring
- Graceful degradation
**User forgiveness:** Users forgive agents that fail gracefully, not ones that spiral into nonsense.
### Layer 6: Memory Personalization
**Human touch:** Personal context, preferences, conversation history
**Start simple:** Store user preferences and conversation context before building complex personalization.
### Layer 7: Application
**User-facing products:** The actual agent functionality users interact with
**Focus strategy:** Nail one use case before expanding to others.
### Layer 8: Ops Governance
**Risk management:** Monitoring, cost control, privacy, oversight
**Build from day one:** Retrofitting governance is expensive and painful.
**Key components:**
- Cost tracking per agent action
- Privacy enforcement and data handling
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.