Agent skill

ptc-orchestration

Activate when user needs multi-URL scraping, browser automation pipelines, or efficient tool orchestration to reduce API round-trips and context usage.

Stars 7
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/ilude/claude-code-config/tree/main/skills/ptc-orchestration

SKILL.md

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

bash
# 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

python
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:

bash
cd ~/.claude/tools/ptc-wrapper
uv pip install -e .

Key Features

  1. MCP Integration: Works with existing MCP servers (flaresolverr, browsermcp)
  2. Tool Search: Uses allowed_callers to enable code execution
  3. Input Examples: Auto-generates examples for better parameter accuracy
  4. 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_20250825 tool to enable PTC
  • allowed_callers: ["code_execution_20250825"] to each tool
  • input_examples for parameter accuracy
  • Beta header: advanced-tool-use-2025-11-20

Expand your agent's capabilities with these related and highly-rated skills.

ilude/claude-code-config

python-testing

Python-specific testing practices with pytest, fixtures, mocking, async testing, coverage configuration, and uv execution rules. Activate when working with pytest files, conftest.py, test directories, pyproject.toml testing configuration, or Python test-related tasks.

7 0
Explore
ilude/claude-code-config

archive-reprocessing

Flexible, version-tracked reprocessing system for archive transformations using design patterns (Strategy, Template Method, Observer). Activate when working with tools/scripts/lib/, reprocessing scripts, transform versions, archive transformations, metadata transformers, or incremental processing workflows.

7 0
Explore
ilude/claude-code-config

structured-analysis

7 0
Explore
ilude/claude-code-config

typescript-testing

TypeScript/JavaScript testing practices with Bun's test runner. Activate when working with bun test, .test.ts, .test.js, .spec.ts, .spec.js, testing TypeScript/JavaScript, bunfig.toml, testing configuration, or test-related tasks in Bun projects.

7 0
Explore
ilude/claude-code-config

python-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.

7 0
Explore
ilude/claude-code-config

hanami-workflow

Hanami framework workflow guidelines. Activate when working with Hanami projects, Hanami CLI, or Hanami-specific patterns.

7 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results