Claw Pet
Use this skill when a user wants you to trigger a remote catch action against a pet backend that they control.
Workflow
- 1. Load runtime config from environment variables first, then local
_meta.json. - Verify
CATCH_API_URL and API_KEY are present. - Send a
POST request with JSON body {"action":"catch"}. - Parse the response and classify it as one of:
-
pet
-
item
-
empty
-
error
- 5. Return a friendly summary without exposing secrets.
Configuration
Provide these values before use:
- 1. Environment variables:
-
CATCH_API_URL
-
API_KEY
- 2. Or skill-local
_meta.json for development/testing
Keep _meta.json free of production secrets before sharing or publishing the skill.
Expected Backend Behavior
The backend should:
- - accept
POST requests to INLINECODE15 - authenticate with INLINECODE16
- return JSON only
- return either a pet result, item result, empty result, or structured error
Read references/api.md for the response contract.
Trigger Examples
This skill should trigger for requests such as:
- - "去抓一只宠物"
- "Catch me a pet"
- "Try to fish"
- "Go catch something for me"
- "帮我抽一下今天的宠物"
Script
Use scripts/catch_pet.py for the actual API call. Prefer the script over re-implementing the request flow inline.
Output Rules
- - If a pet is caught, include rarity, name, level, and any short flavor text.
- If an item is caught, include item name, rarity, quantity, and description if present.
- If nothing is caught, say so plainly.
- If the backend returns an error or malformed payload, explain the failure category briefly.
Publish Notes
This skill is only the agent-side caller. It does not bundle the backend service.
Users who install it must configure their own reachable backend endpoint and API key.
爪宠技能
当用户希望您对其控制的宠物后端触发远程catch动作时,请使用此技能。
工作流程
- 1. 首先从环境变量加载运行时配置,然后加载本地meta.json。
- 确认CATCHAPIURL和APIKEY已存在。
- 发送带有JSON主体{action:catch}的POST请求。
- 解析响应并将其分类为以下之一:
- pet(宠物)
- item(物品)
- empty(空)
- error(错误)
- 5. 返回友好的摘要,不泄露机密信息。
配置
使用前请提供以下值:
- 1. 环境变量:
- CATCH
APIURL
- API_KEY
- 2. 或用于开发/测试的技能本地_meta.json
在分享或发布技能前,请确保_meta.json不包含生产环境的机密信息。
预期的后端行为
后端应:
- - 接受发送到CATCHAPIURL的POST请求
- 使用Authorization: Bearer 进行身份验证
- 仅返回JSON格式数据
- 返回宠物结果、物品结果、空结果或结构化错误
请阅读references/api.md了解响应协议。
触发示例
此技能应对以下请求触发:
- - 去抓一只宠物
- Catch me a pet
- Try to fish
- Go catch something for me
- 帮我抽一下今天的宠物
脚本
使用scripts/catch_pet.py进行实际的API调用。优先使用脚本而非内联重新实现请求流程。
输出规则
- - 如果捕获到宠物,需包含稀有度、名称、等级以及简短的描述文字。
- 如果捕获到物品,需包含物品名称、稀有度、数量以及描述(如有)。
- 如果未捕获到任何东西,直接说明。
- 如果后端返回错误或格式异常的有效载荷,简要说明失败类别。
发布说明
此技能仅为代理端调用器。它不包含后端服务。
安装此技能的用户必须配置自己的可访问后端端点及API密钥。