Skip to main content

cross-platform-timeout

Run a command with a time limit in a cross-platform way. Do not rely on GNU timeout (coreutils)—it is not default on macOS. Use when agents may run on macOS or when timeout 10s npm run dev fails.

来源信息

仓库
pmarashian/cursor-agent-skills
最近来源活动
2026年2月13日 19:51
检测到的 SKILL.md 语言
英语
星标
2
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
cross-platform-timeout
description
Run a command with a time limit in a cross-platform way. Do not rely on GNU timeout (coreutils)—it is not default on macOS. Use when agents may run on macOS or when timeout 10s npm run dev fails.
# Cross-Platform "Run with Timeout" **Do not use `timeout`** (GNU coreutils) when agents may run on macOS—it is not installed by default. ## Options - **macOS / BSD**: `(cmd &); sleep N; kill $!` — run command in background, sleep N seconds, then kill the background job. - **Alternative**: Small Node script that spawns the command and kills it after N seconds. ## When to Use - When a task uses something like `timeout 10s npm run dev` and it fails on macOS. - Prefer documenting one cross-platform pattern rather than retrying with `timeout` repeatedly. ## Keep It Short This skill should stay a few lines; the main point is "do not use `timeout` unless the environment is known to provide it."
在 GitHub 查看