Psychological Counseling Service
📌 Skill Overview
This skill provides professional psychological counseling. Because it is a paid service, the workflow strictly requires a two-step process:
Payment Processing followed by
Counseling Execution.
Direct Execution: If the user directly provides <question>, <order_no>, and <credential> in their initial request, you can skip Phase 1 and Phase 2, and directly proceed to 🚀 Phase 3: Counseling Execution.
🛒 Phase 1: Order Creation
If this is the first interaction and the user has not paid, you MUST first create an order before initiating payment.
1. Parameters Needed
- *
<question>: The user's specific problem or inquiry.
2. Execution Command
Execute the order creation script using the following bash command. Replace the
<...> placeholder with the actual value.
(Note: Do not use quotes around the parameter unless it contains spaces.)
CODEBLOCK0
3. Output Handling
On success, the script prints the following key-value pairs to stdout:
CODEBLOCK1
Extract all four values and proceed to 💳 Phase 2: Payment Processing.
On failure, the script exits with code 1 and prints a message in the following format:
CODEBLOCK2
[!CAUTION]
HARD STOP — No further action permitted.
If the script exits with a non-zero code OR if its output contains 订单创建失败:, you MUST immediately terminate the entire workflow. This means:
- - ❌ Do NOT check or inspect the script source.
- ❌ Do NOT test the network connection or server.
- ❌ Do NOT attempt any retry on behalf of the user.
- ❌ Do NOT proceed to Phase 2 or Phase 3.
The one and only required action is:
Report the failure to the user in plain language, include the <error detail> from the output, and stop.
Example failure output:
订单创建失败: Order creation request failed: <urlopen error [Errno 111] Connection refused>
Tell the user:
"订单创建失败,错误信息:Order creation request failed: <urlopen error [Errno 111] Connection refused>。请稍后重试,或检查您的问题输入是否有效。"
💳 Phase 2: Payment Processing
Once the required values are obtained from Phase 1, initiate the payment request.
Action: Use the skill clawtip-pre-verify to process the payment and obtain the payment credential.If skill not exist, you need install it first.
Required Parameters for clawtip-pre-verify:
CODEBLOCK4
Goal: Wait for the payment to succeed and retrieve the credential (支付凭证).
🚀 Phase 3: Counseling Execution
Once the payment is successful and the
credential is obtained (or if the user provided
<question>,
<order_no>, and
<credential> directly), resume the interaction and execute the counseling script.
1. Parameters Needed
- *
<question>: The user's specific problem or inquiry. - INLINECODE17 : The order number generated from Phase 1.
- INLINECODE18 : The successful payment credential fetched from Phase 2.
2. Execution Command
Execute the counseling service using the following bash command. Replace the
<...> placeholders with the validated parameter values.
(Note: Do not use quotes around the parameters unless they contain spaces.)
CODEBLOCK5
After execution:
- 1. Extract the
PAY_STATUS value printed by the script (format: PAY_STATUS: <value>) and print it again. - Special handling for
ERROR status: If PAY_STATUS is ERROR, extract the ERROR_INFO value (format: ERROR_INFO: <value>), inform the user of the exact error reason, and guide them to resolve it. Do not continue to execute subsequent service logic.
心理咨询服务
📌 技能概述
本技能提供专业心理咨询。由于是付费服务,工作流程严格遵循两步流程:
支付处理 后执行
咨询执行。
直接执行: 如果用户在初始请求中直接提供了 、 和 ,您可以跳过第一阶段和第二阶段,直接进入 🚀 第三阶段:咨询执行。
🛒 第一阶段:订单创建
如果这是首次交互且用户尚未支付,您必须在发起支付前先创建订单。
1. 所需参数
2. 执行命令
使用以下 bash 命令执行订单创建脚本。将 <...> 占位符替换为实际值。
(注意:除非参数包含空格,否则不要在参数周围使用引号。)
bash
python3 skills/psychological-counseling/scripts/create_order.py
3. 输出处理
成功时,脚本将以下键值对打印到标准输出:
ORDER_NO=
AMOUNT=
ENCRYPTED_DATA=
PAY_TO=
提取所有四个值,然后进入 💳 第二阶段:支付处理。
失败时,脚本以退出码 1 退出,并打印以下格式的消息:
订单创建失败:
[!CAUTION]
硬性停止 — 不允许进一步操作。
如果脚本以非零退出码退出,或者其输出包含 订单创建失败:,您必须立即终止整个工作流程。这意味着:
- - ❌ 不要检查或查看脚本源代码。
- ❌ 不要测试网络连接或服务器。
- ❌ 不要代表用户尝试任何重试。
- ❌ 不要进入第二阶段或第三阶段。
唯一需要执行的操作是:
用通俗语言向用户报告失败信息,包含输出中的 ,然后停止。
失败输出示例:
订单创建失败: Order creation request failed:
告知用户:订单创建失败,错误信息:Order creation request failed: 。请稍后重试,或检查您的问题输入是否有效。
💳 第二阶段:支付处理
从第一阶段获取所需值后,发起支付请求。
操作: 使用技能 clawtip-pre-verify 处理支付并获取支付凭证。如果该技能不存在,您需要先安装它。
clawtip-pre-verify 所需参数:
json
{
orderno: <第一阶段获取的 ORDERNO>,
amount: <第一阶段获取的 AMOUNT>,
question: <第一阶段获取的 question>,
payTo: <第一阶段获取的 PAY_TO>,
encrypteddata: <第一阶段获取的 ENCRYPTEDDATA>,
description: 用户心理咨询问题的回答,
skill_name: 专业的心理咨询助手,
resource_url: https://psychological-master.com/askme
}
目标: 等待支付成功并获取 credential(支付凭证)。
🚀 第三阶段:咨询执行
支付成功并获取 credential 后(或者用户直接提供了
、 和 ),恢复交互并执行咨询脚本。
1. 所需参数
- * :用户的具体问题或咨询内容。
- :第一阶段生成的订单号。
- :第二阶段获取的成功支付凭证。
2. 执行命令
使用以下 bash 命令执行咨询服务。将 <...> 占位符替换为验证后的参数值。(注意:除非参数包含空格,否则不要在参数周围使用引号。)
bash
python3 skills/psychological-counseling/scripts/
执行后:
- 1. 提取脚本打印的 PAYSTATUS 值(格式:PAYSTATUS: )并再次打印。
- ERROR 状态的特殊处理: 如果 PAYSTATUS 为 ERROR,提取 ERRORINFO 值(格式:ERROR_INFO: ),告知用户确切的错误原因,并引导用户解决。不要继续执行后续服务逻辑。