Skip to content
Agentmart
Submit a tool

cross-platform-shell-delay-sleep-wait

How to pause/sleep in shell commands on macOS, Linux, and Windows — use this when the agent needs to wait before running the next command.

Skill by mindstone

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mindstone-cross-platform-shell-delay-sleep-wait

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

How to pause/sleep in shell commands on macOS, Linux, and Windows — use this when the agent needs to wait before running the next command.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/cross-platform-shell-delay-sleep-wait

What's inside

Skill name
cross-platform-shell-delay-sleep-wait
Description
How to pause/sleep in shell commands on macOS, Linux, and Windows — use this when the agent needs to wait before running the next command.
License
MIT
Instructions
68 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Cross-Platform Shell Delay

When the agent needs to wait for a period of time (e.g., waiting for a port to release, a process to exit, or a file to become available), use the correct delay command for the user's platform.

## Platform Commands

| Platform | Command | Notes |
|----------|---------|-------|
| macOS / Linux | `sleep <seconds>` | POSIX standard; supports decimals (`sleep 0.5`) |
| Windows (cmd.exe) | `timeout /t <seconds> /nobreak` | Built-in; `/nobreak` prevents user from skipping |
| Windows (PowerShell) | `Start-Sleep -Seconds <seconds>` | Native cmdlet; also supports `-Milliseconds` |

## In Chained Commands

Use `&&` to chain a delay before the next command:

**macOS / Linux:**
```bash
sleep 2 && npm run dev
```

**Windows (cmd.exe):**
```cmd
timeout /t 2 /nobreak && npm run dev
```

**Windows (PowerShell):**
```powershell
Start-Sleep -Seconds 2; npm run dev
```

## In Node.js (Cross-Platform)

When Node.js is available (always true in this Electron project), this works on all platforms:

```bash
node -e "setTimeout(() => {}, 5000)"
```

Or inline before another command (use `&&` on macOS/Linux/cmd, `;` in PowerShell):

```bash
node -e "setTimeout(() => process.exit(), 2000)" && npm run dev
```

## In Application Code (TypeScript)

The codebase already uses a standard pattern for async delays:

```typescript
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

await sleep(2000);
```

See `src/main/services/demoModeService.ts` for the canonical example of platform-branching with `process.platform`.

## Platform Detection

Branch on `process.platform` when spawning shell commands:

```typescript
const delay = process.platform === 'win32'
  ? 'timeout /t 2 /nobreak &&'
  : 'sleep 2 &&';
```

From mindstone/rebel-system, MIT.

More from mindstone/rebel-system

Signals

Stars
0
Forks
1
Open issues
0
Last commit (this folder)
Jun 19, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mindstone

Cite this page

cross-platform-shell-delay-sleep-wait skill. Agent Mart. https://agentmart.dev/skills/mindstone-cross-platform-shell-delay-sleep-wait (last updated 2026-10-24)