| name | proxy-optimizer |
| version | 2.0 |
| description | Optimize your Webshare proxy pool for a specific target website. Tests all proxies against the target, identifies blocked IPs by country/ASN/subnet using data from the webshare CLI, and replaces them via the Webshare MCP. Use when proxies are failing on a site, when setting up a new scraping target, or when you want to tune your proxy pool. Invoke with a target URL as argument.
|
| license | MIT |
| allowed-tools | Read, Write, Bash(webshare *), Bash(python *), Bash(python3 *) |
| argument-hint | [target-url] |
| metadata | {"category":"proxy-management","long-description":"A target-site tuner for your Webshare proxy pool. It probes every proxy in a plan against the site you care about, maps the failures to countries, ASNs and /24 subnets to expose patterns (\"this ASN is 100% blocked here\"), and then walks you through replacing exactly the blocked IPs — dry-run first, explicit confirmation, and a re-test to prove the fix. Plan and proxy data come from the webshare CLI; the targeted replacement itself runs through the Webshare MCP, since per-IP replacement is not in the CLI yet.\n","tags":["proxies","blocking","replacement","asn","scraping-targets"],"install":"npx skills add webshare-proxy/skills --skill proxy-optimizer","example-prompts":["My proxies keep failing on example.com — figure out which ones and fix it","Optimize my proxy pool for https://www.example.com","Which of my proxies are blocked on this site, grouped by ASN?"],"related":["proxy-manager","scraper"]} |
Target Site Proxy Optimizer
Optimize a Webshare proxy pool for a specific target website by testing,
analyzing, and replacing blocked proxies.
Invocation
/proxy-optimizer https://www.example.com
The argument is the target URL to optimize proxies for.
What this skill does / needs / will not do
Does: probes every proxy against the target, ranks failures by
country/ASN/subnet, and drives a confirmed, dry-run-first replacement of the
blocked IPs.
Needs:
- The
webshare CLI (brew install webshare-proxy/tap/webshare) with
WEBSHARE_API_KEY exported — the script pulls plans and proxies through
it. Verify with webshare whoami.
- Python 3.10+.
- For the replacement step only: the Webshare MCP server connected
(
claude mcp add --transport http webshare https://mcp.webshare.io/ -H "Authorization: Token $WEBSHARE_API_KEY") and an active paid plan with
replacement credits. Targeted per-IP replacement is not in the CLI yet,
so the MCP's create_proxy_replacement is used for exactly this step.
Will not do:
- Replace proxies without a dry run and your explicit confirmation.
- Whole-pool refreshes — that is
webshare proxies refresh territory
(see the proxy-manager skill) and consumes an on-demand refresh.
- Test residential rotating pools per-IP (they have no fixed per-proxy
address).
Workflow
Step 1: Check proxy count and ask about sampling
Find the plan and its size:
webshare plans list --json
If the plan has more than 50 proxies, ask the user:
"Your plan has N proxies. Test all of them or a sample?"
Options:
- All N proxies (takes longer)
- Sample of 20 (quick check)
- Sample of 50
If 50 or fewer, skip this question and test all.
Step 2: Run the optimizer script
Run the script from this skill's directory:
python3 scripts/optimize_proxies.py --target <TARGET_URL> --workers 10 --timeout 15
If the user chose a sample, add --sample N. To pin a plan, add
--plan-id <id>. The script pulls the plan and proxy list via the
CLI, outputs progress to stderr and structured JSON to stdout.
Parse the JSON output.