Compose Long Hermes Prompts in an External Editor

Complex requests are easier to review in a real editor. In the Hermes CLI, Ctrl+G opens the current input buffer in $EDITOR; Ctrl+X Ctrl+E provides the equivalent Emacs-style binding. Saving and closing the editor sends the result as the next prompt.

The /prompt command, aliased as /compose, opens a Markdown editor for the next prompt. This is a CLI-only workflow suited to multiline instructions, structured acceptance criteria, and formatting-sensitive content.

Prepare the editor path

Choose an editor command that returns control only after the file closes. Graphical editors may require a wait flag. Test the integration with non-sensitive text before relying on it for an important task. Review the final content in the editor because saving and quitting can submit it immediately.

Composition checklist

  • $EDITOR points to a trusted local editor command.
  • The editor waits until the draft is closed.
  • The prompt states goal, scope, constraints, and verification.
  • File paths and URLs are explicit.
  • No secrets are pasted into the temporary draft.
  • The final Markdown is reviewed before save-and-exit.

Common pitfalls

  • Using a graphical editor without a wait option. Hermes may regain control before editing is complete.
  • Assuming the editor creates durable project documentation. The temporary prompt is still input, not a saved project file.
  • Closing accidentally after partial edits. Know whether your editor saves on close.
  • Expecting the shortcut on messaging platforms. External-editor composition is a local CLI feature.

Verification

Open a three-section test prompt, save it, and confirm Hermes receives the exact line breaks and Markdown. Repeat with a canceled edit if the editor supports it, then verify no partial prompt was sent. Check the configured editor command directly rather than assuming shell startup files were loaded.

Official references: Hermes CLI guide and slash commands.