shark-autotune

Analyze Shark agent timing logs to recommend SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS values.

12|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/keugenek/shark --skill shark-autotune
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shark-autotune
Source: https://github.com/keugenek/shark/tree/main/commands/shark-autotune
Command: npx skills add https://github.com/keugenek/shark --skill shark-autotune

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually configuring SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS for Shark pattern AI coding agents relies on guesswork, leading to either frequent task timeouts from overly short settings or wasted idle time from overly long ones. This Skill eliminates that guesswork by analyzing actual historical timing data from your agent runs to deliver data-driven, tailored configuration recommendations.

Core Features & Use Cases

  • Timing Data Analysis: Processes Shark agent timing logs to calculate key performance metrics including median and p95 turn times, timeout rates, loops to completion, and wasted headroom from overly generous timeouts.
  • Evidence-Based Recommendations: Generates clear, justified suggestions for optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS values, with explicit rationale tied to your specific workload patterns.
  • Use Case: If you run Shark agents for coding tasks and notice inconsistent timeout failures or excessive waiting between steps, use this Skill to replace generic default settings with values calibrated to your actual task execution times.

Quick Start

Use the shark-autotune skill to analyze your Shark agent's timing history and get recommended timeout and loop configuration settings.

Frequently Asked Questions about shark-autotune

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Shark agent timeout settings to stop task failures?

Analyze historical Shark agent timing data to calculate median and p95 turn times, timeout rates, and loops to completion metrics, eliminating configuration guesswork by providing tailored timeout and loop limit recommendations.

Why does my AI coding agent timeout before completing tasks?

Your AI coding agent times out because generic SHARK_LOOP_TIMEOUT values are too short for your workload. Analyzing historical timing logs calculates actual p95 turn times and loops to completion, revealing the optimal timeout threshold.

What is the best way to configure loop limits for non-blocking AI coding workflows?

The best way to configure loop limits is to process historical Shark agent timing logs to calculate loops to completion metrics, delivering evidence-based SHARK_MAX_LOOPS recommendations tailored to your specific task execution patterns.

Can I use historical timing analysis to fix excessive idle waiting in my agent workflow?

Yes, historical timing analysis fixes excessive idle waiting by detecting wasted headroom from overly generous timeout configurations. It processes prior Shark run logs to recommend adjusted SHARK_LOOP_TIMEOUT values that eliminate unnecessary waiting.

Do I need prior task run logs to tune my Shark agent configuration?

Yes, you need prior task run logs. The tuning process analyzes historical Shark agent timing data from previous runs to calculate performance percentiles and timeout rates, generating data-driven configuration recommendations.