Skip to main content
Your AI advertising manager in Codex CLI. The performance marketing agent runs as a Codex agent config with 5 dedicated skills and safety rules that prevent direct API calls to ad platforms.

How It Works

Codex CLI uses a plan-execute-verify loop: it explains its plan, you approve, it executes, then verifies results. When your task involves advertising, Codex loads the Adspirer agent config and skills to follow proven workflows.

What Makes Codex Different

Codex has some unique characteristics compared to Claude Code and Cursor:
  1. AGENTS.md — Codex uses AGENTS.md (not CLAUDE.md or BRAND.md) for persistent context
  2. No memory file — Codex doesn’t support cross-session memory like Claude Code and Cursor
  3. No web researchWebSearch and WebFetch are not available, so competitive research is done through ad platform data only
  4. Safety rules.rules files that block direct API calls to ad platforms, ensuring everything goes through Adspirer’s authenticated pipeline
  5. Dollar-sign commands — Skills are invoked with $adspirer-* syntax

What Gets Installed

The one-command installer sets up everything:
ComponentFilePurpose
MCP Server~/.codex/config.toml100+ advertising tools via OAuth
Agent config~/.codex/agents/performance-marketing-agent.tomlAgent prompt and behavior
5 Skills~/.agents/skills/adspirer-*/SKILL.mdWorkflow instructions per task type
Safety rulesrules/campaign-safety.rulesBlock direct ad platform API calls

The 5 Skills

Codex uses the same Agent Skills standard as Claude Code. Each skill is a SKILL.md file with YAML frontmatter and workflow instructions.
SkillCommandWhat It Does
Ad Campaign Management$adspirer-adsFull campaign management — all platforms, all workflows
Setup$adspirer-setupBootstrap a brand workspace
Performance Review$adspirer-performance-reviewCross-platform performance scorecard
Write Ad Copy$adspirer-write-ad-copyBrand-voice ad copy from real data
Wasted Spend$adspirer-wasted-spendFind and fix wasted ad spend

How Skills Work in Codex

  1. Codex discovers skills from ~/.agents/skills/ automatically
  2. Progressive disclosure: metadata loads first, full SKILL.md loads when the skill is needed
  3. Invoke explicitly with $adspirer-* or let Codex match automatically from your description
  4. Skills use generic verbs (“Search”, “Crawl”) instead of tool-specific names since Codex doesn’t have WebSearch/WebFetch

Run a performance review across all connected platforms.

Sign up for Adspirer — free to start

15 free tool calls/month. No credit card required. Connect your ad accounts in 2 minutes.

Codex-Specific Adaptations

The Codex versions of Adspirer skills are adapted from the same source templates as Claude Code and Cursor, with these differences:
FeatureClaude Code / CursorCodex
Context fileCLAUDE.md / BRAND.mdAGENTS.md
Web researchWebFetch / WebSearchNot available — uses ad platform data only
MemoryMEMORY.mdNot available
Auth troubleshootingReconnect via settingscodex mcp login adspirer

Safety Rules

Codex uses .rules files to enforce safety at a deeper level than skills. The campaign-safety.rules file blocks direct API calls to ad platforms:
prefix_rule(
    pattern = ["curl", "https://ads.google.com"],
    decision = "forbidden",
    justification = "Google Ads API calls must go through Adspirer MCP"
)
This ensures all ad platform operations go through Adspirer’s authenticated, auditable pipeline — never through raw API calls or curl commands.

Full Safety Stack

RuleHow It Works
User confirmation for spendAgent asks before creating campaigns or changing budgets
Campaigns created PAUSEDAll create_* tools default to PAUSED status
Read-before-writeConnection check → research → validate → create
Never retry on errorReports errors instead of retrying campaign creation
Direct API blocked.rules files block curl to ad platform APIs
Post-creation verificationVerifies ad groups, keywords, ads after creation
Build integrity checkFlags campaigns with zero ads or zero keywords before optimization

Context Files

Codex uses two persistent files (no memory file).

AGENTS.md — Brand Context

Created by $adspirer-setup. This is Codex’s equivalent of CLAUDE.md (Claude Code) and BRAND.md (Cursor). Codex uses a hierarchical AGENTS.md loading system:
  1. Global: ~/.codex/AGENTS.md (applies to all projects)
  2. Project: Walks from git root to current directory, merging each level
  3. Maximum combined size: 32 KiB
SectionWhat It Contains
Brand OverviewWhat you sell, who you sell to, industry
Brand VoiceTone, language style, prohibited words
Active PlatformsConnected platforms and campaign counts
Budget & GuardrailsMonthly budget, CPC caps, CPA targets
Performance SnapshotLast 30 days from Adspirer

STRATEGY.md — Strategic Decisions

Same as Claude Code and Cursor. Persists directives across sessions:
### Google Ads
AVOID: broad match "plumbing services" — competitor-dominated, $12+ CPC
PREFER: exact match "emergency plumber [city]" — high intent, $4-6 CPC
Since Codex doesn’t have a memory file, STRATEGY.md and AGENTS.md are the primary ways to persist context across sessions. Put anything you want the agent to remember in these files.

The Agent Loop

When you invoke $adspirer-performance-review in Codex:
1

Skill loads

Codex discovers and loads the performance review skill via progressive disclosure.
2

Context loads

Reads AGENTS.md for brand context and KPI targets. Reads STRATEGY.md for active directives.
3

Connections check

Calls get_connections_status to identify connected ad platforms.
4

Data pull

For each connected platform, calls performance tools via Adspirer MCP.
5

Strategy check

Compares campaign data against STRATEGY.md. Flags “Strategy Drift” items.
6

Results

Presents a unified scorecard with recommendations and top 3 actions.

Approval Modes

Codex has 3 approval modes that affect how the agent interacts:
ModeFile AccessTool CallsBest For
Read-onlyRead onlyApproval neededReviewing performance, auditing spend
Auto (default)Read + edit in working dirAuto-approved in scopeCampaign creation, keyword management
Full AccessRead anywhere + networkAuto-approvedBulk operations across accounts
For advertising tasks, Auto mode works well — you get automatic approvals for read operations and prompted for spend-affecting actions.

Comparison with Other Clients

FeatureCodexClaude CodeCursor
Agent typeAgent configSubagentSubagent
Brand context fileAGENTS.mdCLAUDE.mdBRAND.md
Skills5 separate1 comprehensive5 separate
Commands$adspirer-*/adspirer:*/adspirer-*
MemoryNot availableMEMORY.mdMEMORY.md
RulesSafety rules (.rules)Cursor Rules (.mdc)
Web researchNot availableWebSearch + WebFetchWebSearch + WebFetch
Direct API blockingYes (.rules)NoNo

FAQ

Codex CLI doesn’t support a persistent memory file like Claude Code’s MEMORY.md. Use AGENTS.md and STRATEGY.md to persist important context. The agent will record decisions and findings in STRATEGY.md when you confirm them.
The Codex agent can’t crawl websites or search the web. It relies on Adspirer’s ad platform data (search terms, keyword volumes, campaign performance, benchmarks) for insights. For competitive research, use Claude Code or Cursor instead.
Codex .rules files block specific command patterns. Adspirer’s campaign-safety.rules prevents direct curl or API calls to Google Ads, Meta, LinkedIn, and TikTok APIs. This ensures all operations go through Adspirer’s authenticated pipeline with proper OAuth, audit logging, and safety checks.
Yes. Codex CLI can expose itself as an MCP server for the OpenAI Agents SDK. This means you can build higher-level agents that delegate advertising tasks to Codex + Adspirer. See the Codex Agents SDK guide.
Last modified on March 4, 2026