building-agents-patterns
Best practices, patterns, and examples for building goal-driven agents. Includes pause/resume architecture, hybrid workflows, anti-patterns, and handoff to testing. Use when optimizing agent design.
npx skills add majiayu000/claude-skill-registry --skill building-agents-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Building Agents - Patterns & Best Practices Design patterns, examples, and best practices for building robust goal-driven agents. **Prerequisites:** Complete agent structure using `building-agents-construction`. ## Practical Example: Hybrid Workflow How to build a node using both direct file writes and optional MCP validation: ```python # 1. WRITE TO FILE FIRST (Primary - makes it visible) node_code = ''' search_node = NodeSpec( id="search-web", node_type="llm_tool_use", input_keys=["query"], output_keys=["search_results"], system_prompt="Search the web for: {query}", tools=["web_search"], ) ''' Edit( file_path="exports/research_agent/nodes/__init__.py", old_string="# Nodes will be added here", new_string=node_code ) print("✅ Added search_node to nodes/__init__.py") print("📁 Open exports/research_agent/nodes/__init__.py to see it!") # 2. OPTIONALLY VALIDATE WITH MCP (Secondary - bookkeeping) validation = mcp__agent-builder__test_node( node_id="search-web", test_input='{"query": "python tutorials"}', mock_llm_response='{"search_results": [...mock results...]}' ) print(f"✓ Validation: {validation['success']}") ``` **User experience:** - Immediately sees node in their editor (from
- Practical Example: Hybrid Workflow
- Pause/Resume Architecture
- Basic Pause/Resume Flow
- Example: Multi-Turn Research Agent
- Running Pause/Resume Agents
- Anti-Patterns
- What NOT to Do
- MCP Tools - Correct Usage
- Best Practices
- 1. Show Progress After Each Write
- 2. Let User Open Files During Build
- 3. Write Incrementally - One Component at a Time
- 4. Test As You Build
- 5. Keep User Informed
What does the building-agents-patterns skill do?
Best practices, patterns, and examples for building goal-driven agents. Includes pause/resume architecture, hybrid workflows, anti-patterns, and handoff to testing. Use when optimizing agent design.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill building-agents-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
