walid@portfolio:~/lab/codex-cli-content-pipeline$
cd../lab
05ideaAug 2026

Codex CLI as a content pipeline, not a coding tool

One product photo in the terminal, listing images and ad videos out as files

What a coding agent is actually good at — read a goal, break it into steps, run tools, keep files organised — is the same shape as producing a launch campaign. This wires generation skills into Codex CLI so a single photo becomes listing images, UGC ads, commercials and thumbnails on disk.

Codex CLIAgent skillsGenerative mediaTerminalWorkflow
Before you start

Why a coding agent is the right shape for this

Most people meet Codex CLI as a coding tool. It is also one of the fastest ways to run a content pipeline, because the thing a coding agent is genuinely good at — reading a goal, breaking it into steps, running tools, keeping files organised — is the same shape as producing a launch campaign.

Two pieces make it work. The CLI is the agent: it plans the job and runs the tools. The skills are the craft — instead of you explaining how a UGC ad differs from a cinematic commercial, or which model handles product photography, the skills already encode those workflows. You give the goal, the agent picks the skill.

i
Why the skills route rather than the MCP connector

Both reach the same account and the same credits. The skills path is built for coding agents specifically — each skill has a fixed structure, which cuts token overhead and makes output consistent run to run. The MCP connector suits chat better, where you want the model choosing parameters freely from context.

Step 1

Install and authenticate

The whole setup takes about five minutes. Read the permissions before approving — the CLI wants access to generated content, uploaded media, workspaces, plan and credits, so it can submit jobs and pull results back.

install.sh8 lines
# install the CLI
npm i -g @higgsfield/cli

# or with the install script
curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh

# authenticate — opens a browser, no API key involved
higgsfield auth login
Step 2

Add the skills

Auto-detection covers Codex, Claude Code, Cursor and others.

skills.sh10 lines
# the installer auto-detects your agent and writes each
# skill to the right path
npx skills add higgsfield-ai/skills

# if it detects the wrong one, force it
npx skills add higgsfield-ai/skills -a codex

# scripted setups only: -g installs globally for the current
# user, -y skips the confirmations. Use them once you already
# know where the skills land — the interactive run prints the paths.
Step 3

Run it

run.txt5 lines
# call a skill directly from inside Codex
/higgsfield:generate

# or just describe the outcome in plain language
# and let the agent pick the skill itself
i
Work in a dedicated project folder

This matters more than it looks. The agent creates campaign directories, saves outputs and writes tracking files there, and that only compounds if it finds the same folder next time. A pipeline is a folder with history in it, not a chat thread.

When it misbehaves

Two things worth knowing up front

SymptomThe fix
Reference images ignoredRe-run npx skills add. Earlier CLI versions had a bug passing references through; current ones pass all of them, images included.
Wrong agent detectedPass -a codex explicitly rather than letting auto-detection choose.
!
Generation costs credits either way

Whichever route you take, generation draws on your plan credits — and unlimited models and free generations do not apply to CLI or MCP usage. Worth knowing before you point a batch job at it.

← previous
Ten repos to check before you pay for a tool
next →
Two repos worth cloning before building an agent
← all experiments