一键导入
shark-autotune
Analyse shark timing history and recommend optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyse shark timing history and recommend optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | shark-autotune |
| description | Analyse shark timing history and recommend optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS settings |
Analyse recorded shark timing data and recommend optimal settings.
Read $SKILL_DIR/../state/timings.jsonl — each line is a JSON object:
{"ts":1710000000,"loop":1,"elapsed_s":12.3,"timeout_s":25,"result":"ok|timeout|done","task_hash":"abc123"}
If the file doesn't exist or is empty, report "No timing data yet. Run tasks with /shark first to collect data."
Compute and report:
Show recommendations:
Current: SHARK_LOOP_TIMEOUT=25 SHARK_MAX_LOOPS=50
Recommended: SHARK_LOOP_TIMEOUT=N SHARK_MAX_LOOPS=M
Rationale:
- p95 turn time is Xs, so timeout of Ns covers 95% with buffer
- p95 completion is N loops, so max_loops of M gives safe margin
- Timeout rate is X% — [>15%: consider splitting tasks | healthy]
- Wasted headroom: Xs total
If timeout rate > 30%: "Consider breaking tasks into smaller steps."
If median turn time < 5s: "Most turns complete fast. Consider lowering timeout."
Run shark.ps1/shark.sh loop enforcer with OS-level timeout per turn
Clean up shark state files (.shark-done, SHARK_LOG.md, pending.json, timings.jsonl)
Check status of shark-exec background jobs, .shark-done, and SHARK_LOG.md