{
  "schemaVersion": "1",
  "revision": "22ce5d34dbcb5a78",
  "id": "factory-tools-prompt-tooling",
  "slug": "tools-prompt-tooling",
  "title": "Prompt composing (prompt-builder)",
  "summary": "Tool roles, alternatives, selection tradeoffs, and compatibility caveats.",
  "category": "Tools",
  "tags": [
    "tools",
    "prompt-tooling"
  ],
  "sources": [
    {
      "label": "Tool comparison reference",
      "url": "https://dewy-sleet-n5zs.here.now/#prompt-tooling"
    }
  ],
  "sourceUnits": [
    "resources/index.html#prompt-tooling"
  ],
  "collection": "factory",
  "categoryId": "tools",
  "wordCount": 366,
  "url": "/topics/factory-tools-prompt-tooling/",
  "markdownUrl": "/markdown/factory-tools-prompt-tooling.md?raw=1&v=22ce5d34dbcb5a78",
  "jsonUrl": "/api/v1/documents/factory-tools-prompt-tooling.json",
  "headings": [
    {
      "id": "prompt-composing-prompt-builder",
      "text": "Prompt composing (prompt-builder)",
      "level": 2
    },
    {
      "id": "pick-this-if",
      "text": "Pick this if…",
      "level": 3
    }
  ],
  "markdown": "# Prompt composing (prompt-builder)\n\nTool roles, alternatives, selection tradeoffs, and compatibility caveats.\n\n## Prompt composing (prompt-builder)\n\n**John uses:** [prompt-builder](https://github.com/johnlindquist/prompt-builder) (`p`, MIT) — a Rust/Ratatui TUI that gives the prompt its own tool before any agent launches: skills lookup (`$`), file search (`@`), cross-session history (`Ctrl+R`, shared with Codex's history.jsonl), then launches pi/Codex/Claude via `targets.toml` — or hands the prompt as the final argv element to *any* command (`--handoff-command`), which is the bridge to mdflow.\n\nNothing public replicates this exact \"compose-then-launch-any-agent\" TUI; these cover its axes:\n\n| Alternative | What it is | How it differs | License |\n|----|----|----|----|\n| [fabric](https://github.com/danielmiessler/Fabric) | Open-source framework with a crowdsourced library of reusable AI prompts ('patterns') runnable from the CLI | Curated prompt library + pipe-friendly CLI rather than an interactive composer; patterns ≈ reusable prompt shapes | MIT |\n| [llm (Simon Willison)](https://github.com/simonw/llm) | CLI for any LLM with reusable templates, fragments, logged history in SQLite | Templates + logged/searchable prompt history covers prompt-builder's reuse and history axes, minus the TUI and agent handoff | Apache-2.0 |\n| [aichat](https://github.com/sigoden/aichat) | All-in-one LLM CLI: Shell Assistant, chat REPL, roles, sessions, RAG, macros | Roles/sessions give reusable prompt setups; REPL-centric rather than compose-then-launch; check current repository activity | Apache-2.0 |\n| [espanso](https://github.com/espanso/espanso) | Privacy-first cross-platform text expander in Rust | System-wide snippet expansion — the low-tech way to get instant prompt scaffolds in ANY agent's input box | GPL-3.0 |\n| [promptfoo](https://github.com/promptfoo/promptfoo) | Test/eval harness for prompts, agents, and RAGs with declarative configs | Adjacent, not a composer: it evaluates prompt variants — pairs well with a this-or-that habit | MIT |\n\n### Pick this if…\n\n- **fabric** — you want a library of proven prompt shapes runnable from the shell.\n- **llm** — you want reusable templates plus searchable prompt history (the SQLite log is the killer feature).\n- **espanso** — you just want instant prompt scaffolds in *any* input box, agents included.\n- **aichat** — you want roles/sessions in a REPL rather than compose-then-launch.\n- **promptfoo** — you're past composing and want to *measure* prompt variants.\n- Or steal the pattern cheaply: a zsh function + `$EDITOR` tempfile + `\"$(cat file)\"` into your agent is 70% of `p`."
}
