← 返回 Skills 市场
agnicpay-prog

Agnic Pay for Service

作者 Agnic.AI · GitHub ↗ · v2.0.2 · MIT-0
cross-platform ⚠ suspicious
104
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install agnicpay-pay-for-service
功能描述
Make paid requests to x402-enabled APIs using USDC on Base. Use when the user explicitly asks to call a paid API, make an x402 payment, pay for a request, or...
使用说明 (SKILL.md)

Paying for x402 Services

Use npx agnic@latest x402 pay to call x402-enabled API endpoints with automatic USDC payment on Base.

Authentication

Run npx agnic@latest status --json to verify. If not authenticated:

  • Headless (CI/server/agent): Set AGNIC_TOKEN env var or pass --token \x3Ctoken>
  • Interactive (has browser): Run npx agnic@latest auth login

See the authenticate-wallet skill for details.

Command Syntax

npx agnic@latest x402 pay \x3Curl> [-X \x3Cmethod>] [-d \x3Cjson>] [-q \x3Cparams>] [-h \x3Cjson>] [--max-amount \x3Cn>] [--json]

See reference/x402-protocol.md for full options, USDC amounts, and input validation rules.

Workflow

  1. Check requirements (optional but recommended):

    npx agnic@latest x402 details \x3Curl>
    

    Shows price, method, and schema without making a payment.

  2. Verify balance:

    npx agnic@latest balance --network base
    
  3. Make the paid request:

    npx agnic@latest x402 pay \x3Curl> --json
    

Examples

# GET request (auto-pays)
npx agnic@latest x402 pay https://example.com/api/weather --json

# POST request with body
npx agnic@latest x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}' --json

# Limit max payment to $0.10
npx agnic@latest x402 pay https://example.com/api/data --max-amount 100000 --json

Prerequisites

  • Must be authenticated (npx agnic@latest status to check)
  • Wallet must have sufficient USDC balance on Base

Error Handling

Common errors:

  • "Not authenticated" -- Run npx agnic@latest auth login or set AGNIC_TOKEN
  • "Insufficient balance" -- Fund wallet with USDC (npx agnic@latest balance to check)
  • "No X402 payment requirements found" -- URL may not be an x402 endpoint
  • Invalid JSON in --data -- Ensure the body is valid JSON before passing
  • HTTP 4xx/5xx from the API -- Show the status code and response body to the user
安全使用建议
This skill appears to do what it says (make paid x402 calls), but exercise caution: it runs `npx agnic@latest`, which will fetch and execute code from npm each time — consider pinning to a specific, reviewed package/version instead of `@latest`. The SKILL.md mentions AGNIC_TOKEN for headless auth but the metadata doesn't declare it; confirm how you will provide a token and avoid exposing secrets on the command line (they can end up in shell history). Before using: (1) review the agnic npm package source or its npm page, (2) prefer a pinned version you can audit, (3) ensure the wallet and USDC balances are controlled and minimal for testing, (4) avoid passing other sensitive data through CLI args, and (5) if you need stronger assurance, ask the publisher for an install spec or code you can audit locally.
功能分析
Type: OpenClaw Skill Name: agnicpay-pay-for-service Version: 2.0.2 The skill bundle facilitates paid API requests using the x402 protocol via the 'agnic' CLI tool on the Base network. It demonstrates good security practices by providing explicit instructions in SKILL.md and reference/x402-protocol.md for the AI agent to validate user-provided URLs and JSON data to prevent shell injection, and its functionality is consistent with its stated purpose.
能力标签
cryptorequires-walletcan-make-purchasesrequires-sensitive-credentials
能力评估
Purpose & Capability
Name, description, and SKILL.md consistently describe making x402 payments on Base using USDC and the documented commands (npx agnic x402 ...) are aligned with that purpose. Minor incoherence: the instructions reference an AGNIC_TOKEN environment variable for headless auth, but the skill metadata lists no required env vars.
Instruction Scope
Runtime instructions are narrowly focused: they call `npx agnic@latest` subcommands to check status, view details, check balance, and pay. The documentation includes input validation suggestions (URL regex, JSON parsing) and does not instruct the agent to read unrelated files or exfiltrate data. It does, however, allow passing authentication tokens via CLI or env — a normal but sensitive operation.
Install Mechanism
This is an instruction-only skill that runs `npx agnic@latest` at runtime. `npx` will download and execute code from the npm registry (the `latest` tag), which is effectively executing remote code each time — a non-trivial risk. The skill provides no install spec or pinned package version to allow static review of code prior to execution.
Credentials
The only credential-like item referenced is AGNIC_TOKEN (for authentication) and the user's wallet balance (USDC on Base), both reasonable for the stated purpose. But the metadata does not declare AGNIC_TOKEN in required env vars, creating a mismatch between declared requirements and instructions.
Persistence & Privilege
The skill does not request persistent presence (always:false) and model invocation is disabled (disable-model-invocation:true), so it cannot be autonomously invoked by the model. No install scripts, no system-wide config changes are specified.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agnicpay-pay-for-service
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agnicpay-pay-for-service 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.2
v2.0.2 — Synced with upstream agnic-wallet-skills: - Security fix: now requires explicit user invocation (disable-model-invocation: true) — prevents auto-spend of USDC - Added context: fork for execution isolation - Added reference/x402-protocol.md for progressive disclosure - Standardized authentication (browser OAuth + headless AGNIC_TOKEN) - Rebranded references from "AgnicPay" to "Agnic"
v1.0.0
Initial publish of Pay for Service for Agnic wallet agent.
元数据
Slug agnicpay-pay-for-service
版本 2.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Agnic Pay for Service 是什么?

Make paid requests to x402-enabled APIs using USDC on Base. Use when the user explicitly asks to call a paid API, make an x402 payment, pay for a request, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 104 次。

如何安装 Agnic Pay for Service?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agnicpay-pay-for-service」即可一键安装,无需额外配置。

Agnic Pay for Service 是免费的吗?

是的,Agnic Pay for Service 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agnic Pay for Service 支持哪些平台?

Agnic Pay for Service 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agnic Pay for Service?

由 Agnic.AI(@agnicpay-prog)开发并维护,当前版本 v2.0.2。

💬 留言讨论