Skip to main content

Build thunks from Claude Code or Codex

Install the Thunk.AI plugins so Claude Code or Codex can build, test and troubleshoot your thunks

You can build, change, test and troubleshoot thunks from an AI coding agent, Claude Code or Codex, as well as in the Thunk.AI app. Describe what you want ("build a thunk that triages support tickets", "why are this thunk's work items failing?") and the agent works on your thunks through your own Thunk.AI account.

This is the opposite direction from publishing your thunk as an MCP server: there, an AI agent calls the tools of a thunk you built; here, an AI agent builds the thunk.

What you install

Thunk.AI publishes two plugins:

  • thunk-prod connects the agent to the Thunk.AI Builder, with tools to create and edit thunks, run and inspect work items, and read the Thunk.AI help center.

  • thunk-builder teaches the agent how to use those tools well: which help articles to read for a task, the order to build a thunk in, and how to test and troubleshoot one.

The agent acts as you. It sees the thunks you can see and can change only what your role allows.

Claude Code

Run these commands in a terminal:

claude plugin marketplace add ThunkAI/thunk-plugins
claude plugin install thunk-prod@thunk-ai

Installing thunk-prod installs thunk-builder too. If a Claude Code session is already open, run /reload-plugins in it.

Then sign in once. In Claude Code, run /mcp, select plugin:thunk-prod:thunk-builder, choose Authenticate, and sign in with your Thunk.AI account.

To pick up new versions, run /plugin marketplace update thunk-ai, or turn on auto-update for thunk-ai under Marketplaces in /plugin.

Codex

Run these commands in a terminal:

codex plugin marketplace add ThunkAI/thunk-plugins
codex plugin add thunk-builder@thunk-ai
codex plugin add thunk-prod@thunk-ai
codex mcp login thunk-prod

Add both plugins: Codex does not install one plugin along with another. The last command signs you in with your Thunk.AI account.

To pick up new versions, run codex plugin marketplace upgrade thunk-ai, then run the two codex plugin add commands again.

In the Codex app, the agent opens a thunk it creates in a panel beside the conversation, so you can watch it being built. It still makes every change through the Builder tools, not by clicking in that panel, unless you ask it to.

Chat apps

Chat apps such as Claude and ChatGPT don't install these plugins. If yours supports custom MCP connectors, add one with the URL https://postern.thunk.ai/api/builder/mcp and sign in with your Thunk.AI account. You get the Builder tools without the thunk-builder guidance.

Tips

  • Start by naming the thunk you mean, or ask the agent to list your thunks.

  • When the agent builds a new thunk, it lays out all the steps first, then tests the thunk on sample work items as soon as it is built. While testing, it uses stand-in (mock) versions of outside systems such as a CRM or email; if your account already has a connection to one, it asks whether to use that instead.

  • After you change a thunk, ask the agent to test the change on sample work items before you use the thunk for real work.

  • When you analyze a thunk that is already in use, ask the agent to work on a copy, so your live thunk is not changed.

Did this answer your question?