From ald-skills
Expert system for designing and architecting AI agent workflows based on proven Meta methodologies. Use when building AI agents, designing multi-agent systems, integrating tools into agent architectures, choosing between single vs. multi-agent setups, or translating a business problem into an agentic solution. Triggers on: "build an agent", "design agent workflow", "multi-agent system", "agent architecture", "how should I structure this agent". Covers 9-step building process, 8-layer architecture framework, MCP integration, and pitfall avoidance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ald-skills:agent-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
When a user shares a problem or requests agent design help:
Assess the problem scope
Determine architecture complexity
Follow the appropriate workflow
Use this sequential workflow when designing a new agent from scratch:
Key principle: Start with job-to-be-done, not technology.
Ask the user:
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.
Treat the agent as a function with structured interfaces:
Inputs:
Outputs:
Example structure:
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"
}
Critical: Spend 80% of design time here.
Include in system prompt:
Testing strategy: A great system prompt can make GPT-3.5 outperform poorly prompted GPT-4.
ReAct Framework Pattern:
Start simple:
Common tools to integrate:
When to use multi-agent architecture:
When NOT to use multi-agent:
Common 4-agent pattern:
Keep handoffs simple: Complex orchestration = complex failures.
Three types of memory to consider:
Conversation history:
User context:
Knowledge retrieval:
Implementation guidance:
Modern agents should handle:
Strategic approach: Add capabilities based on actual user needs, not "nice-to-haves."
Output is your product's UX. Design outputs for:
Human consumption:
System consumption:
Quality standard: Great agent outputs look like a human created them.
Delivery method options:
Best practice: The best agents feel invisible—they just make things happen.
When analyzing agent architecture needs, consider which layers require attention:
Foundation: Cloud, databases, APIs, compute resources
Key considerations:
Common mistake: Underestimating compute needs—agents make more API calls than traditional apps.
Operating system for agents: Identity, state management, inter-agent communication
Current state: Mostly custom-built, but platforms like LangChain and CrewAI are emerging.
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.
Agent superpowers: RAG systems, function calling, external integrations
Quality over quantity: 5 rock-solid tools > 50 flaky integrations
Tool categories:
The brain: Planning, decision-making, error handling
Critical elements:
User forgiveness: Users forgive agents that fail gracefully, not ones that spiral into nonsense.
Human touch: Personal context, preferences, conversation history
Start simple: Store user preferences and conversation context before building complex personalization.
User-facing products: The actual agent functionality users interact with
Focus strategy: Nail one use case before expanding to others.
Risk management: Monitoring, cost control, privacy, oversight
Build from day one: Retrofitting governance is expensive and painful.
Key components:
When a user presents a problem:
Step 1: Clarify the problem
Step 2: Assess agent appropriateness Not every problem needs an agent. Consider:
Step 3: Map to architecture Using the 8 layers, identify which need focus:
Step 4: Design workflow Apply the 9-step building process, calling out:
Step 5: Identify implementation path Based on user's role and resources:
When tools support MCP:
Advantage: Write once, use with any agent.
When building custom integrations:
CRM Integration (Salesforce, HubSpot):
Communication Tools (Slack, Email):
Data Sources (Databases, APIs):
Example - Customer Support:
Single agent sufficient for: "Take customer complaint, pull order history, draft refund approval"
Multi-agent beneficial for: "Monitor social media, categorize issues, research solutions, generate responses, escalate critical cases, track resolution"
Problem: Trying to build a general-purpose assistant Solution: Define narrow, specific job-to-be-done with clear success metrics
Problem: Giving agent 50+ tools upfront Solution: Start with 5 essential tools, add incrementally based on actual needs
Problem: Generic or minimal instructions Solution: Invest 80% of time crafting detailed system prompt with examples and edge cases
Problem: Agent breaks on unexpected inputs Solution: Design graceful degradation, clear error states, and fallback behaviors
Problem: Runaway API costs from inefficient agent design Solution: Build cost monitoring from day one, implement caching, optimize prompt length
Problem: Building all 8 layers simultaneously Solution: Start with Layers 4, 5, 7 (tools, reasoning, application), add others as needed
When providing agent workflow solutions, structure the response as:
When users ask about existing tools:
Category 1: Consumer Agents (Built-In)
Category 2: No-Code Builders
Category 3: Developer-First Platforms
Category 4: Specialized Agent Apps
brainstorming — For scoping the agent's purpose and data flows before buildingplanning — For breaking the agent implementation into atomic tasksfull-stack-build — For building agent-backed features end-to-end (API + DB + frontend)npx claudepluginhub alunadev/ald-skillsGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Implements work from a spec or tickets using TDD at agreed seams, with regular typechecking and test runs, followed by code review.