smithery.ai

Anthropic Agents

Workflow patterns and gotchas for Anthropic/Claude agents. Directs to RAG for implementation.

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,488 B
  • docs SUMMARY.md 117 B

History

  1. First recorded snapshot · 1 installs

SKILL.md

Anthropic Agents Workflow

When to Choose Anthropic/Claude

  • Building with Claude models
  • Need computer use capabilities
  • Want extended thinking (deep reasoning)
  • Require strong safety/alignment features

Decision Framework

Pattern Selection

Need Pattern RAG Query
Basic tool use Tool definitions "claude tool definition"
Agentic loop Iterative tool calling "claude agentic loop"
Computer control Computer use "claude computer use"
Deep reasoning Extended thinking "claude extended thinking"
Conversation Message history "claude conversation history"

Query RAG: mcpagentic-ragquery_sdk("pattern example", sdk="anthropic", mode="build")

Critical Gotchas

These are Claude-specific traps:

  1. Tool schemas are strict - JSON schema format, not Python type hints
  2. tooluse vs toolresult - Tool calls are tooluse, responses are toolresult
  3. Tool IDs must match - Response must include the exact tooluseid
  4. ANTHROPICAPIKEY - Environment variable name is specific
  5. Max tokens required - Must specify max_tokens in API calls
  6. Stop reason matters - Check stop_reason to know if done or needs tool response
  7. Computer use needs beta header - Requires anthropic-beta header

Workflow: Building a Claude Agent

Step 1: SDK Setup

RAG Query: mcpagentic-ragquery_sdk("anthropic python sdk install", sdk="anthropic", mode="explain")

Step 2: Tool Schema Definition

RAG Query: mcpagentic-ragquerysdk("tool inputschema definition", sdk="anthropic", mode="build")

Tools need name, description, input_schema (JSON Schema format).

Step 3: Message Construction

RAG Query: mcpagentic-ragquerysdk("messages create toolchoice", sdk="anthropic", mode="build")

Step 4: Tool Response Handling

RAG Query: mcpagentic-ragquerysdk("toolresult content block", sdk="anthropic", mode="build")

Match tooluseid exactly in your response.

Step 5: Agentic Loop

RAG Query: mcpagentic-ragquerysdk("agentic loop stopreason", sdk="anthropic", mode="build")

Loop until stopreason is not tooluse.

Common Error Patterns

Symptom Likely Cause RAG Query
Tool not called Bad schema "tool input_schema"
Tool response ignored Wrong tooluseid "tool_result matching"
Loop never ends Not checking stop_reason "stopreason endturn"
Rate limit Too many requests "anthropic rate limits"
Schema validation error Wrong JSON schema format "json schema tool"

Computer Use

Special capability for GUI automation: RAG Query: mcpagentic-ragquery_sdk("claude computer use setup", sdk="anthropic", mode="explain")

Requirements:

  • Beta header required
  • Screenshot handling needed
  • Coordinate system understanding

Extended Thinking

For complex reasoning tasks: RAG Query: mcpagentic-ragquery_sdk("claude extended thinking", sdk="anthropic", mode="explain")

Advanced Features

Query RAG when you need:

  • Streaming: "claude streaming response"
  • Vision: "claude image input"
  • PDF processing: "claude pdf document"
  • Caching: "claude prompt caching"
  • Batching: "anthropic batch api"