Reasoning and Acting patterns for agentic LLM workflows
Enables structured reasoning and tool use through ReAct patterns. Triggers when Claude needs to solve complex tasks requiring multiple tool calls and logical steps.
/plugin marketplace add pluginagentmarketplace/custom-plugin-prompt-engineering/plugin install prompt-engineering-assistant@pluginagentmarketplace-prompt-engineeringThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlreferences/GUIDE.mdscripts/helper.pyBonded to: react-pattern-agent
Skill("custom-plugin-prompt-engineering:react-pattern")
parameters:
max_iterations:
type: integer
default: 10
description: Maximum reasoning-action cycles
tool_format:
type: enum
values: [openai_function, anthropic_tool, langchain, custom]
default: openai_function
termination:
type: enum
values: [final_answer, max_iterations, tool_signal]
default: final_answer
You are an AI assistant that uses tools to accomplish tasks.
## Available Tools
[Tool definitions with descriptions and parameters]
## Response Format
For each step, use exactly this format:
Thought: [Your reasoning about what to do next]
Action: [tool_name({"param": "value"})]
Observation: [Result from the tool - provided by system]
Continue until you can provide:
Thought: I now have enough information to answer.
Final Answer: [Your complete response]
## Rules
1. Always think before acting
2. Use exactly one tool per action
3. Base decisions on observations
4. Never fabricate tool results
5. Stop when you have sufficient information
| Component | Purpose | Format |
|---|---|---|
| Thought | Reasoning about current state | Thought: I need to... |
| Action | Tool invocation | Action: tool({"param": value}) |
| Observation | Tool result (system-provided) | Observation: {result} |
| Final Answer | Task completion | Final Answer: [response] |
tool_schema:
name:
type: string
description: "Unique identifier for the tool"
description:
type: string
description: "When and why to use this tool"
parameters:
type: object
properties:
param_name:
type: string|number|boolean|array|object
description: "What this parameter does"
required: true|false
returns:
type: string
description: "What the tool returns"
example:
name: search
description: "Search the web for current information"
parameters:
query:
type: string
description: "Search query"
required: true
limit:
type: integer
description: "Maximum results"
required: false
default: 5
returns: "List of search results with titles and snippets"
Thought → Action → Observation → Thought → Action → Observation → Final Answer
Thought → Action → Observation
↓
┌─ if condition A → Path 1
└─ if condition B → Path 2
Thought → Action → Observation
↑ ↓
└──── not satisfied ─┘
↓
satisfied
↓
Final Answer
error_strategies:
tool_not_found:
detection: "Invalid tool name in action"
response: "List available tools and retry"
invalid_parameters:
detection: "Parameter validation fails"
response: "Show correct schema, ask to retry"
tool_timeout:
detection: "No response within timeout"
response: "Retry once, then proceed without"
infinite_loop:
detection: "Exceeds max_iterations"
response: "Force Final Answer with partial results"
all_tools_failed:
detection: "All attempted tools return errors"
response: "Respond without tools, acknowledge limitation"
User: What's the weather in Tokyo and should I bring an umbrella?
Thought: I need to find the current weather in Tokyo. I'll use the weather tool.
Action: get_weather({"location": "Tokyo, Japan"})
Observation: {"temperature": 18, "condition": "cloudy", "precipitation_chance": 75%, "forecast": "Rain expected this afternoon"}
Thought: The precipitation chance is 75% with rain expected. I should recommend bringing an umbrella.
Final Answer: The weather in Tokyo is currently 18°C and cloudy. There's a 75% chance of precipitation with rain expected this afternoon. Yes, I recommend bringing an umbrella!
validation_checklist:
tool_definitions:
- [ ] All tools have clear descriptions
- [ ] Parameters are well-documented
- [ ] Return values are specified
format:
- [ ] Thought/Action/Observation format enforced
- [ ] Termination conditions clear
- [ ] Max iterations set
behavior:
- [ ] Always thinks before acting
- [ ] Never fabricates observations
- [ ] Handles errors gracefully
| Issue | Cause | Solution |
|---|---|---|
| Never stops | No termination condition | Add max iterations |
| Wrong tool used | Vague tool descriptions | Make descriptions specific |
| Skips reasoning | Format not enforced | Add strict format check |
| Hallucinates results | No grounding | Require actual tool calls |
| Inefficient paths | No planning | Add planning step |
integrates_with:
- agent-design: Agent architecture
- prompt-design: Base prompt structure
- chain-of-thought: Reasoning patterns
tool_frameworks:
- LangChain agents
- OpenAI function calling
- Anthropic tool use
- Custom implementations
See references/GUIDE.md for advanced agent patterns.
See assets/config.yaml for configuration options.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.