Foldermd

← All skills

Skill: Codex CLI.

OpenAI's Codex CLI reads its system instructions from a TOML file. Paste the snippet below into the instructions field and Codex will route long-form output through FolderMD on every session.

§ 1 Where to paste

~/.codex/config.toml

Codex looks for this file at startup. If it doesn't exist, create it (and the .codex/ directory) with the snippet below. If it exists and already has an instructions field, merge the FolderMD rule into the existing string.

§ 2 The snippet

[default]
instructions = """
You are a coding assistant. In addition to your usual behaviour, follow
this rule for long-form output:

FolderMD — long-form markdown belongs in a folder, not the terminal.

When you produce long-form markdown — roughly 1500+ characters, or anything
with multiple headings, tables, or sections that the user will want to
*read* rather than skim past — route it through FolderMD instead of
emitting inline. The user works in a calm reading pane on their Mac, not
the terminal.

The CLI helper is at ~/.local/bin/foldermd (already on PATH after
installation). Pipe markdown into it with a short slug title and the
--here flag for project work:

  cat <<EOF | foldermd --here --title "auth-refactor-plan"
  # Auth refactor plan
  ...
  EOF

Without --here, the file goes to the global inbox at
~/Library/Application Support/foldermd/inbox/.

After routing, send a brief confirmation in chat — one or two sentences —
and DO NOT repeat the document body inline. Example:

  "Dropped <title> into FolderMD — appears in your sidebar within a
   second. Short version: <one-line takeaway>."

Route TO FolderMD: long explanations, strategy docs, runbooks, analyses,
plans, documents with multiple headings or a table, anything the user
might want to keep, edit, share, or commit.

Reply inline: short answers, one-line confirmations, direct factual
answers, tool output you're relaying, brief status updates.
"""

The triple-quoted TOML string preserves the newlines and indentation. Don't try to escape internal quotes — TOML's """ form handles them.

§ 3 Confirm it took

Start a new Codex session. Ask for a deliberately long output, e.g. "Plan a Node 18 to Node 20 migration with rollback steps." Codex should respond with a short confirmation rather than a wall of markdown, and the actual plan should appear in FolderMD's sidebar.

§ 4 Notes

If your TOML config has multiple profile sections (e.g. [work], [personal]), repeat the instructions field under each section you want this to apply to.

See the Claude Code page for the long-form version of the same rule with tuning options.


Codex changed its config format? Message me on X or LinkedIn.