x402-erc7710
Skill này làm gì
Skill này dùng để xây dựng các bản demo trong đó agent AI trả tiền cho dịch vụ trực tuyến. Nó kết hợp thanh toán theo từng yêu cầu với một quyền cho phép agent chi tiêu trong các giới hạn đã đặt.
Khi nào nên dùng
- ✓Khi bạn muốn một agent trả tiền cho dịch vụ web theo từng yêu cầu một.
- ✓Khi bạn cần một agent tiếp tục trả tiền cho một gói đăng ký trong ngân sách đã định.
- ✓Khi bạn đang kiểm tra xem một dịch vụ web trả phí có yêu cầu thanh toán trước khi phản hồi hay không.
Liên kết skill
https://github.com/internet-court/internet-court-skill/blob/main/integrations/x402-erc7710/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn agent của mình trả tiền cho một dịch vụ web theo từng yêu cầu, nhưng vẫn giữ chi tiêu trong ngân sách đã đặt.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích hai phần. Một dịch vụ web có thể yêu cầu thanh toán trước khi phản hồi, và một quyền riêng kiểm soát số tiền agent được chi theo thời gian. Agent dùng phần đầu cho từng yêu cầu lẻ và dùng phần sau cho chi tiêu định kỳ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
x402 + ERC-7710
Use this skill when a user wants a payment or subscription demo where an agent pays for HTTP resources through x402 and spends only within a bounded delegated permission.
Core Model
- x402 is the per-request payment rail. A protected resource can respond with HTTP
402 Payment Required, payment requirements, and a retry path where the client submits a signed payment payload. A facilitator can verify and settle the payment before the server returns the resource. - ERC-7710 is the capability redemption interface. It standardizes how a delegation manager validates permission context and executes delegated actions on behalf of a delegator.
- ERC-7715 is the wallet permission request layer that can be used to obtain scoped permissions for ERC-7710-style delegation.
Use x402 for "pay now for this HTTP request." Use ERC-7710/7715 for "this agent may keep paying under these constraints."
Discovery-First Boundary
When the user has only asked to use or inspect a paid HTTP service, stay in discovery mode:
- Identify the relevant endpoint or resource.
- Confirm whether it returns
402 Payment Required. - Summarize the advertised x402 requirements: network, token, amount, payee, route, and
extra.assetTransferMethodwhen present. - State that no paid request has been made.
- Ask whether the user wants to set up bounded payment authority.
Do not draft a subscription, mandate, cadence, schedule, spend cap, expiration, or wallet permission until the user asks for setup or confirms they want to continue. Do not infer "daily", "weekly", or "recurring" authority from a product objective alone; wait for the user to approve delegation design.
Good discovery response shape:
I found the paid endpoint and its x402 requirements.
- Endpoint: GET /path
- Network: ...
- Token: ...
- Price: ...
- Payee: ...
I have not made a paid request. Do you want me to help set up bounded payment authority for this task?
Trust Objection Mode
When the user objects to trusting the agent with money, keep the options distinct:
- Basic: an agent-controlled funded wallet. This is not a scoped x402/ERC-7710 permission unless another component enforces it. The main limit is the wallet balance.
- Guarded: a user-approved smart-account or wallet permission that limits service, route, token, payee, amount, budget period, request count, and expiry.
- Adjudicated: guarded permission plus signed intent/receipt evidence and a review path that can continue, constrain, or revoke future use.
Do not assign exact route, price, cadence, or expiry values to the Basic option. Those constraints belong in Guarded or Adjudicated setup after the user chooses that path.
Adjudicated Setup Mode
When the user selects adjudicated authority, proceed to setup instead of drafting a final mandate artifact immediately.
The right response is operational:
- confirm adjudicated mode;
- state that setup may take a while;
- list the steps to create an agent session key, prepare the bounded wallet permission request, open user wallet approval, store the permission artifact, verify the x402 requirements, configure signed evidence, and prepare the review path;
- ask the user to approve the guarded wallet permission in their wallet UI;
- wait for the user's approval message.
Do not ask for arbitrary expiration, schedule, or spend-cap choices in this beat unless the previous conversation lacks enough facts to create a safe testnet permission request. Do not claim the permission is ready before the user approves it.
Subscription Pattern
For subscriptions, do not make x402 stateful. Keep x402 as the request payment protocol and put recurrence in the delegated spend policy.
Recommended policy fields:
type AgentSpendPolicy = {
delegator: `0x${string}`;
delegate: `0x${string}`;
token: `0x${string}`;
allowedPayTo: `0x${string}`;
allowedResourcePattern: string;
maxPerRequest: bigint;
maxPerPeriod: bigint;
periodSeconds: number;
validAfter: number;
validUntil: number;
chainId: number;
revocable: boolean;
};
Execution flow:
- User grants a scoped permission through wallet UX, ideally ERC-7715 when available.
- The returned permission context is stored by the agent or subscription manager.
- Agent requests an x402-protected endpoint.
- Server returns payment requirements.
- Agent verifies requirements against the policy: network, token, amount, merchant, route, expiry, and remaini
Câu hỏi thường gặp
Agent làm gì nếu tôi chỉ muốn xem một dịch vụ trả phí?
Agent kiểm tra xem dịch vụ có yêu cầu thanh toán không và tóm tắt giá cùng điều khoản. Nó không thực hiện yêu cầu trả phí nào cho đến khi bạn đồng ý.
Đây là cho thanh toán một lần hay thanh toán định kỳ?
Cả hai. Yêu cầu lẻ dùng luồng theo từng yêu cầu, còn chi tiêu định kỳ dùng luồng quyền.
Skill có thiết lập thanh toán thật ngay không?
Không. Skill bắt đầu bằng việc kiểm tra dịch vụ, rồi hỏi bạn có muốn thiết lập quyền thanh toán không.
Chi tiết
Mô tả gốc của tác giả
Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13600
- Giấy phép
- —
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
internet-court
7.0kGiúp agent của bạn thanh toán, thuê hoặc giao dịch an toàn với một agent AI khác hoặc dịch vụ trả phí, và chỉ đến hướng dẫn chuyên sâu phù hợp.
genlayer-erc7710-connector
7.0kGiúp agent của bạn kết nối kết quả đánh giá AI với hệ thống quyền hạn, để một đánh giá xấu có thể hạn chế hoặc hủy quyền của agent.
genlayer-intelligent-contracts
7.0kGiúp agent của bạn xác định quy tắc, bằng chứng và đầu ra của một AI judge kiểm tra xem agent khác có làm đúng nhiệm vụ được ủy quyền hay không.
0g-compute
7.0kDạy agent của bạn xây chatbot, công cụ hình ảnh và tính năng giọng nói trên mạng GPU phi tập trung 0G, dùng các mẫu mã đã được kiểm thử.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.