Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By keugenek
The Shark Pattern — non-blocking agent execution with parallel remoras. Every LLM turn completes in under 30 seconds.
npx claudepluginhub keugenek/sharkAnalyse shark timing history and recommend optimal timeout/loop settings
Analyse shark timing history and recommend optimal SHARK_LOOP_TIMEOUT and SHARK_MAX_LOOPS settings
Clean up shark state files (.shark-done, SHARK_LOG.md, pending.json)
Clean up shark state files (.shark-done, SHARK_LOG.md, pending.json, timings.jsonl)
Run shark loop enforcer with a task (OS-level 25s timeout per turn)
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
OpenAgentsControl — multi-agent orchestration for Claude Code. Context-aware development with skills, subagents, parallel execution, and automated code review.
This skill should be used when the model's ROLE_TYPE is orchestrator and needs to delegate tasks to specialist sub-agents. Provides scientific delegation framework ensuring world-building context (WHERE, WHAT, WHY) while preserving agent autonomy in implementation decisions (HOW). Use when planning task delegation, structuring sub-agent prompts, or coordinating multi-agent workflows.
Sub-agent runner — runs agent definitions on Codex, Claude Code, Cursor CLI, or Gemini CLI from any host AI tool.
Multi-agent orchestration via li o flow and li o fanout
Multi-agent orchestration framework for Claude Code. Routes tasks to specialized Haiku/Sonnet subagents while Opus orchestrates — inspired by speculative decoding. Includes 10 specialized heads, environment preflight checks, and ~50% API cost reduction.
Repowire mesh usage skills for AI coding agents: cross-agent review and planning, delegate, usage patterns, and install/update. Backend-agnostic and parameterised on the agent you choose.
A shark that stops swimming dies. An agent that waits for tools wastes compute.
Works with: Claude Code · Codex · Gemini CLI · Cursor · Windsurf · Aider · OpenClaw · any LLM agent
The Shark Pattern is a universal non-blocking execution model for AI coding agents.
The rule: Every LLM turn completes in under 30 seconds. Slow operations get spawned as remoras. The main agent never waits.
| Fish | Role |
|---|---|
| 🦈 Shark | Main agent — never stops, always reasoning |
| 🐟 Remora | Timed sub-agents — attach to the shark, do the slow work in parallel |
| 🐠 Pilot Fish | Time-bounded pre-analysis — swim ahead while remoras are running |
Most agents work sequentially:
think → slow tool → WAIT 45s → think → slow tool → WAIT 30s → ...
90% of runtime is spent waiting. You're paying for LLM compute while it stares at a spinner.
think → spawn 🐟 remora(web search) ────────────────► result
→ spawn 🐟 remora(remote cmd) ──────────────────────► result
→ spawn 🐟 remora(build/test) ──────────────────────────► result
→ 🦈 keep reasoning in parallel
→ first remora back → spawn 🐠 pilot fish (pre-analyse)
→ all remoras back → synthesise + incorporate pilot fish draft
| Sequential | Ralph Loop | 🦈 Shark | |
|---|---|---|---|
| Execution | Blocking | Iterative, blocking | Parallel, non-blocking |
| Tool wait | Always | Always | Never |
| Idle time | Wasted | Wasted | Pilot fish pre-analysis |
| Speed | Linear | Linear | Bounded by slowest parallel task |
| Works with | Any agent | Any agent | Any agent |
| Prior art | — | ghuntley.com/ralph | Novel — no prior art |
┌─────────────┐
│ DECOMPOSE │ Break task into N independent subtasks
└──────┬──────┘
│ spawn N remoras in parallel
▼
┌─────────────┐
│ SPAWN │ sessions_spawn × N, record IDs, keep swimming
└──────┬──────┘
│ first remora completes early?
├──────────────────────────────► spawn 🐠 pilot fish (pre-analyse)
│ main agent reasons while waiting
▼
┌─────────────┐ timeout ⏱ / crash ❌
│ MONITOR │ ──────────────────────► partial result still useful
└──────┬──────┘
│ all done or deadline hit
▼
┌─────────────┐
│ AGGREGATE │ Merge results + pilot fish draft, note failures
└──────┬──────┘
│
▼
┌─────────────┐
│ REPORT │ Single coherent response: "3/4 succeeded, 1 timed out"
└─────────────┘
No nested remoras — remoras always run inline. Only the main shark spawns.
Works in Telegram, Discord, Signal, iMessage — pure Unicode, no images.
🦈 3 remoras · 1 pilot fish
⊙ [A] web search ████████████ ✅ 12s
⊙ [B] server check ████████████ ✅ 8s
○ [C] build + test ██████░░░░░░ ~18s left
◈ [P] Pilot fish ████░░░░░░░░ ~14s left
↳ synthesising…
Symbols: ◉=done ○=pending ⊙=running ◈=pilot fish ⏱=timeout ❌=error
Bar fill: filled = round(elapsed / timeout * 12) blocks of █, remainder ░
shark-pattern/
├── SKILL.md # Main shark skill — load this
├── shark.sh # Ralph-style loop enforcer (Linux/Mac)
├── shark.ps1 # Ralph-style loop enforcer (Windows)
├── shark-exec/
│ ├── SKILL.md # Sub-skill: background exec + cron poller
│ ├── scripts/
│ │ └── poll-and-deliver.js
│ └── state/
│ └── .gitkeep
└── tests/
├── lint.sh # Structural lint tests
└── scenarios.md # Behavioural test specs
curl -sO https://raw.githubusercontent.com/keugenek/shark/main/SKILL.md \
&& mv SKILL.md SHARK.md && echo "SHARK.md" >> .gitignore
Drop SHARK.md in your project root. Every agent that reads context files will pick it up.
# Install as a plugin (enables /shark, /shark:loop, /shark:status, etc.)
mkdir -p ~/.claude/plugins/cache/user-local/shark/1.0.0
git clone https://github.com/keugenek/shark /tmp/shark-install \
&& rsync -a --exclude='.git' /tmp/shark-install/ ~/.claude/plugins/cache/user-local/shark/1.0.0/ \
&& rm -rf /tmp/shark-install
Register the plugin — add this entry to ~/.claude/plugins/installed_plugins.json under "plugins":
"shark@user-local": [{
"scope": "user",
"installPath": "~/.claude/plugins/cache/user-local/shark/1.0.0",
"version": "1.0.0",
"installedAt": "2025-01-01T00:00:00.000Z",
"lastUpdated": "2025-01-01T00:00:00.000Z"
}]
Add to ~/.claude/CLAUDE.md:
## Execution Model
See ~/.claude/plugins/cache/user-local/shark/1.0.0/SKILL.md — use the Shark Pattern for any multi-step task with slow tools.