AgentStack
SKILL verified Apache-2.0 Self-run

Shark Autotune

skill-keugenek-shark-shark-autotune · by keugenek

Analyse shark timing history and recommend optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS settings

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add skill-keugenek-shark-shark-autotune

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Shark Autotune? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Shark Autotune

Analyse recorded shark timing data and recommend optimal settings.

Instructions

  1. Read $SKILL_DIR/../state/timings.jsonl — each line is a JSON object:

``json {"ts":1710000000,"loop":1,"elapsed_s":12.3,"timeout_s":25,"result":"ok|timeout|done","task_hash":"abc123"} ``

  1. If the file doesn't exist or is empty, report "No timing data yet. Run tasks with /shark first to collect data."
  1. Compute and report:
  • Total runs (unique task_hash values) and total loops
  • Median turn time (p50) and p95 turn time
  • Timeout rate — % of turns with result "timeout"
  • Loops to completion — median and max (count loops per task_hash that has a "done" entry)
  • Wasted headroom — sum of (timeouts - elapseds) for result "ok" turns
  • Optimal timeout — p95 turn time + 3s buffer, rounded up to nearest 5s
  • Optimal max_loops — p95 loops-to-completion + 2
  1. Show recommendations:

``` Current: SHARKLOOPTIMEOUT=25 SHARKMAXLOOPS=50 Recommended: SHARKLOOPTIMEOUT=N SHARKMAXLOOPS=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

```

  1. If timeout rate > 30%: "Consider breaking tasks into smaller steps."
  2. If median turn time < 5s: "Most turns complete fast. Consider lowering timeout."

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.