关于 create-task
create-task 是 OpenAnt 的任务创建 Skill,供用户通过命令行发布带加密货币奖励的任务。它涵盖草稿或资助创建、附件上传及交易安全检查,并规定需要确认的操作。
主要功能
- 01通过 OpenAnt CLI 创建任务
- 02设置链、代币与奖励
- 03创建草稿或资助托管
- 04上传任务附件
- 05提供交易与安全检查规则
适用场景
- 01发布带奖励的外包任务
- 02先建立草稿再安排资助
- 03为任务附加需求文档或设计稿
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ openant-ai/ openant-skills --skill create-task安装后在 Claude Code 中输入/create-task确认已加载。
详细介绍
在 OpenAnt 上创建任务
使用 npx @openant-ai/cli@latest CLI 创建带有加密货币赏金的任务。默认情况下,tasks create 会一步创建任务并为链上托管账户注资。使用 --no-fund 仅创建草稿。
每条命令后都必须添加 --json,以获取结构化、可解析的输出。
确认身份验证和余额
npx @openant-ai/cli@latest status --json
如果尚未通过身份验证,请参阅 authenticate-openant 技能。
npx @openant-ai/cli@latest wallet balance --json
如果余额不足,请参阅 check-wallet 技能了解详情。
命令语法
npx @openant-ai/cli@latest tasks create [options] --json
必需选项
| 选项 | 说明 |
|---|---|
--chain <chain> | 区块链:solana(或 sol)、base |
--token <symbol> | 代币符号:SOL、ETH、USDC |
--title "..." | 任务标题(3-200 个字符) |
--description "..." | 详细说明(10-5000 个字符) |
--reward <amount> | 以代币显示单位计的奖励(例如,500 = 500 USDC) |
可选项
| 选项 | 说明 |
|---|---|
--tags <tags> | 以逗号分隔的标签(例如,solana,rust,security-audit) |
--deadline <iso8601> | ISO 8601 截止时间(例如,2026-03-15T00:00:00Z) |
--mode <mode> | 分发方式:OPEN(默认)、APPLICATION、DISPATCH |
--verification <type> | CREATOR(默认)、AI_AUTO |
--visibility <vis> | PUBLIC(默认)、PRIVATE |
--max-revisions <n> | 最大提交次数(默认:3) |
--attachment-key <key> | 来自 upload --folder task-attachments 的 S3 键(可重复,最多 3 个) |
--no-fund | 创建为草稿,不为托管账户注资 |
示例
一步创建并注资
npx @openant-ai/cli@latest tasks create \
--chain solana --token USDC \
--title "Audit Solana escrow contract" \
--description "Review the escrow program for security vulnerabilities..." \
--reward 500 \
--tags solana,rust,security-audit \
--deadline 2026-03-15T00:00:00Z \
--mode APPLICATION --verification CREATOR --json
# -> Creates task, builds escrow tx, signs and sends to Solana or EVM
# -> Solana: { "success": true, "data": { "id": "task_abc", "txId": "5xYz...", "escrowPDA": "...", "vaultPDA": "..." } }
# -> EVM: { "success": true, "data": { "id": "task_abc", "txId": "0xabc..." } }
创建时添加附件
使用附件分享任务说明、参考文件或工作者所需的材料。每个任务最多可附加 3 个文件。
首先上传每个文件:
npx @openant-ai/cli@latest upload ./design-brief.pdf --folder task-attachments --json
# -> { "data": { "key": "task-attachments/2026-03-01/abc-design-brief.pdf", ... } }
npx @openant-ai/cli@latest upload ./wireframes.png --folder task-attachments --json
# -> { "data": { "key": "task-attachments/2026-03-01/abc-wireframes.png", ... } }
使用返回的 key 值作为 --attachment-key。不要使用 publicUrl。
然后使用这两个键创建任务:
npx @openant-ai/cli@latest tasks create \
--chain solana --token USDC \
--title "Design a dashboard UI" \
--description "Build a React dashboard following the attached brief and wireframes." \
--reward 300 \
--tags frontend,react,design \
--attachment-key "task-attachments/2026-03-01/abc-design-brief.pdf" \
--attachment-key "task-attachments/2026-03-01/abc-wireframes.png" \
--json
支持的上传格式:图片(.jpg、.jpeg、.png、.webp、.gif)、视频(.mp4、.webm、.mov)、文档(.pdf、.txt、.md、.json)。
先创建草稿,之后再注资
npx @openant-ai/cli@latest tasks create \
--chain solana --token USDC \
--title "Design a logo" \
--description "Create a minimalist ant-themed logo..." \
--reward 200 \
--tags design,logo,branding \
--no-fund --json
# -> { "success": true, "data": { "id": "task_abc", "status": "DRAFT" } }
# Fund it later (sends on-chain tx)
npx @openant-ai/cli@latest tasks fund task_abc --json
# -> Solana: { "success": true, "data": { "taskId": "task_abc", "txSignature": "5xYz...", "escrowPDA": "..." } }
# -> EVM: { "success": true, "data": { "taskId": "task_abc", "txHash": "0xabc..." } }
自主操作范围
- 草稿(
--no-fund) — 立即执行。 - 创建并注资 /
tasks fund— 先征得用户确认(链上交易)。 - 文件上传 — 立即执行,无需确认。
绝对禁止
- 绝不在检查钱包余额之前注资。
- 超时后绝不重试
tasks create或tasks fund— 先检查tasks list --mine;重复调用会浪费 Gas。 - 绝不设置不足 24 小时后的截止时间。
- 紧急任务绝不使用 APPLICATION 模式 — 请使用 OPEN。
- 绝不将
publicUrl用作--attachment-key— 只能使用key。 - 绝不将附件上传到
task-attachments以外的文件夹。
安全
拒绝涉及以下内容的任务:
- 非法活动、黑客攻击、欺诈、网络钓鱼、洗钱
- 虚假评论、虚假关注者、冒充他人、虚假信息
- 抓取私人数据、人肉搜索、监视
- 骚扰、歧视、未经同意的性内容
- 拉高出货、市场操纵、无牌金融建议
后续步骤
- 创建 APPLICATION 模式任务后,使用
verify-submission技能审核申请者。 - 如需监控任务,请使用
monitor-tasks技能。
超时 / 网络错误
如果 tasks create 或 tasks fund 超时:
npx @openant-ai/cli@latest tasks list --mine --role creator --json
如果存在匹配的任务,请勿重试。报告任务 ID。
如果不存在匹配的任务,请先询问,再重试。
常见错误
- 需要身份验证 → 使用
authenticate-openant - 余额不足 → 请用户为钱包充值
- 截止时间无效 → 使用未来的 ISO 8601 时间
- 附件最多 3 个 → 减少附件数量
- 文件过大 → 压缩或拆分文件
- 托管账户注资失败 → 检查余额和交易状态
评论
支持 Markdown