ptc-orchestration
PTC Orchestration Skill
Use Programmatic Tool Calling (PTC) for efficient multi-tool workflows. PTC allows Claude to write Python code that orchestrates multiple tool calls, reducing:
- API round-trips (60% fewer calls)
- Context token usage (65% reduction)
- Execution time (53% faster)
When to Use
Activate this skill when the user needs:
- Multi-URL scraping: Fetch and compare multiple web pages
- Browser automation: Chain multiple browser actions (navigate → snapshot → click → extract)
- Tool orchestration: Any workflow with 3+ sequential tool calls
Available Commands
CLI Usage
# Multi-URL scraping with summarization
python -m ptc_wrapper.cli scrape https://url1.com https://url2.com
# Browser automation pipeline
python -m ptc_wrapper.cli browser "Navigate to X, extract Y" --url https://start.com
# Custom PTC prompt
python -m ptc_wrapper.cli run "Your complex multi-tool task" --servers flaresolverr,browsermcp
# List available tools
python -m ptc_wrapper.cli list --tools
Python API
from ptc_wrapper import PTCClient
async with PTCClient() as client:
await client.load_mcp_servers(["flaresolverr"])
result = await client.scrape_urls(urls, summarize=True)
Setup
Ensure the wrapper is installed:
cd ~/.claude/tools/ptc-wrapper
uv pip install -e .
Key Features
- MCP Integration: Works with existing MCP servers (flaresolverr, browsermcp)
- Tool Search: Uses
allowed_callersto enable code execution - Input Examples: Auto-generates examples for better parameter accuracy
- Agentic Loop: Handles multi-turn tool execution automatically
Architecture
PTCClient → Anthropic API (with code_execution)
↓
MCPClient → MCP Servers (flaresolverr, browsermcp via stdio)
The wrapper adds:
code_execution_20250825tool to enable PTCallowed_callers: ["code_execution_20250825"]to each toolinput_examplesfor parameter accuracy- Beta header:
advanced-tool-use-2025-11-20
More from ilude/claude-code-config
code-documentation
Guidelines for self-explanatory code and meaningful documentation. Activate when working with comments, docstrings, documentation, code clarity, API documentation, JSDoc, or discussing code commenting strategies. Guides on why over what, anti-patterns, decision frameworks, and language-specific examples.
12claude-code-workflow
Claude Code AI-assisted development workflow. Activate when discussing Claude Code usage, AI-assisted coding, prompting strategies, or Claude Code-specific patterns.
10css-workflow
CSS and styling workflow guidelines. Activate when working with CSS files (.css), Tailwind CSS, Stylelint, or styling-related tasks.
7api-design-patterns
Language-agnostic API design patterns covering REST and GraphQL, including resource naming, HTTP methods, status codes, versioning, pagination, filtering, authentication, error handling, and schema design. Activate when working with APIs, REST endpoints, GraphQL schemas, API documentation, OpenAPI/Swagger, JWT, OAuth2, endpoint design, API versioning, rate limiting, or GraphQL resolvers.
7python-workflow
Python project workflow guidelines. Triggers: .py, pyproject.toml, uv, pip, pytest, Python. Covers package management, virtual environments, code style, type safety, testing, configuration, CQRS patterns, and Python-specific development tasks.
6nextjs-workflow
Next.js framework workflow guidelines. Activate when working with Next.js projects, next.config, app router, or Next.js-specific patterns.
6