claude-tool-use
Advanced Claude tool/function calling patterns: tool definitions, parallel tool use, tool result chaining, and agentic loops.
Skill by UltronCore
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ultroncore-claude-tool-use
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/claude-tool-use
What's inside
- Skill name
claude-tool-use- Description
- Advanced Claude tool/function calling patterns: tool definitions, parallel tool use, tool result chaining, and agentic loops. Triggers on: tool_use, tools=, ToolUseBlock, ToolResultBlock, function calling, tool result, agentic loop.
- License
- MIT
- Instructions
- 433 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (2)
- SKILL.md
- metadata.json
SKILL.md (first lines)
# Claude Tool Use
## When to Use
- Defining tools/functions for Claude to call
- Handling `ToolUseBlock` in API responses
- Sending tool results back to continue the conversation
- Building agentic loops that run until Claude stops using tools
- Implementing parallel tool calls
- Debugging tool use errors or unexpected stop reasons
## Core Rules
1. Always check `response.stop_reason == "tool_use"` — this is the signal to execute tools and continue.
2. Every `ToolUseBlock` needs a corresponding `ToolResultBlock` in the next user message.
3. Pass the entire `response.content` (including any `TextBlock`s) back as the assistant message in the loop.
4. Tool input schemas use JSON Schema — use `type: "object"` at root with `properties` and `required`.
5. A tool result with `is_error: true` tells Claude the tool failed — Claude will decide how to recover.
6. Use `tool_choice={"type": "any"}` to force Claude to call at least one tool.
7. Use `tool_choice={"type": "tool", "name": "specific_tool"}` to force a specific tool.
8. Parallel tool calls are native — Claude may call multiple tools in one response; handle all of them.
9. Set a max iteration limit on agentic loops to prevent runaway execution.
10. Tools with side effects (write, delete, send) should confirm with the user before executing in production.
## Tool Definition Schema
```python
tools = [
{
"name": "get_weather",
"description": "Get current weather for a city. Returns temperature and conditions.",
"input_schema": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name, e.g. 'San Francisco, CA'"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
"description": "Temperature unit. Defaults to fahrenheit."
}
},
"required": ["city"]
}
},
{
"name": "search_web",
"description": "Search the web and return top results with snippets.",
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string", "description": "Search query"},
"num_results": {"type": "integer", "description": "Number of results, 1-10", "default": 3}
},
"required": ["query"]
}
}
]
```
## Basic Tool Use (Python)
```python
import anthropic
import json
client = anthropic.Anthropic()
def run_tool(tool_name: str, tool_input: dict) -> str:
"""Execute a tool and return the result as a string."""
if tool_name == "get_weather":
# Replace with real implementation
return json.dumps({"temperature": 72, "conditions": "sunny", "city": tool_input["city"]})
elif tool_name == "search_web":
return json.dumps({"results": [{"title": "Example", "snippet": "..."}]})
else:
raise ValueError(f"Unknown tool: {tool_name}")
def chat_with_tools(user_message: str) -> str:
messages = [{"role": "user", "content": user_message}]
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=4096,
tools=tools,
messages=messages,
)
# Handle tool use in a loop
while response.stop_reason == "tool_use":
# Collect all tool calls from the response
tool_use_blocks = [b for b in response.content if b.type == "tool_use"]
# Add assistant's response (including TextBlocks) to messages
messages.append({"role": "assistant", "content": response.content})
# Execute all tool calls and collect results
tool_results = []
for tool_use in tool_use_blocks:
try:
result = run_tool(tool_use.name, tool_use.input)
tool_results.append({
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": result,
})
except Exception as e:
tool_results.append({
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": str(e),
"is_error": True,
})
# Add tool results as user message
messages.append({"role": "user", "content": tool_results})
# Continue the conversation
response = client.messages.create(From UltronCore/claude-skill-vault, MIT.
More from UltronCore/claude-skill-vault
- 0.494score
ai-agent-memory
UltronCore
Design and implement memory systems for AI agents — short-term working context, episodic memory in vector stores, entity extraction into knowledge graphs…
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ai-cost-optimizer
UltronCore
LLM cost reduction: prompt caching, model routing, token optimization, and batching.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
embeddings-expert
UltronCore
Text embeddings for semantic search, clustering, RAG retrieval, and similarity.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
autogen
UltronCore
Microsoft's multi-agent conversation framework for building collaborative AI workflows
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
guidance
UltronCore
Microsoft's structured generation library for constrained LLM outputs using Handlebars-style templates
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
haystack
UltronCore
Production-ready LLM pipeline framework with component-based architecture for RAG and QA
SkillCFreshness: C★ 1Claude Code +9 - 0.485score
diffusion-models
UltronCore
Build and deploy diffusion model pipelines for image generation, inpainting, and fine-tuning using Hugging Face Diffusers.
SkillCFreshness: C★ 1Claude Code +9 - 0.485score
embedding-pipeline
UltronCore
Build production embedding pipelines for semantic search, RAG, and recommendation systems.
SkillCFreshness: C★ 1Claude Code +9 - 0.484score
computer-vision
UltronCore
Computer vision tasks: image classification, object detection, OCR, and manga/comic image processing.
SkillCFreshness: C★ 1Claude Code +9 - 0.483score
skill-name
UltronCore
One-line description of what this skill does and when to use it.
SkillCFreshness: C★ 1Claude Code +9 - 0.264score
ab-testing-statistics-ai-ml-stub
UltronCore
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 24, 2026 (5 months ago)
- Last release
- May 24, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/UltronCore/claude-skill-vault
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from UltronCore
- 0.494score
ai-agent-memory
UltronCore
Design and implement memory systems for AI agents — short-term working context, episodic memory in vector stores, entity extraction into knowledge graphs…
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ai-cost-optimizer
UltronCore
LLM cost reduction: prompt caching, model routing, token optimization, and batching.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
embeddings-expert
UltronCore
Text embeddings for semantic search, clustering, RAG retrieval, and similarity.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
guidance
UltronCore
Microsoft's structured generation library for constrained LLM outputs using Handlebars-style templates
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
haystack
UltronCore
Production-ready LLM pipeline framework with component-based architecture for RAG and QA
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
autogen
UltronCore
Microsoft's multi-agent conversation framework for building collaborative AI workflows
SkillCFreshness: C★ 1Claude Code +9
Cite this page
claude-tool-use skill. Agent Mart. https://agentmart.dev/skills/ultroncore-claude-tool-use (last updated 2026-10-24)