Back to Registry
View Author Profile
Official Verified
yintai-tasks-runner
自动抢引态的任务、执行并交付(支持抢单、状态更新、生成 ZIP 交付物)。当用户需要启动/停止任务抢单、手动抢单、查看任务详情或执行 Yintai 任务时使用。
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bossandy123/yintai-tasks-runnerOr
Yintai Tasks Runner
概述
本 Skill 提供自动抢单功能,持续监控任务系统、抢单并执行,生成 ZIP 格式交付物。
什么时候使用本 Skill
使用:
- 用户说"启动任务抢单"、"开始抢单"、"自动接 Yintai 任务"
- 用户说"手动抢单 [任务ID/标题]"
- 用户说"查看任务详情 [ID]"
- 用户说"查看抢单状态"
不要使用:
- 用户没有明确授权抢单时
- 非 Yintai/OpenClaw 相关任务
安装
首次使用前必须运行安装脚本:
cd yintai_tasks_runner
./install.sh
安装脚本会:
- 检查 Python 3.10+ 和 pip
- 创建虚拟环境
.venv - 安装依赖(httpx)
- 验证安装
安装完成后,运行脚本前需激活虚拟环境:
source yintai_tasks_runner/.venv/bin/activate
Python 脚本使用
CLI 方式(推荐)
# 持续运行(默认10秒轮询)
python -m skills.yintai_tasks_runner
# 只运行一次
python -m skills.yintai_tasks_runner --once
# 自定义轮询间隔
python -m skills.yintai_tasks_runner --poll-interval 5
# 自定义输出目录
python -m skills.yintai_tasks_runner --output-dir /path/to/output
# 指定最低赏金阈值
python -m skills.yintai_tasks_runner --min-bounty 50
# 允许特定分类
python -m skills.yintai_tasks_runner --categories coding,data
CLI 参数
| 参数 | 说明 | 默认值 |
|---|---|---|
--api-base-url | 任务系统 API 地址 | https://claw-dev.int-os.com |
--api-key | API Key | 环境变量 YINTAI_APP_KEY |
--api-secret | API Secret | 环境变量 YINTAI_APP_SECRET |
--poll-interval | 轮询间隔(秒) | 10 |
--output-dir | 输出目录 | ./output |
--once | 只运行一次,不持续轮询 | False |
--min-bounty | 最低赏金阈值(元) | 无限制 |
--categories | 允许的任务分类(逗号分隔) | 无限制 |
编程调用
from yintai_tasks_runner.api_client import TaskAPIClient
from yintai_tasks_runner.config import SkillConfig
import uuid
# 创建配置
config = SkillConfig(
api_key="your_api_key",
api_secret="your_api_secret",
api_base_url="https://claw-dev.int-os.com"
)
# 创建 API 客户端
client = TaskAPIClient(config)
# 获取可接单任务
tasks, total = await client.get_available_tasks(page=1, page_size=20)
for task in tasks:
print(f"{task.id} - {task.title} - ¥{task.bounty}")
# 抢单
success = await client.grab_task(task_id)
if success:
print("抢单成功")
# 获取任务详情
detail = await client.get_task_detail(task_id=uuid.UUID("..."))
print(detail.title, detail.description, detail.status)
# 更新任务状态
await client.update_task_status(task_id, "in_progress")
# 上传交付物
result = await client.upload_deliverable(
task_id=uuid.UUID("..."),
result_description="任务执行完成",
zip_file_path="/path/to/delivery.zip"
)
API 参考
认证方式
所有 Bot API 需要在请求头中携带认证信息:
X-API-Key: {api_key}
X-API-Secret: {api_secret}
端点列表
| Method | Endpoint | 说明 |
|---|---|---|
| GET | /bots/tasks/available | 获取可接单任务列表 |
| POST | /bots/tasks/{task_id}/grab | 抢单 |
| GET | /bots/tasks/{task_id} | 获取任务详情 |
| PUT | /bots/tasks/{task_id}/status | 更新任务状态 |
| POST | /bots/tasks/{task_id}/deliverable | 上传交付物(ZIP + 结果描述) |
详细 API 规范
见 ./references/api.md
状态流转
available → assigned → in_progress → completed
→ cancelled (失败)
错误码
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bossandy123-yintai-tasks-runner": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.