{"id":"5cddd7fe-afc3-4b42-a190-0c074e8457c7","shortId":"mBXqhz","kind":"skill","title":"delayed-command","tagline":"This skill should be used when the user asks to \"run npm test after 30 minutes\", \"git commit after 1 hour\", \"wait 2h then deploy\", \"sleep 45m and run build\", \"after 10m run prettier\", or provides a duration followed by a shell command to execute later.","description":"# Delayed Command Execution\n\nWait for a specified duration, then execute a Bash command.\n\n## Arguments\n\n- **duration**: Time to wait before execution (e.g., `30s`, `5m`, `1h`, `1h30m`)\n- **command**: The Bash command to run after the delay\n\n## Duration Format\n\n| Format   | Example   | Meaning           |\n| -------- | --------- | ----------------- |\n| `Xs`     | `30s`     | 30 seconds        |\n| `Xm`     | `5m`      | 5 minutes         |\n| `Xh`     | `1h`      | 1 hour            |\n| `XhYm`   | `1h30m`   | 1 hour 30 minutes |\n| `XhYmZs` | `1h5m30s` | 1 hour 5 min 30 s |\n\n## Workflow\n\n### 1. Parse Duration\n\nConvert the duration argument to seconds:\n\n- Extract hours (`h`), minutes (`m`), and seconds (`s`) components\n- Calculate total seconds: `hours * 3600 + minutes * 60 + seconds`\n\n**Parsing logic:**\n\n```bash\nduration=\"$1\"\nseconds=0\n\n# Extract hours\nif [[ $duration =~ ([0-9]+)h ]]; then\n  seconds=$((seconds + ${BASH_REMATCH[1]} * 3600))\nfi\n\n# Extract minutes\nif [[ $duration =~ ([0-9]+)m ]]; then\n  seconds=$((seconds + ${BASH_REMATCH[1]} * 60))\nfi\n\n# Extract seconds\nif [[ $duration =~ ([0-9]+)s ]]; then\n  seconds=$((seconds + ${BASH_REMATCH[1]}))\nfi\n```\n\n### 2. Execute with Delay\n\nFor durations **up to 10 minutes** (600 seconds):\n\nRun synchronously using the Bash tool with appropriate timeout:\n\n```bash\nsleep <seconds> && <command>\n```\n\nSet the Bash tool's `timeout` parameter to at least `(seconds + 60) * 1000` milliseconds.\n\nFor durations **over 10 minutes**:\n\nRun in background using `run_in_background: true`:\n\n```bash\nsleep <seconds> && <command>\n```\n\nInform the user the command is running in background and provide the task ID for checking status.\n\n### 3. Report Result\n\nAfter execution completes:\n\n- Display command output\n- Report exit status\n- Note total elapsed time\n\n## Examples\n\n### Short Delay (Synchronous)\n\nUser: `/delayed-command 5m npm test`\n\n1. Parse: 5 minutes = 300 seconds\n2. Execute: `sleep 300 && npm test` (timeout: 360000ms)\n3. Report test results\n\n### Long Delay (Background)\n\nUser: `/delayed-command 1h git commit -m \"auto-commit\"`\n\n1. Parse: 1 hour = 3600 seconds\n2. Execute in background: `sleep 3600 && git commit -m \"auto-commit\"`\n3. Return task ID for status checking\n\n### Combined Duration\n\nUser: `/delayed-command 1h30m ./deploy.sh`\n\n1. Parse: 1h30m = 5400 seconds\n2. Execute in background (>600s): `sleep 5400 && ./deploy.sh`\n3. Inform user of background task\n\n## Error Handling\n\n| Error                    | Response                                     |\n| ------------------------ | -------------------------------------------- |\n| Invalid duration format  | Show supported formats and examples          |\n| Missing command argument | Prompt for the command to execute            |\n| Command not found        | Report error after delay completes           |\n| Duration exceeds 24h     | Warn user and suggest alternative (cron, at) |","tags":["delayed","command","agent","skills","paulrberg","agent-skills","ai-agents"],"capabilities":["skill","source-paulrberg","skill-delayed-command","topic-agent-skills","topic-ai-agents"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PaulRBerg/agent-skills/delayed-command","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PaulRBerg/agent-skills","source_repo":"https://github.com/PaulRBerg/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.475","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 50 github stars · SKILL.md body (2,890 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-04-22T00:56:18.133Z","embedding":null,"createdAt":"2026-04-18T22:17:42.440Z","updatedAt":"2026-04-22T00:56:18.133Z","lastSeenAt":"2026-04-22T00:56:18.133Z","tsv":"'-9':154,169,184 '/delayed-command':283,309,345 '/deploy.sh':347,360 '0':148,153,168,183 '1':23,99,103,109,116,146,161,176,191,287,317,319,348 '10':201,233 '1000':228 '10m':35 '1h':73,98,310 '1h30m':74,102,346,350 '1h5m30s':108 '2':193,293,323,353 '24h':398 '2h':26 '3':262,301,335,361 '30':18,91,105,113 '300':291,296 '30s':71,90 '3600':138,162,321,328 '360000ms':300 '45m':30 '5':95,111,289 '5400':351,359 '5m':72,94,284 '60':140,177,227 '600':203 '600s':357 'altern':403 'appropri':212 'argument':63,122,381 'ask':12 'auto':315,333 'auto-commit':314,332 'background':237,241,253,307,326,356,365 'bash':61,77,144,159,174,189,209,214,218,243 'build':33 'calcul':134 'check':260,341 'combin':342 'command':3,46,51,62,75,78,249,269,380,385,388 'commit':21,312,316,330,334 'complet':267,395 'compon':133 'convert':119 'cron':404 'delay':2,50,83,196,280,306,394 'delayed-command':1 'deploy':28 'display':268 'durat':41,57,64,84,118,121,145,152,167,182,198,231,343,372,396 'e.g':70 'elaps':276 'error':367,369,392 'exampl':87,278,378 'exceed':397 'execut':48,52,59,69,194,266,294,324,354,387 'exit':272 'extract':125,149,164,179 'fi':163,178,192 'follow':42 'format':85,86,373,376 'found':390 'git':20,311,329 'h':127,155 'handl':368 'hour':24,100,104,110,126,137,150,320 'id':258,338 'inform':245,362 'invalid':371 'later':49 'least':225 'logic':143 'long':305 'm':129,170,313,331 'mean':88 'millisecond':229 'min':112 'minut':19,96,106,128,139,165,202,234,290 'miss':379 'note':274 'npm':15,285,297 'output':270 'paramet':222 'pars':117,142,288,318,349 'prettier':37 'prompt':382 'provid':39,255 'rematch':160,175,190 'report':263,271,302,391 'respons':370 'result':264,304 'return':336 'run':14,32,36,80,205,235,239,251 'second':92,124,131,136,141,147,157,158,172,173,180,187,188,204,226,292,322,352 'set':216 'shell':45 'short':279 'show':374 'skill':5 'skill-delayed-command' 'sleep':29,215,244,295,327,358 'source-paulrberg' 'specifi':56 'status':261,273,340 'suggest':402 'support':375 'synchron':206,281 'task':257,337,366 'test':16,286,298,303 'time':65,277 'timeout':213,221,299 'tool':210,219 'topic-agent-skills' 'topic-ai-agents' 'total':135,275 'true':242 'use':8,207,238 'user':11,247,282,308,344,363,400 'wait':25,53,67 'warn':399 'workflow':115 'xh':97 'xhym':101 'xhymz':107 'xm':93 'xs':89","prices":[{"id":"5e129bdb-f129-4b0a-98a7-f347c82674f0","listingId":"5cddd7fe-afc3-4b42-a190-0c074e8457c7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PaulRBerg","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:17:42.440Z"}],"sources":[{"listingId":"5cddd7fe-afc3-4b42-a190-0c074e8457c7","source":"github","sourceId":"PaulRBerg/agent-skills/delayed-command","sourceUrl":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/delayed-command","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:42.440Z","lastSeenAt":"2026-04-22T00:56:18.133Z"}],"details":{"listingId":"5cddd7fe-afc3-4b42-a190-0c074e8457c7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PaulRBerg","slug":"delayed-command","github":{"repo":"PaulRBerg/agent-skills","stars":50,"topics":["agent-skills","ai-agents"],"license":"mit","html_url":"https://github.com/PaulRBerg/agent-skills","pushed_at":"2026-04-20T16:22:56Z","description":"PRB's collection of agent skills","skill_md_sha":"37bbb5f11161822cb635fefaf0a4326cd714f2d1","skill_md_path":"skills/delayed-command/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/delayed-command"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"delayed-command","description":"This skill should be used when the user asks to \"run npm test after 30 minutes\", \"git commit after 1 hour\", \"wait 2h then deploy\", \"sleep 45m and run build\", \"after 10m run prettier\", or provides a duration followed by a shell command to execute later."},"skills_sh_url":"https://skills.sh/PaulRBerg/agent-skills/delayed-command"},"updatedAt":"2026-04-22T00:56:18.133Z"}}