Skip to content
Back to skills

Cactus

ASecurity

Ask the human without stopping work. Use cactus instead of AskUserQuestion whenever a question can be posted now and collected later, whenever several decisions belong to one thread, whenever you are announcing what you will do anyway and only need a veto, whenever a command needs approval, or whenever a verify block or an ordered checklist should stay on the human's board across sessions. Triggers on "cactus", "ask the human", "park this question", "put it on the board", "I need a decision b...

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 5, 2026
ai-agentsgoshellbashsqlgitapidatabase

Works with

  • claude code
  • claude desktop
  • cursor
  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add eighteyes/cactus --skill cactus --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cactus?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cactus
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eighteyes-cactus-cactus/badge)](https://www.skillsdirectory.com/skills/eighteyes-cactus-cactus)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cactus
description: Ask the human without stopping work. Use cactus instead of AskUserQuestion whenever a question can be posted now and collected later, whenever several decisions belong to one thread, whenever you are announcing what you will do anyway and only need a veto, whenever a command needs approval, or whenever a verify block or an ordered checklist should stay on the human's board across sessions. Triggers on "cactus", "ask the human", "park this question", "put it on the board", "I need a decision but keep going". Do NOT use for a question whose answer you need before the next keystroke and that has no sensible default; that is AskUserQuestion.
---

# cactus — the durable inbox between you and the human

## Choose your runtime instructions

This file is the shared Cactus workflow. Read the instructions for the host
running you:

- [Claude Code](CLAUDE.md) — Claude plugin hooks and Herdr identity.
- [Codex](CODEX.md) — Codex plugin hooks and the Codex session identity.
- [Grok](GROK.md) — webhook wake-up.
- [Claude Desktop and other MCP hosts](DESKTOP.md) — the verbs are
  `cactus_*` tools, and answers are read at the fork.

The host-specific file changes only identity and wake-up mechanics. The row
semantics, authoring rules, and ownership rules below apply everywhere.

cactus is a SQLite inbox. You post a row, get a key back, and keep working. The
human answers in `cactus --tui` on their own schedule, from any project, and you
read the answer when you reach the fork. Rows survive the session, so the next
agent in this repository sees them too.

Full syntax lives in the tool, not here. Read it once per session before any
unfamiliar verb:

    cactus --agent-help

## Preflight

    command -v cactus >/dev/null && cactus where

`cactus where` prints the project the row will be filed under. Agent verbs see
only that project; if it is wrong, `cd` before asking.

## Workflow, required

    1  ask       post every decision the human makes here, not in chat;
                 --recommend LABEL --confidence L when you have a pick, else
                 --no-recommend, --situation (what is going on, why now) and
                 --if-skipped (what you do with no answer) on every ask, each
                 -c as "LABEL: what happens, what it costs", -f
                 for every file the question is about, --agent on every row;
                 the project has .ai/refs.json? --refs KEY[,KEY] for every
                 ref the question rests on, and leave what they hold out of
                 --context
    2  wait      a blocking ask (ask, run) waits for the human by default.
                 Post it as ONE backgrounded command (Bash run_in_background);
                 it waits, and its exit is your wake-up. No monitor.
    3  work      do everything the answer does not block while it waits
    4  inspect   on wake, `cactus get` the row (the background output holds
                 the answer); the next-turn frontier lists the rest
    5  clear     your own rows, by key, once acted on

`steer`, `notify`, `review`, `plan` and `data` never wait. `--no-wait` posts a
blocking row and returns at once; `--no-block` makes the row non-blocking.
A foreground `cactus ask`/`run` that would wait is refused by the plugin's
PreToolUse hook: rerun it with `run_in_background: true`.
A cactus post wrapped in a pipe, `&&`, `;`, `$( )` or a variable is refused
before it runs: post with one plain call per Bash command. To post several
questions in one call see "Several questions in one call" under Batching.

## Blocked by a permission prompt

Do not stop and do not ask in chat. In Claude Code auto mode the plugin's
`PermissionDenied` hook has already posted the denied command as a `cactus run`
row in thread `denied`. Do not post it again: a second row is a second
approval, and the second run fails. Find the hook's row and wait on it with
one backgrounded call; its exit wakes you:

    cactus list -s open -t denied --agent "$AGENT"
    cactus get KEY --wait --agent "$AGENT" --json

A denied command that itself posts to cactus (`ask`, `run`, `plan`, `review`,
`edit`) gets no row: re-post it as plain cactus calls, one per Bash command, no
pipes, `&&`, `;`, `$( )` or variables, and read a key from the call's own
output.

Post the row yourself only when no `denied` row holds the command (a host
without the hook, or a prompt the hook did not see), also backgrounded:

    cactus run "pnpm exec playwright install" --agent "$AGENT" --why "Download the browsers the tests drive. Denied in auto mode."

A command with quotes or more than one line goes through `cactus run -` with a
quoted heredoc. `-` reads the command from stdin verbatim, so nothing needs
escaping and the human reads it as written:

    cactus run - --agent "$AGENT" --why "Seed the staging table. Needed before the demo." <<'EOF'
    psql "$DB" -c "INSERT INTO t VALUES ('it''s fine')"
    EOF

`--why` becomes the row's context. Always pass it: what the command does, in
plain words, then why. The human approves or denies it from the
TUI; the wait exits with the answer, `approve` or `deny`. On approve, re-read
the row: `cactus get KEY --json | jq '.[0].result'`. A non-null `result`
means the TUI already ran it (exit code, a 50-line tail, a log path); act on
that. A null `result` after `approve` means the human approved from the CLI
and you run it yourself. Never run it before `approve`.

## Identity

`cactus ask` refuses a row without `--agent`. The session-start hook prints
the value to pass, resolved through herdr when the session runs in one. Outside
herdr, choose one stable value for the session and use it on every ask and
clear. A bare pane id is not an identity: it outlives the session and the next
occupant inherits your rows.

Clears are scoped by owner. `--thread`, `--here` and `--all` clear only rows
posted under the `--agent` you pass; another agent's key is refused; a row with
no owner clears by explicit key only.

## When cactus, when AskUserQuestion

    AskUserQuestion   the answer gates the next action and no default is safe
    cactus ask        the answer gates a later action; post now, work until then
    cactus steer      no gate: say what you will do, proceed, let a tap redirect
    cactus run        a command needs a yes before it runs
    cactus review     a verify block the human re-checks as the work changes
    cactus plan       an ordered checklist both sides tick
    cactus notify     an FYI the human dismisses; no answer expected
    cactus data       chunks the human copies; each copy is a verdict

There is no fork act. A fork in the conversation is an `ask` with 3-5
`-c` directions, the recommend marked (a 2-choice row is a confirm, post it `--confirm`), and it becomes a `steer` with `--chosen` the
moment one direction is the sensible default.

Parking the human on a question you could have answered yourself is the failure
mode. It is measured: `cursor.blocked` in `cactus feed` counts open blocking
rows per agent, for rows posted with `--agent`. Reach for `steer` first, `ask`
when proceeding under any assumption would waste the work, a waiting ask only
when the very next step depends on it; otherwise post it `--no-wait`.

## Batching

Post every question you can see now, under one thread, with `--no-wait`. Follow
up in the same thread with `-p KEY` when an answer opens a new question. A set
of taps is cheaper for the human than a drip of interrupts across an afternoon.

When work blocks on the batch, wait on all of it with one backgrounded call;
it exits once every key has settled (a blocking row leaves `open`; a
review/plan/data/steer/notify row gets a new verdict, tap, or clear), and that
exit is your wake-up:

    cactus get q7 q8 q9 --wait --agent "$AGENT" --json

Otherwise leave the batch to the next-turn frontier.

### Several questions in one call

`cactus ask` posts several questions in one call. It checks every question
first and posts all or none; the keys print one per line, in order. Flags
given once (`--agent`, `-t`, `-p`, the wait flags) apply to all.

Use `--next` for two or three short questions. Each question after it takes
its own flags:

    cactus ask "First question?" --agent "$AGENT" -t topic --no-wait \
      --situation "..." -c "a: ..." -c "b: ..." --recommend a --confidence med --if-skipped "..." \
      --next "Second question?" --situation "..." -c "x: ..." -c "y: ..." --no-recommend --if-skipped "..."

Use JSON when text holds quotes, `$` or line breaks, or there are many
questions. A quoted heredoc needs no shell escaping. Field names are the long
flag names with underscores; `defaults` apply to every question; `@1` names
the first question of the batch as a parent or edge target:

    cactus ask --batch - --agent "$AGENT" --no-wait <<'EOF'
    {"defaults": {"thread": "topic", "situation": "..."},
     "questions": [
       {"text": "First question?", "choices": ["a: ...", "b: ..."], "recommend": "a", "confidence": "med", "if_skipped": "..."},
       {"text": "Second question?", "choices": ["x: ...", "y: ..."], "no_recommend": true, "if_skipped": "...", "parent": "@1"}
     ]}
    EOF

`cactus ask --batch FILE` reads the same JSON from a file. Both forms are one
plain call, so the pipe/`&&` refusal does not apply. `cactus --agent-help`
documents both.

## Authoring a row

Options are mile posts: 3-5, mutually exclusive, each one a thing that
actually happens. Never "other". Split each on the first colon, label then
description.

Format the question itself for an 80-column terminal: it may use two or three
rendered lines, but no more. Cactus warns when an ask or edit wraps past three
lines; decompose a larger decision into follow-ups instead. Hard-wrap choice
descriptions at 80 columns.

### Writing the question

The human answers from the card alone and remembers nothing of your session. A
longer card beats a short one that needs outside knowledge.

1. **Situation.** `--situation`: one or two sentences. What is going on, and
   why a decision is needed now. Required on an ask.
2. **If skipped.** `--if-skipped`: what you do if the human gives no answer.
   Required on an ask.
3. **Choices carry their meaning.** Every `-c` is `label: description`: what
   happens if picked, what it costs. Put each `+ ` pro and `- ` con on its own
   line inside the description. Nothing about a choice lives only in
   `--context`. A choice with no description is refused.
4. **Explain names.** Link every id or coined name through `--refs` (the card
   shows its definition), or give it plain words at first use: "the archive
   inventory agent (pane p1)".
   A term agreed in the project glossary (`.ai/gloss/glossary.json`) attaches
   with its meaning by itself; write it exactly as the glossary does.
5. **Context is for extra facts.** Numbers, what you tried, what you ruled
   out. Leave out timestamps, pane ids and status lines unless they change
   which choice is right. Never restate the question, the situation or the
   default there.
6. **Whitespace.** One idea per line or bullet. A blank line between parts.
   No paragraph longer than three lines.
7. **Length is fine.** Add the fact the human would otherwise have to
   remember.
8. **The row outlives your session.** Your session can drop before the
   answer arrives, and another agent then picks the row up with none of your
   memory. Write so that agent can act on the answer from the row alone:
   - each choice says what you will do if it is picked, not only what it means
   - `-f` every file the work lives in: the plan, the spec, the files to change
   - say where the work stands and where it lives: the branch, the worktree,
     the last finished step
   - `--refs` and `-p PARENT` for the decisions this one rests on
   - no "as discussed", "the earlier option", "my draft": name the thing

`cactus ask` refuses an ask row without `--situation` or `--if-skipped`, and a
choice with no description on a row with 2+ choices that is not a confirm.
`steer`, `run`, `notify`, `review`, `plan` and `data` rows are exempt.

Example:

    cactus ask "The archive inventory agent finished. How do I save its work before closing it?" \
      --agent "$AGENT" \
      --situation "The agent that catalogued the archive drive (pane p1) is done. Its folder has no git repository, so nothing it wrote is saved anywhere but disk." \
      -c "lean: Start a repository and commit the scripts and notes.
    + small, quick to clone
    - the 2.7 GB of manifests stay uncommitted" \
      -c "all: Start a repository and commit everything.
    + nothing left out
    - a 2.7 GB first commit" \
      -c "none: Close the agent and leave the files on disk.
    - no history, no backup" \
      --recommend lean --confidence med --why "The manifests can be rebuilt from the drive." \
      --if-skipped "I do lean."

A description may span lines. A line starting `+ ` is a pro, `- ` a con; the
rest is the summary. The card shows them as green and red marks under the choice.

A review's or plan's notes may stay short markdown: `-` bullets, one fact
each, a blank line between blocks, hard-wrapped at 80 columns.

`--recommend` (with `--confidence`) preselects the pick, so enter alone
submits it; the row still waits for the human. `--chosen` on a steer does not
wait: you proceed with it.

`--word SHORT` gives boards a stable label. Set it when a project has many rows
whose text starts the same way.

`-f PATH` attaches a file. Attach every file the question is about: the plan,
spec, diff, config, or draft the human would otherwise have to go find. They
open it from the card with `f` (view) or `F` (edit), or preview it inline
with `o` (a diff vs git HEAD when changed). Repeat for more;
`edit -f` replaces the list. A row about a file with no `-f` is a row the
human answers blind.

While an `ask` row is open, its files are locked: Edit and Write on them are
refused, yours included, until the human answers or you clear the row. Run
rows, steers, reviews and plans lock nothing. Bash writes are not checked.
`CACTUS_LOCK_HOOK=0` turns the lock off.

`--site URL` (http or https) gives the human a `w` key that opens the URL.
`edit --site ""` clears it.

`--reversibility reversible|costly|irreversible` rates how hard acting on the
row is to undo. Set it on every decision that is costly or irreversible to
undo (any row may carry one); your value beats the classifier's guess, which
only fills rows you left unset. Add `--risk s|m|l` (blast radius: s one file,
m a feature or others notice, l data loss, money, prod, public) when the
radius matters. `ask`, `run`, `edit`; `edit --reversibility ""` or
`--risk ""` clears.

`--pr draft|review|changes|ci-fail|ready|merged` tags a row whose work sits in
a pull request; the board badges it and floats it above untagged rows.
`ask`, `run`, `edit`; `edit --pr ""` clears.

### Refs: cite facts, don't restate them

`--refs R12,q23` cites what the question rests on: an entry of
`<project>/.ai/refs.json` (requirements, invariants; the refs tool owns it,
cactus only reads it) or another question. The card shows each ref inline,
always current: a requirement's value (marked `[changed]` or `[removed]` if
it moved since you cited it), a question's text and its answer. Prefer a ref
over prose in `--context` whenever the fact already lives in one.
`ask`, `run`, `edit`; edit replaces the list, `--refs ""` clears.

