{"id":"341b4621-95a2-4ff7-873a-cfecb09a99be","shortId":"KHWsQn","kind":"skill","title":"pilot-task-retry","tagline":"Automatic retry with exponential backoff and fallback targets.  Use this skill when: 1. You need resilient task submission with automatic retry logic 2. You want exponential backoff to handle transient failures 3. You need fallback to alternative agents when primary fails  Do NOT","description":"# pilot-task-retry\n\nAutomatic task retry with exponential backoff and fallback targets. Implements resilient task submission that handles transient failures.\n\n## Essential Commands\n\n### Basic retry with backoff\n```bash\nMAX_RETRIES=3\nRETRY=0\n\nwhile [ $RETRY -lt $MAX_RETRIES ]; do\n  RESULT=$(pilotctl --json task submit \"$AGENT\" --task \"$TASK_DESC\" 2>&1)\n\n  echo \"$RESULT\" | jq -e '.task_id' >/dev/null 2>&1 && break\n\n  RETRY=$((RETRY + 1))\n  WAIT=$((2 ** RETRY))\n  sleep $WAIT\ndone\n```\n\n### Retry with fallback agents\n```bash\nfor AGENT in \"$PRIMARY\" \"$SECONDARY\" \"$TERTIARY\"; do\n  RESULT=$(pilotctl --json task submit \"$AGENT\" --task \"$TASK_DESC\" 2>&1)\n  echo \"$RESULT\" | jq -e '.task_id' >/dev/null 2>&1 && exit 0\ndone\n```\n\n### Exponential backoff with jitter\n```bash\nWAIT=$((2 ** RETRY))\nJITTER=$((WAIT / 4))\nWAIT=$((WAIT + (RANDOM % (2 * JITTER)) - JITTER))\nsleep $WAIT\n```\n\n## Workflow Example\n\nResilient task submission with retry and fallback:\n\n```bash\n#!/bin/bash\nset -e\n\n# Find candidate agents sorted by reputation\nAGENTS=$(pilotctl --json peers --search \"analytics\" | jq -r 'sort_by(-.polo_score) | .[0:3] | .[].address')\nAGENT_ARRAY=($AGENTS)\n\nsubmit_with_retry() {\n  local AGENT=$1\n  local RETRY=0\n  local MAX_RETRIES=5\n\n  while [ $RETRY -lt $MAX_RETRIES ]; do\n    RESULT=$(pilotctl --json task submit \"$AGENT\" --task \"$TASK_DESC\" 2>&1)\n\n    if echo \"$RESULT\" | jq -e '.task_id' >/dev/null 2>&1; then\n      TASK_ID=$(echo \"$RESULT\" | jq -r '.task_id')\n      echo \"Success! Task ID: $TASK_ID\"\n      return 0\n    fi\n\n    # Exponential backoff with jitter\n    BACKOFF=$((2 * (2 ** RETRY)))\n    JITTER=$((BACKOFF / 4))\n    WAIT=$((BACKOFF + (RANDOM % (2 * JITTER)) - JITTER))\n\n    echo \"Retrying in ${WAIT}s...\"\n    sleep $WAIT\n    RETRY=$((RETRY + 1))\n  done\n\n  return 1\n}\n\n# Try each agent with retry\nTASK_DESC=\"Run analytics pipeline on dataset X\"\n\nfor AGENT in \"${AGENT_ARRAY[@]}\"; do\n  if submit_with_retry \"$AGENT\"; then\n    echo \"Task submitted on $AGENT\"\n    exit 0\n  fi\n  echo \"Falling back to next agent...\"\ndone\n\necho \"All agents exhausted\"\nexit 1\n```\n\n## Dependencies\n\nRequires `pilot-protocol` skill, `pilotctl` binary, running daemon, `jq`, and Bash 4.0+.","tags":["pilot","task","retry","skills","teoslayer","agent-skills","ai-agents","clawhub","networking","openclaw","overlay-network","p2p"],"capabilities":["skill","source-teoslayer","skill-pilot-task-retry","topic-agent-skills","topic-ai-agents","topic-clawhub","topic-networking","topic-openclaw","topic-overlay-network","topic-p2p","topic-pilot-protocol"],"categories":["pilot-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/TeoSlayer/pilot-skills/pilot-task-retry","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add TeoSlayer/pilot-skills","source_repo":"https://github.com/TeoSlayer/pilot-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (2,177 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:15:05.357Z","embedding":null,"createdAt":"2026-05-18T13:22:53.829Z","updatedAt":"2026-05-18T19:15:05.357Z","lastSeenAt":"2026-05-18T19:15:05.357Z","tsv":"'/bin/bash':181 '/dev/null':104,146,245 '0':80,150,202,216,264,327 '1':17,97,106,110,139,148,213,237,247,292,295,341 '2':27,96,105,112,138,147,158,166,236,246,271,272,280 '3':36,78,203 '4':162,276 '4.0':355 '5':220 'address':204 'agent':42,92,120,123,134,186,190,205,207,212,232,298,310,312,319,325,334,338 'altern':41 'analyt':195,304 'array':206,313 'automat':5,24,52 'back':331 'backoff':9,31,57,74,153,267,270,275,278 'bash':75,121,156,180,354 'basic':71 'binari':349 'break':107 'candid':185 'command':70 'daemon':351 'dataset':307 'depend':342 'desc':95,137,235,302 'done':116,151,293,335 'e':101,143,183,242 'echo':98,140,239,251,257,283,321,329,336 'essenti':69 'exampl':172 'exhaust':339 'exit':149,326,340 'exponenti':8,30,56,152,266 'fail':45 'failur':35,68 'fall':330 'fallback':11,39,59,119,179 'fi':265,328 'find':184 'handl':33,66 'id':103,145,244,250,256,260,262 'implement':61 'jitter':155,160,167,168,269,274,281,282 'jq':100,142,196,241,253,352 'json':89,131,192,229 'local':211,214,217 'logic':26 'lt':83,223 'max':76,84,218,224 'need':19,38 'next':333 'peer':193 'pilot':2,49,345 'pilot-protocol':344 'pilot-task-retri':1,48 'pilotctl':88,130,191,228,348 'pipelin':305 'polo':200 'primari':44,125 'protocol':346 'r':197,254 'random':165,279 'reput':189 'requir':343 'resili':20,62,173 'result':87,99,129,141,227,240,252 'retri':4,6,25,51,54,72,77,79,82,85,108,109,113,117,159,177,210,215,219,222,225,273,284,290,291,300,318 'return':263,294 'run':303,350 'score':201 'search':194 'secondari':126 'set':182 'skill':15,347 'skill-pilot-task-retry' 'sleep':114,169,288 'sort':187,198 'source-teoslayer' 'submiss':22,64,175 'submit':91,133,208,231,316,323 'success':258 'target':12,60 'task':3,21,50,53,63,90,93,94,102,132,135,136,144,174,230,233,234,243,249,255,259,261,301,322 'tertiari':127 'topic-agent-skills' 'topic-ai-agents' 'topic-clawhub' 'topic-networking' 'topic-openclaw' 'topic-overlay-network' 'topic-p2p' 'topic-pilot-protocol' 'transient':34,67 'tri':296 'use':13 'wait':111,115,157,161,163,164,170,277,286,289 'want':29 'workflow':171 'x':308","prices":[{"id":"5fde8bfb-7862-4958-a8af-f8334be6b39d","listingId":"341b4621-95a2-4ff7-873a-cfecb09a99be","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"TeoSlayer","category":"pilot-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:22:53.829Z"}],"sources":[{"listingId":"341b4621-95a2-4ff7-873a-cfecb09a99be","source":"github","sourceId":"TeoSlayer/pilot-skills/pilot-task-retry","sourceUrl":"https://github.com/TeoSlayer/pilot-skills/tree/main/skills/pilot-task-retry","isPrimary":false,"firstSeenAt":"2026-05-18T13:22:53.829Z","lastSeenAt":"2026-05-18T19:15:05.357Z"}],"details":{"listingId":"341b4621-95a2-4ff7-873a-cfecb09a99be","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"TeoSlayer","slug":"pilot-task-retry","github":{"repo":"TeoSlayer/pilot-skills","stars":6,"topics":["agent-skills","ai-agents","clawhub","networking","openclaw","overlay-network","p2p","pilot-protocol"],"license":"agpl-3.0","html_url":"https://github.com/TeoSlayer/pilot-skills","pushed_at":"2026-05-13T06:08:49Z","description":"80+ agent skills for Pilot Protocol — communication, file transfer, trust, task routing, swarm coordination, and more","skill_md_sha":"4aace592c66c890f94e450d378b6e518c1bac78b","skill_md_path":"skills/pilot-task-retry/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/TeoSlayer/pilot-skills/tree/main/skills/pilot-task-retry"},"layout":"multi","source":"github","category":"pilot-skills","frontmatter":{"name":"pilot-task-retry","license":"AGPL-3.0","description":"Automatic retry with exponential backoff and fallback targets.  Use this skill when: 1. You need resilient task submission with automatic retry logic 2. You want exponential backoff to handle transient failures 3. You need fallback to alternative agents when primary fails  Do NOT use this skill when: - Failures are permanent and retries won't help - You need immediate failure notification - The task is not idempotent (repeated execution causes issues)","compatibility":"Requires pilot-protocol skill and pilotctl binary on PATH. The daemon must be running (pilotctl daemon start)."},"skills_sh_url":"https://skills.sh/TeoSlayer/pilot-skills/pilot-task-retry"},"updatedAt":"2026-05-18T19:15:05.357Z"}}