From 7909791aa715a3ed5a6aecdf5a0d35d5cf17b9c0 Mon Sep 17 00:00:00 2001 From: James Lawton Date: Wed, 15 Apr 2026 11:18:09 +0100 Subject: [PATCH 1/2] fix(skills): rename to "Polygon Agent" and fix Twitter/X x402 endpoint - Rename skill from polygon-agent-cli/polygon-agent-kit to "Polygon Agent" - Fix polygon-discovery Twitter/X: use /api/twitter directly instead of catalog proxy (/api/call/99063826-...) which returns 401/HTML in practice - Change Twitter method from GET to POST (confirmed working) - Add troubleshooting tip to check live catalog if direct endpoint fails --- packages/connector-ui/public/SKILL.md | 8 +++++--- packages/connector-ui/public/skills/SKILL.md | 2 +- packages/polygon-agent-cli/skills/SKILL.md | 2 +- skills/SKILL.md | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/connector-ui/public/SKILL.md b/packages/connector-ui/public/SKILL.md index 6b8b31a..0dea00f 100644 --- a/packages/connector-ui/public/SKILL.md +++ b/packages/connector-ui/public/SKILL.md @@ -1,5 +1,5 @@ --- -name: polygon-agent-kit +name: Polygon Agent description: "Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit to earn yield, register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage." --- @@ -54,6 +54,8 @@ polygon-agent wallet create --usdc-limit 100 --native-limit 5 # → user approves in browser, browser shows a 6-digit code # → enter the 6-digit code in the terminal when prompted # → session saved to ~/.polygon-agent/wallets/main.json +# → notify the user and send them to https://agentconnect.polygon.technology/?rid= +# so they can fund their wallet with access to the session # Step 3: Fund wallet polygon-agent fund @@ -182,12 +184,12 @@ $0.005 USDC per call. ```bash # Profile + recent tweets polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?user=" \ + --url "https://x402-api.onrender.com/api/twitter?user=" \ --wallet main --method POST # Specific tweet polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?tweet=https://x.com/user/status/" \ + --url "https://x402-api.onrender.com/api/twitter?tweet=https://x.com/user/status/" \ --wallet main --method POST ``` Returns: follower count, recent tweets, engagement metrics. diff --git a/packages/connector-ui/public/skills/SKILL.md b/packages/connector-ui/public/skills/SKILL.md index b6f6fa3..933b583 100644 --- a/packages/connector-ui/public/skills/SKILL.md +++ b/packages/connector-ui/public/skills/SKILL.md @@ -1,5 +1,5 @@ --- -name: polygon-agent-kit +name: Polygon Agent description: "Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit to earn yield, register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage." --- diff --git a/packages/polygon-agent-cli/skills/SKILL.md b/packages/polygon-agent-cli/skills/SKILL.md index 92bf264..933b583 100644 --- a/packages/polygon-agent-cli/skills/SKILL.md +++ b/packages/polygon-agent-cli/skills/SKILL.md @@ -1,5 +1,5 @@ --- -name: polygon-agent-cli +name: Polygon Agent description: "Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit to earn yield, register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage." --- diff --git a/skills/SKILL.md b/skills/SKILL.md index 70e426e..933b583 100644 --- a/skills/SKILL.md +++ b/skills/SKILL.md @@ -1,5 +1,5 @@ --- -name: polygon-agent-kit +name: Polygon Agent description: "Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit to earn yield, register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage." --- @@ -54,6 +54,8 @@ polygon-agent wallet create --usdc-limit 100 --native-limit 5 # → user approves in browser, browser shows a 6-digit code # → enter the 6-digit code in the terminal when prompted # → session saved to ~/.polygon-agent/wallets/main.json +# → notify the user and send them to https://agentconnect.polygon.technology/?rid= +# so they can fund their wallet with access to the session # Step 3: Fund wallet polygon-agent fund From 8f667f97f8b51c26d95e77de37c6b8877b5a759b Mon Sep 17 00:00:00 2001 From: James Lawton Date: Wed, 15 Apr 2026 11:23:14 +0100 Subject: [PATCH 2/2] fix(skills): fix Twitter/X x402 endpoint in polygon-discovery The catalog proxy (/api/call/99063826-...) returns 401 or HTML in practice. Switch to the direct /api/twitter endpoint with POST method, which is confirmed working. Add troubleshooting tip to check the live catalog if the direct endpoint also fails. --- .../public/skills/polygon-discovery/SKILL.md | 17 +++++++++++++---- .../skills/polygon-discovery/SKILL.md | 17 +++++++++++++---- skills/polygon-discovery/SKILL.md | 17 +++++++++++++---- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/packages/connector-ui/public/skills/polygon-discovery/SKILL.md b/packages/connector-ui/public/skills/polygon-discovery/SKILL.md index ab95915..13090b3 100644 --- a/packages/connector-ui/public/skills/polygon-discovery/SKILL.md +++ b/packages/connector-ui/public/skills/polygon-discovery/SKILL.md @@ -15,20 +15,29 @@ Pay-per-call APIs accessible via `x402-pay`. No API keys or subscriptions — ea $0.005 USDC per call. +> **Note:** The catalog proxy (`/api/call/99063826-...`) returns 401 or HTML for this service. +> Use the direct endpoint below instead. + ```bash # Profile + recent tweets polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?user=" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?user=" \ + --wallet main --method POST # Specific tweet polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?tweet=https://x.com/user/status/" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?tweet=https://x.com/user/status/" \ + --wallet main --method POST ``` Returns: follower count, recent tweets, engagement metrics. +**Troubleshooting:** If the direct endpoint fails, check the live catalog for the current URL: +```bash +curl -s "https://x402-api.onrender.com/api/catalog?status=online" \ + | jq '.[] | select(.name | test("twitter"; "i"))' +``` + --- ## Generate an AI Image diff --git a/packages/polygon-agent-cli/skills/polygon-discovery/SKILL.md b/packages/polygon-agent-cli/skills/polygon-discovery/SKILL.md index ab95915..13090b3 100644 --- a/packages/polygon-agent-cli/skills/polygon-discovery/SKILL.md +++ b/packages/polygon-agent-cli/skills/polygon-discovery/SKILL.md @@ -15,20 +15,29 @@ Pay-per-call APIs accessible via `x402-pay`. No API keys or subscriptions — ea $0.005 USDC per call. +> **Note:** The catalog proxy (`/api/call/99063826-...`) returns 401 or HTML for this service. +> Use the direct endpoint below instead. + ```bash # Profile + recent tweets polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?user=" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?user=" \ + --wallet main --method POST # Specific tweet polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?tweet=https://x.com/user/status/" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?tweet=https://x.com/user/status/" \ + --wallet main --method POST ``` Returns: follower count, recent tweets, engagement metrics. +**Troubleshooting:** If the direct endpoint fails, check the live catalog for the current URL: +```bash +curl -s "https://x402-api.onrender.com/api/catalog?status=online" \ + | jq '.[] | select(.name | test("twitter"; "i"))' +``` + --- ## Generate an AI Image diff --git a/skills/polygon-discovery/SKILL.md b/skills/polygon-discovery/SKILL.md index ab95915..13090b3 100644 --- a/skills/polygon-discovery/SKILL.md +++ b/skills/polygon-discovery/SKILL.md @@ -15,20 +15,29 @@ Pay-per-call APIs accessible via `x402-pay`. No API keys or subscriptions — ea $0.005 USDC per call. +> **Note:** The catalog proxy (`/api/call/99063826-...`) returns 401 or HTML for this service. +> Use the direct endpoint below instead. + ```bash # Profile + recent tweets polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?user=" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?user=" \ + --wallet main --method POST # Specific tweet polygon-agent x402-pay \ - --url "https://x402-api.onrender.com/api/call/99063826-5171-47d1-8b96-56ab8a6e3ddb?tweet=https://x.com/user/status/" \ - --wallet main --method GET + --url "https://x402-api.onrender.com/api/twitter?tweet=https://x.com/user/status/" \ + --wallet main --method POST ``` Returns: follower count, recent tweets, engagement metrics. +**Troubleshooting:** If the direct endpoint fails, check the live catalog for the current URL: +```bash +curl -s "https://x402-api.onrender.com/api/catalog?status=online" \ + | jq '.[] | select(.name | test("twitter"; "i"))' +``` + --- ## Generate an AI Image