.claude/skills/claude-advanced-tool-use/SKILL.md
Advanced tool use patterns including tool search, programmatic calling, and production orchestration. Use when scaling to 10,000+ tools, optimizing token usage, or implementing production tool systems.
npx skillsauth add adaptationio/skrillz claude-advanced-tool-useInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Advanced tool use provides three complementary features that address distinct bottlenecks in production systems. These features can be used independently or combined for compounding efficiency gains of 37-85%.
1. Tool Search (85-95% context savings)
2. Programmatic Tool Calling (37% token reduction)
3. Tool Use Examples (72% → 90% accuracy)
Key Insight: Start with your biggest bottleneck, then add complementary features as needed. Not all-or-nothing.
| Feature | Token Savings | Best For | Complexity | Beta Header | |---------|---------------|----------|------------|-------------| | Tool Search | 85-95% | Large tool sets (10+ tools) | Low | advanced-tool-use-2025-11-20 | | Programmatic Calling | 37% | Multi-step workflows (3+ dependent calls) | Medium | advanced-tool-use-2025-11-20 | | Tool Examples | Accuracy (72%→90%) | Complex parameters, optional fields | Low | N/A |
Tool Search:
Programmatic Calling:
Tool Use Examples:
Production Patterns:
Python Example:
import anthropic
client = anthropic.Anthropic()
tools = [
# Always-loaded: tool search itself
{
"type": "tool_search_tool_regex_20251119",
"name": "tool_search_tool_regex"
},
# Always-loaded: frequently used tools (3-5 total)
{
"name": "get_user_info",
"description": "Get user information by ID",
"input_schema": {
"type": "object",
"properties": {
"user_id": {"type": "string"}
}
}
},
# Deferred: specialized tools loaded on-demand
{
"name": "get_weather",
"description": "Get current weather for a location",
"input_schema": {
"type": "object",
"properties": {
"location": {"type": "string"}
}
},
"defer_loading": True
},
{
"name": "get_forecast",
"description": "Get weather forecast for a location and days ahead",
"input_schema": {
"type": "object",
"properties": {
"location": {"type": "string"},
"days": {"type": "integer"}
}
},
"defer_loading": True
}
]
response = client.beta.messages.create(
model="claude-sonnet-4-5-20250929",
betas=["advanced-tool-use-2025-11-20"],
max_tokens=2048,
messages=[{
"role": "user",
"content": "What's the weather in San Francisco?"
}],
tools=tools
)
print(response.content[0].text)
What Happens:
"weather"tool_reference blocks pointing to matching toolsget_weather with appropriate parametersWhen combined strategically, these features multiply efficiency gains:
Example: Large MCP System
Implementation Strategy:
From production codebase analysis (Source):
1. Planner + Executor
2. Preview Then Fetch
3. Guard + Act
4. Summarize Outputs
See references/production-patterns.md for complete implementation templates.
Identifying Your Bottleneck:
Optimization Checklist:
search_customer_orders not query_db)Tool search and programmatic calling work seamlessly with context editing:
Tool Result Clearing (from claude-context-management):
Programmatic Calling (keeps results out of context):
Combined Example:
response = client.beta.messages.create(
model="claude-opus-4-5-20251101",
betas=["advanced-tool-use-2025-11-20", "context-management-2025-06-27"],
tools=tools_with_deferred_loading,
context_management={
"edits": [{
"type": "clear_tool_uses_20250919",
"trigger": {"type": "input_tokens", "value": 100000},
"keep": {"type": "tool_uses", "value": 3}
}]
},
messages=messages
)
For detailed implementation patterns, see:
references/tool-search-patterns.md: Complete tool search guide (regex + BM25 variants, deferred loading, MCP integration, 10K+ tool scalability)references/programmatic-tool-calling.md: Sandboxed execution patterns, allowed_callers parameter, token efficiency mechanisms, ideal use casesreferences/production-patterns.md: Architecture patterns from production codebases, security best practices, error handling, observabilityreferences/performance-optimization.md: Optimization strategies, caching patterns, latency reduction, efficiency metricsdevelopment
Setup secure web-based terminal access to WSL2 from mobile/tablet via ttyd + ngrok/Cloudflare/Tailscale. One-command install, start, stop, status. Use when you need remote terminal access, web terminal, browser-based shell, or mobile access to WSL2 environment.
development
Complete development workflows where Claude writes the code while Gemini and Codex provide research, planning, reviews, and different perspectives. Claude remains the main developer. Use for complex projects requiring expert planning and multi-perspective reviews.
development
Systematic progress tracking for skill development. Manages task states (pending/in_progress/completed), updates in real-time, reports progress, identifies blockers, and maintains momentum. Use when tracking skill development, coordinating work, or reporting progress.
testing
Comprehensive testing workflow orchestrating functional testing, example validation, integration testing, and usability assessment. Sequential workflow for complete skill testing from examples through scenarios to integration validation. Use when conducting thorough testing, pre-deployment validation, ensuring skill functionality, or comprehensive quality checks.