### Edges: post the next step now, show it later

A question that only matters after another is answered goes up now as
pending, hidden until its parent is answered:

    cactus ask "..." --agent ID --after q9          opens when q9 is answered
    cactus ask "..." --agent ID --after q9=Ship     opens only if q9's answer is Ship
    cactus ask "..." --agent ID --opens q10=A,q11   answered A opens q10; any answer opens q11
    cactus ask "..." --agent ID --closes q12=B      answered B skips q12

LABEL must be one of the parent's choices. Only a human answer fires an edge
(a skip fires the ones with no LABEL), only on ask/steer/run/notify rows;
undo puts released rows back to pending. `cactus list -s pending` shows them.
Requires the Go cactus; `cactus --agent-help` has the full EDGES and REFS text.

## Asking well

Rules from 3,062 answered rows across 50 projects.

- Give 3-5 directions per ask, the recommend marked; a 2-choice row is a
  confirm, post it `--confirm`. The human takes your recommendation 79% of the
  time at 2 options, 67% at 3, 51% at 4+.
- Always recommend, with an honest confidence. High is followed 79%, med 71%,
  low 59%.
- When options can combine, offer "both" or "all", or use `--multi`. The
  human often widens scope.
- Keep progress polls ("when does it land?") and "what did you mean?" off the
  board; those are the real declines. Use chat, `notify`, or `steer`.
