To clarify the scope of the scripts and justify the requested permissions (credential.read, credential.write, network.outbound), the following underlying operations are declared:
credential.read and credential.write permissions are granted solely to read and write the u field inside the local file configs/config.json. No environment variables, system keychain entries, or any other credential stores are accessed.
Why persist the token? The u (user token) is obtained through a multi-step authorization flow (QR code scan → registration polling → token issuance). Persisting it locally avoids requiring the user to re-authorize on every single payment request, which would be impractical. The token is written once during authorization and read on subsequent payment calls.
> ⚠️ Security Advisory — Credential Hardening:
>
> The u is stored in local. Operators deploying this skill in security-sensitive environments must apply the following protections:
>
> 1. File permissions: chmod 600 configs/config.json — restrict to owner-only read/write.
> 2. Directory permissions: chmod 700 configs/ — prevent directory listing by other users.
> 3. Disk encryption: On shared or multi-tenant hosts, enable full-disk encryption (e.g., FileVault on macOS, LUKS on Linux).
>
> The skill does not use OS keychains, environment variables, or any other credential stores — configs/config.json is the sole persistence point.
ms.jr.jd.com) over the network to process transactions, fetch authorization/authentication links, and verify token registration status. This justifies the network.outbound permission. No other external domains are contacted.
encrypted_data and payment status decryption), the Python scripts locally invoke a bundled Node.js encryption tool (scripts/encrypt.js + scripts/summer-cryptico-2.0.2.min.js). Node.js (node) is a required runtime dependency — it must be present on the host system before the skill is deployed. This requirement is declared in both the required_binaries field of the registry metadata above and in this section.
disable_model_invocation: false) because it is designed to be called by other skills during payment workflows. To mitigate the risk of mis-triggered payment flows, the following safeguards are enforced:
payTo, amount, and other mandatory parameters — the script will exit with an error if parameters are missing or malformed.
Provide the following parameters strictly according to their defined formats:
payTo (string): The merchant's wallet address (the payTo recipient).
amount (integer): The transaction amount.
order_no (string): The order number from the calling skill's Phase 1.
question (string): The user's original question/request content from the calling skill.
encrypted_data (string): The encrypted data string from Phase 1.
description (string): The description of the resource to be purchased (e.g., answer of user's psychological counseling).
skill_name (string): The name of the calling skill (e.g., a proficient psychological counseling assistant).
resource_url (string): The URL identifying the service resource being paid for.
skill-version (string): The version of the skill. Currently set to 1.0.1.
Execute the script using the following bash command. Replace the placeholders <...> with the validated parameter values. Wrap parameters that may contain spaces in quotes.
python3 scripts/payment_process.py <payTo> <amount> <order_no> <question> <encrypted_data> <description> <skill_name> <resource_url> <skill-version>
Analyze the standard output of the execution command and strictly follow these response protocols in the given order. Stop at the first matching step; do not continue to subsequent steps.
> If the output contains 支付凭证: , go to Step 2 (Obtain Credential) first to return the credential to the calling skill for decryption.
>
> However, if the output also contains 授权链接: or 鉴权链接: , you MUST preserve the full original output (including the authorization/authentication URL) in memory. This is because the credential may decrypt to a failed status, in which case you will need to fall back to Step 3 using the preserved authorization/authentication URL.
>
> In summary:
> 1. If 支付凭证: is present → go to Step 2 first.
> 2. After the calling skill decrypts the credential and reports the status:
> - If the decrypted status is 成功 → go to Step 4 Case A. Done.
> - If the decrypted status is 处理中 → go to Step 4 Case B. Done.
> - If the decrypted status is 失败 (FAIL) → go to Step 2.1 (Credential Decryption Fallback) to check whether a preserved 授权链接: or 鉴权链接: exists, and if so, fall back to Step 3.
> 3. If 支付凭证: is NOT present → evaluate Step 1, then Step 3 in order.
网络或系统异常:.
返回消息: , display the to the user as supplementary error context. Advise the user on the next steps. Stop here; do not proceed to Step 2.
支付凭证: .
is an encrypted blob; the actual payment status is encoded inside it. The script cannot determine the status on its own.
授权链接: or 鉴权链接: if present, and any 返回消息: if present). You may need it later in Step 2.1.
> 支付凭证:
将此支付凭证返回给调用方 skill,由调用方负责解密并根据其中的支付状态进行后续处理。
PAY_STATUS. Then proceed to Step 4 to route by decrypted status. If the status is 失败 (FAIL), Step 4 Case C will direct you to Step 2.1.
> This step is triggered only when the calling skill decrypts the credential and the resulting status is 失败 (FAIL).
PAY_STATUS: FAIL (or equivalent 失败 status) after decrypting the credential from Step 2.
#### Case A: Preserved output contains 授权链接:
授权链接 was present in the original output but was deferred in favor of credential processing.
.
#### Case B: Preserved output contains 鉴权链接:
鉴权链接 was present in the original output but was deferred.
.
#### Case C: Preserved output contains NEITHER 授权链接: NOR 鉴权链接:
返回消息: , display the to the user as supplementary failure context. If no specific error details were provided, inform the user that the payment failed and suggest they contact support or retry later.
> ⚠️ PREREQUISITE CHECK: This step is evaluated in two scenarios:
> 1. The original script output does NOT contain 支付凭证: at all.
> 2. You were directed here from Step 2.1 after a credential decryption failure with a preserved authorization/authentication URL.
支付状态: 失败 ← REQUIRED (exact match)
授权链接: ← REQUIRED
支付凭证: ← REQUIRED
PAY_STATUS: FAIL after credential decryption, and the preserved original output contains 授权链接: .
to the user as the official authorization link. Additionally, if the output (or preserved output) contains 返回消息: , display the to the user as supplementary context.
{clawtip_id} from the authorization URL (the clawtipId query parameter, e.g., ...?clawtipId={clawtip_id}).
scheduled task to query the user's registration status:
查询token注册状态 {clawtip_id} or query token register status {clawtip_id}.
clawtip-payment user token register status {clawtip_id}).
查询token注册状态 before starting the new one.
clawtip-payment user token register status {clawtip_id}。当用户需要授权,并创建了授权任务后,需要显示提示用户可以说当用户扫码完成授权后,可以说我已授权或我已完成授权以继续之前的流程
支付状态: 处理中 ← REQUIRED (exact match)
鉴权链接: ← REQUIRED
支付凭证: ← REQUIRED
PAY_STATUS: FAIL after credential decryption, and the preserved original output contains 鉴权链接: .
to the user as the official authentication link. Additionally, if the output (or preserved output) contains 返回消息: , display the to the user as supplementary context.
> Stop here if Step 3 matched; do not proceed to Step 4.
After the calling skill decrypts the credential and reports the status, follow the corresponding case:
Payment Success Info:
FAIL).
When the user explicitly requests to create a token with a phrase like 创建token xxx or create token xxx, execute the following command.
Provide the following parameters strictly according to their defined formats:
user_token (string): the user's token provided by xxx of 创建token xxx .
python3 scripts/create_token.py <user_token>
You should check and cancel the running scheduled task about 查询token注册状态 if it is running (named clawtip-payment user token register status ${device_id}). The device_id is a flexible value.
When the user explicitly requests to query the user register status with a phrase like 查询token注册状态 xxx or query token register status xxx, or 我已注册, execute the following command.
Provide the following parameter:
device_id (string): The user's device ID.
python3 scripts/check_register_status.py <device_id>
Analyze the standard output of the execution command and strictly follow these response protocols:
Status: processing.
Status: successful.
查询token注册状态 if it is running (named clawtip-payment user token register status ${device_id}). The device_id is a flexible value.
When the user requests to view their clawtip wallet with phrases like 查看我的clawtip钱包, 查看钱包, 打开clawtip钱包, 查看clawtip钱包,clawtip钱包管理 or view my clawtip wallet, respond with the following:
> 您可以通过以下链接,扫描二维码查看您的 clawtip 钱包:
>
> 👉 查看 Clawtip 钱包
>
> 请在浏览器中打开此链接然后扫描二维码以查看您的钱包详情。
共 1 个版本