cursorlisted
Install: claude install-skill tony/ai-workflow-plugins
# Cursor Agent CLI Skill
Run a prompt through Cursor's `agent` CLI directly. There is no fallback — the `agent` binary must be installed.
Use `$ARGUMENTS` as the user's prompt. If `$ARGUMENTS` is empty, ask the user what they want to run.
Parse `$ARGUMENTS` case-insensitively for timeout triggers and strip matched triggers from the prompt text.
| Trigger | Effect |
|---------|--------|
| `timeout:<seconds>` | Override default timeout |
| `timeout:none` | Disable timeout |
| `mode:plan` | Request plan-only output (no execution) |
Default timeout: 600 seconds.
## Step 1: Detect CLI
```bash
command -v agent >/dev/null 2>&1 && echo "agent:available" || echo "agent:missing"
```
If `agent` is not found, report unavailable and stop.
## Step 2: Detect Timeout Command
```bash
command -v timeout >/dev/null 2>&1 && echo "timeout:available" || { command -v gtimeout >/dev/null 2>&1 && echo "gtimeout:available" || echo "timeout:none"; }
```
If no timeout command is available, omit the prefix entirely. When `timeout:none` is specified, also omit `<timeout_cmd>` and `<timeout_seconds>` entirely — run external commands without any timeout prefix.
## Step 3: Write Prompt
```bash
TMPFILE=$(mktemp /tmp/mc-prompt-XXXXXX.txt)
```
Write the prompt content to the temp file using `printf '%s'`.
If `mode:plan` was detected, prepend this preamble to the prompt content:
> IMPORTANT: Produce a detailed implementation plan for this task. Analyze
> the codebase, identify files to modify, de