- Pick names yourself and post them as a `steer`. Naming is the most-skipped
  topic.
- A text-only review verdict is a fail: fix what it names. Test keys, arrows
  and layout stability yourself before asking for a review.
- A digit typed as free text ("3") means that option.

## Steer: proceed, invite a veto

    cactus ask "Using the staging tenant for the migration dry run" \
      --act steer --chosen staging -t auth --agent "$AGENT" \
      -c "staging: provisioned, disposable" \
      -c "prod-shadow: real data, read only"

Then keep going. Before the irreversible step, re-read the row: a tap on the
other option redirects you.

## Block only when blocked

    cactus ask "Safe to drop the legacy column?" --confirm --agent "$AGENT" --timeout 600 \
      --situation "The column has no readers since the v3 release; the migration is ready." \
      --if-skipped "I keep the column and ship without the migration."

Run it with `run_in_background: true`. It prints the key at once, waits (default
timeout 3600s, `--timeout` overrides), and prints the answer on exit: that exit
is your wake-up. Exit 2 is the timeout: proceed on the default you stated in
`--if-skipped`, do not treat it as an error. A row the human
clears returns exit 0 with status `cleared`, which is a decline: check the
status, not just the exit code.

## Approve a command

    cactus run "alembic upgrade head" --agent "$AGENT" -t ship --why "Apply the pending database migration. The schema is one revision behind." --timeout 900 --json

