prediction-market-bot
运行完整的 Dawn CLI 策略生命周期,从身份验证和资助到策略创建、启动、监控和终止。当用户要求使用黎明-cli 命令创建、启动、监控、调试或操作策略/代理时使用。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~njdawn-prediction-market-bot-dawncURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~njdawn-prediction-market-bot-dawn/file -o njdawn-prediction-market-bot-dawn.md# Run a Dawn strategy lifecycle ## Goal Execute a complete `dawn` strategy workflow: install/check CLI, authenticate, prepare funding, create and iterate strategy code, launch paper/live runs, monitor status, and stop safely when requested. ## When to use Use this skill when the user asks to: - create a strategy from plain-English intent, - revise or upload strategy code, - launch paper or live strategy runs, - monitor run health/positions/logs, - stop or debug an active run. ## Install and preflight Install `dawn` if needed: ```bash npm install -g @dawnai/cli ``` Verify: ```bash # Print current Dawn CLI version dawn version dawn --help ``` Local source workflow only: ```bash cd dawn-cli npm install npm run build ./install.sh ``` ## Command map Auth: - `dawn auth login` - `dawn auth status` - `dawn auth logout` Account: - `dawn account overview` - `dawn account fund` - `dawn account wallet` Strategy authoring: - `dawn strategy list` - `dawn strategy create "<text>"` - `dawn strategy status <conversationId>` - `dawn strategy revise <conversationId> "<text>"` - `dawn strategy rules <conversationId> list` - `dawn strategy rules <conversationId> approve <rule-index>` - `dawn strategy rules <conversationId> approve-all` - `dawn strategy code <conversationId> status` - `dawn strategy code <conversationId> generate` - `dawn strategy code <conversationId> export [--out <path>] [--json]` - `dawn strategy code <conversationId> upload <path-to-file>` Launch and operations: - `dawn strategy launch <conversationId> --budget <usd> [--live] [--hours N]` - `dawn strategy positions <conversationId> [--strategy-id <strategyId>]` - `dawn run list` - `dawn run status <conversationId>` - `dawn run logs <conversationId> [--limit N]` - `dawn run stop <conversationId>` ## Standard flow 1. Authenticate: `dawn auth login`. 2. Confirm funding path: `dawn account fund` (required for live runs). 3. Create strategy: `dawn strategy create "<request>"` and capture `conversationId`. 4. Iterate strategy: - revise prompt (`strategy revise`) and/or upload files (`strategy code ... upload`), - review/approve rules, - generate code, - export code when needed (`--json` for multi-file map). 5. Launch: - paper: `dawn strategy launch <conversationId> --budget 50` - live: `dawn strategy launch <conversationId> --budget 50 --live` - custom duration: add `--hours N` 6. Monitor: - `dawn run status <conversationId>` - `dawn strategy positions <conversationId>` - `dawn run logs <conversationId> --limit N` 7. Stop when requested: `dawn run stop <conversationId>`, then verify status again. ## Monitoring loop For active monitoring sessions: 1. Query `dawn run status <conversationId>`. 2. Record timestamp, `isRunning`, status, and active strategy IDs. 3. Query `dawn strategy positions <conversationId>` for holdings/PnL. 4. Query `dawn run logs <conversationId> --limit N` for execution details. 5. If records look stale or missing, wait briefly and retry once. ## Troubleshooting - `"Not authenticated. Run: dawn auth login"`: run `dawn auth login` and retry. - Auth callback completes but CLI appears stuck: interrupt once and retry login. - `"No strategy version found..."`: create/revise/upload strategy code, then relaunch. - `"No strategies found for this agent"` on stop: verify `conversationId`, then check `dawn run status`. - Live launch fails: re-check funding path with `dawn account fund`. ## Run checklist ```text Dawn Strategy Runbook - [ ] Preflight complete - [ ] Auth complete - [ ] Funding path checked (or user confirmed paper-only) - [ ] conversationId captured - [ ] Strategy code generated/uploaded - [ ] Launch run completed (paper/live) - [ ] strategyId captured (if launched) - [ ] Monitoring snapshots collected - [ ] Stop executed (if requested) - [ ] Final status verified ``` ## Skills Individual skills for each command: | Skill | Purpose | |-------|---------| | **dawn-auth** | Install, authenticate, check status, logout | | **dawn-account** | Account overview, funding, wallet balances | | **dawn-strategy-create** | Create a strategy from plain-English prompt | | **dawn-strategy-list** | List all strategies | | **dawn-strategy-status** | Full strategy status and health | | **dawn-strategy-revise** | Iterate on a strategy with revisions | | **dawn-strategy-rules** | List, approve, and manage rules | | **dawn-strategy-code** | Code generation, status, export, upload | | **dawn-strategy-launch** | Launch paper or live runs | | **dawn-strategy-positions** | View positions and PnL | | **dawn-run-monitor** | List runs, check status, view logs | | **dawn-run-stop** | Stop a running strategy | ## Required output When using this skill, always return: - `conversationId`, - `strategyId` (if launched), - run mode (paper/live), - latest monitoring summary, - exact next command to run (or the last command run). --- ## 中文说明 # 运行 Dawn 策略生命周期 ## 目标 执行一个完整的 `dawn` 策略工作流:安装/检查 CLI、身份验证、准备资金、创建并迭代策略代码、启动模拟盘/实盘运行、监控状态,并在需要时安全停止。 ## 何时使用 当用户要求执行以下操作时使用本技能: - 从自然语言意图创建策略, - 修订或上传策略代码, - 启动模拟盘或实盘策略运行, - 监控运行健康状况/持仓/日志, - 停止或调试正在运行的策略。 ## 安装和预检 如有需要,安装 `dawn`: ```bash npm install -g @dawnai/cli ``` 验证: ```bash # Print current Dawn CLI version dawn version dawn --help ``` 仅本地源码工作流: ```bash cd dawn-cli npm install npm run build ./install.sh ``` ## 命令映射 身份验证: - `dawn auth login` - `dawn auth status` - `dawn auth logout` 账户: - `dawn account overview` - `dawn account fund` - `dawn account wallet` 策略编写: - `dawn strategy list` - `dawn strategy create "<text>"` - `dawn strategy status <conversationId>` - `dawn strategy revise <conversationId> "<text>"` - `dawn strategy rules <conversationId> list` - `dawn strategy rules <conversationId> approve <rule-index>` - `dawn strategy rules <conversationId> approve-all` - `dawn strategy code <conversationId> status` - `dawn strategy code <conversationId> generate` - `dawn strategy code <conversationId> export [--out <path>] [--json]` - `dawn strategy code <conversationId> upload <path-to-file>` 启动和运营: - `dawn strategy launch <conversationId> --budget <usd> [--live] [--hours N]` - `dawn strategy positions <conversationId> [--strategy-id <strategyId>]` - `dawn run list` - `dawn run status <conversationId>` - `dawn run logs <conversationId> [--limit N]` - `dawn run stop <conversationId>` ## 标准流程 1. 身份验证:`dawn auth login`。 2. 确认资金路径:`dawn account fund`(实盘运行所需)。 3. 创建策略:`dawn strategy create "<request>"` 并记录 `conversationId`。 4. 迭代策略: - 修订提示(`strategy revise`)和/或上传文件(`strategy code ... upload`), - 审查/批准规则, - 生成代码, - 需要时导出代码(`--json` 用于多文件映射)。 5. 启动: - 模拟盘:`dawn strategy launch <conversationId> --budget 50` - 实盘:`dawn strategy launch <conversationId> --budget 50 --live` - 自定义时长:添加 `--hours N` 6. 监控: - `dawn run status <conversationId>` - `dawn strategy positions <conversationId>` - `dawn run logs <conversationId> --limit N` 7. 按需停止:`dawn run stop <conversationId>`,然后再次验证状态。 ## 监控循环 对于活动监控会话: 1. 查询 `dawn run status <conversationId>`。 2. 记录时间戳、`isRunning`、状态和活动策略 ID。 3. 查询 `dawn strategy positions <conversationId>` 以获取持仓/盈亏。 4. 查询 `dawn run logs <conversationId> --limit N` 以获取执行细节。 5. 如果记录看起来陈旧或缺失,短暂等待并重试一次。 ## 故障排查 - `"Not authenticated. Run: dawn auth login"`:运行 `dawn auth login` 并重试。 - 身份验证回调已完成但 CLI 似乎卡住:中断一次并重新登录。 - `"No strategy version found..."`:创建/修订/上传策略代码,然后重新启动。 - 停止时出现 `"No strategies found for this agent"`:核实 `conversationId`,然后检查 `dawn run status`。 - 实盘启动失败:用 `dawn account fund` 重新检查资金路径。 ## 运行清单 ```text Dawn Strategy Runbook - [ ] Preflight complete - [ ] Auth complete - [ ] Funding path checked (or user confirmed paper-only) - [ ] conversationId captured - [ ] Strategy code generated/uploaded - [ ] Launch run completed (paper/live) - [ ] strategyId captured (if launched) - [ ] Monitoring snapshots collected - [ ] Stop executed (if requested) - [ ] Final status verified ``` ## 技能 每个命令对应的独立技能: | 技能 | 用途 | |-------|---------| | **dawn-auth** | 安装、身份验证、检查状态、登出