Skip to main content
Prompt buttons let you embed an instruction set directly into a button. When the button is pressed, the JSON output includes a prompt field that the calling agent can read and act on. You can use --prompt in two ways: as a standalone button that contains only instructions, or as a modifier on an existing code or HTTP button.

Standalone prompt button

A standalone prompt button has no code to execute. It just carries an instruction. Use this to encode a task, a decision procedure, or an analysis request that an agent should carry out itself.
A standalone prompt button runs no code. Pressing it validates the declared args, then returns the instruction verbatim — the prompt is not templated, so ${arg}/BUTTONS_ARG_* substitution does not happen here. The instruction text lands in both the prompt and stdout fields, and the args you passed are echoed back under args, so the caller can hand the whole thing straight to an LLM:

Prompt as a modifier

Add --prompt to a code or HTTP button to attach supplementary instructions alongside the execution result. The code runs first, then the result and the prompt are both present in the output.
Press:
The agent receives both the raw output and the instruction in a single structured response.

Updating prompt instructions

The prompt lives at ~/.buttons/buttons/<name>/AGENTS.md — the AGENTS.md convention agents look for (a legacy singular AGENT.md is still read if present, but every write goes to AGENTS.md). Edit it directly, or recreate the button:
Store your prompt text in a file and pipe it in for longer instructions:
  • Code buttons — add code execution alongside a prompt
  • Arguments — typed args validated at press time and echoed in the result (and, on code/HTTP buttons, available as BUTTONS_ARG_*)
  • JSON output — reading prompt programmatically