Run it with `run_in_background: true`; it waits for the verdict and its exit
wakes you. `cactus run` posts the command as the row text, `--why` as its context.
Quotes or several lines: `cactus run -` with a `<<'EOF'` heredoc, as above. The
human sees the command and runs it from the TUI with `R` or `y`, which
records `result` on the row. The verdict labels are `approve` and `deny`.
Read `result` before doing anything: non-null means it already ran, null
after `approve` means run it yourself. `review --run` still attaches a
command to any other row when a verify block needs one.

## Persistent rows: review and plan

Both are born `live`, take a verdict every time the work is re-checked, and stay
on the board until cleared. Post them once at the start of a piece of work and
update them as it moves.

    cactus ask "Does the build verify?" --act review -t ship --agent "$AGENT"
    cactus review q8 --look-at "the diff" --run "pytest -q" --pass "0 failures" --fail "any failure" --then "tag the release"

    cactus ask "Release steps" --act plan -t ship --agent "$AGENT"
    cactus plan q9 --step build --step test --step tag
    cactus plan q9 --done 1          # 1-based at the CLI

The latest verdict is `answer`; the full log is `answers`. Re-read rather than
cache: a human can undo a verdict and the row reads `open` again.

Read a review or plan row with `cactus get KEY --agent "$AGENT"`: that read is
what tells the human you heard the verdict (the card shows `sent`, then
`heard ✓`). After a verdict on your own plan or review row: if the work it tracked is done, close it with `cactus clear KEY --agent "$AGENT"`; if you need another verdict, respond with `cactus plan|review|edit KEY --agent "$AGENT"` (that puts the card back on the human's board); otherwise read it with `cactus get KEY --agent "$AGENT"` and leave it parked. A plan verdict `approve` means go ahead with the plan.

## Data: hand over chunks

Also persistent. Each `-c` is one chunk — SQL, a command, a snippet — label
then body, split on the first colon; the body may be multi-line.

    cactus ask "Backfill queries" --act data -t db --agent "$AGENT" \
      -c "count: SELECT count(*) FROM orders WHERE backfilled IS NULL" \
      -c "run: UPDATE orders SET backfilled = now() WHERE backfilled IS NULL"

In the TUI, a digit copies that chunk to the clipboard; each copy appends a
verdict naming the chunk's label, readable with `cactus get`. `d` retires the
row.

## Collect on the next turn

A backgrounded waiting ask wakes you when it exits, even on an idle session.
Rows posted `--no-wait`, and review/plan rows, come back through the
next-turn frontier, which shows answered, elaborated, and open rows. Use
`cactus get KEY --agent "$AGENT"` before acting on a review or plan verdict.

## Picking up a row whose session dropped

A row can outlive the session that asked it: asked, session drops, the human
answers, and no session is left to hear it. If you are handed such a row (a
key in your prompt, or an `orphan`, `dead` or `inactive` row at session
start), rebuild its context before you act. In order:

1. `cactus get KEY --json`: the question, situation, choices, the answer,
   `if_skipped`, `files`, `refs`, `parent`, `thread`, and the asker's `cwd`.
2. Read every file in `files`. They hold the plan or spec the row is about.
3. `cactus list -t THREAD -s any`: the sibling decisions in the same thread,
   with their answers. Follow `parent` upward the same way.
4. The decision record in `.ai/cactus/` (`qN-ID-*.md`) and any plan folder
   under `.ai/plan/` named in the row.
5. `git log` and `git status` in the row's `cwd`: what the dead session
   finished, and what it left loose.
6. `cactus brief KEY`: a summary rebuilt from the dead session's transcript,
   when one still exists.

Then take the row: `cactus adopt KEY --agent "$AGENT"`. Act on the answer, or
on `if_skipped` when it was skipped. If the steps above do not tell you what
the dead session meant to do with this answer, do not guess: post a new ask
with `-p KEY` that says what is missing.

## Elaborate or decompose: the human wants the question changed

`e` on a row moves it to status `elaborate`. The next-turn frontier and
`cactus get` show its `hint` (what the human typed, or null) and
`instruction` (the hint, else: rewrite plainly, no jargon, add what you
tried, the numbers, what each option costs, what happens if nobody
answers). Rewrite the row in place; the key stays:

    cactus edit q7 --agent "$AGENT" --context "..." [--text "..."] [-c "label: desc"]...

The row returns to `open`; your own `--agent` stream does not echo the
`edited` event back at you (q334). `edit` also works on any open or live row
you own without a request, so fix a typo or add a fact the moment you notice
it. `-c` replaces the choices and drops a `--recommend` that no longer names
one. A human `u` on an elaborate request reads as `withdrawn`: re-read the
row before rewriting.

`D` in the TUI asks for decomposition through the same `elaborate` event.
When its instruction says to decompose, do not edit the original row. Post
each smaller, independently answerable question as a follow-up (`-p q7
--no-wait`) with the same `--agent`; the follow-ups inherit its thread. Once
they are posted, clear the original row with `cactus clear q7 --agent
"$AGENT"`, then wait on the follow-ups as a batch (see Batching).

## Read back

    cactus get q7 --json | jq '.[0]'              get returns a list, one row per key
    cactus list -s answered -t auth --json        a thread's verdicts
    cactus feed --json --here                     the whole actionable inbox, one document

The answer lives under `.answer`, not at the top level: `.answer.selected[]`,
`.answer.text`, `.answer.skipped`, `.answer.created_at`. The top-level `text`
is the question. `skipped` means the human saw it and chose not to decide;
act on your stated default.

Keys are `qN` within the project. Across projects (`--all`) use the row's
`ref`, `LABEL:qN`, which every verb accepts as a key.

## Decision records

Every answer, undo, verdict and clear rewrites one file per row in the
project, so the decision travels with the code. Commit it with the change it
governed.

    .ai/cactus/qN-ID-SLUG.md    decision record, rewritten on each answer, undo, verdict, clear; commit it

Set `CACTUS_RECORDS=0` in a test harness that runs from a real repository, or
the scratch rows write records into it.

## Retire

    cactus clear q7                                retire, keep the transcript
    cactus clear --thread auth --agent "$AGENT"    retire your rows in a thread
    cactus clear --purge q7                        delete

Clear what you have acted on. A stale open row is a question the human answers
for nothing.

## Exit codes

    0  ok      1  error      2  --wait timed out      3  nothing matched

`cactus ask --wait` on a `--no-block` row, `steer`, `notify`, `review`,
`plan`, or `data` is exit 1. `cactus get KEY --wait` on one returns on the next
change: a new verdict, a tap, a clear.

## Webhook owners

Agents that use external webhook delivery need a per-agent webhook wake-up.
Read [GROK.md](GROK.md) for the external-agent recipe and
[WEBHOOK_SETUP.md](WEBHOOK_SETUP.md) for the map, smoke test, and
transport details. Do not set global `CACTUS_POKE` in a normal shell profile:
it overrides Herdr delivery for every agent.

Files in this skill

  • CLAUDE.md1.1 KB
  • CODEX.md2 KB
  • DESKTOP.md3.1 KB
  • GROK.md816 B
  • GROK_SETUP.md394 B
  • SKILL.md15 KB
  • WEBHOOK_SETUP.md8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.