Getting Started with Codex
Codex is OpenAI's AI coding agent that works alongside you in your development workflow. It connects to your codebase via CLI, letting you describe tasks in natural language, then it writes or edits code, runs commands, and helps with debugging and reviews.
1. Install Codex CLI
Install Codex CLI globally via npm or Homebrew:
Verify the installation:
codex --version
2. Install the Salesforce CLI & Connect Your Org
Verify the installation:
Run this command:
sf --version
Expected output: @salesforce/cli/
Authenticate Your Org (No Browser Required)
Copy the command below and run it in your terminal to authenticate the Salesforce CLI with your org:
Verify your org connection:
Run this command:
sf org display user
Expected output: Your org username and alias
3. Install Salesforce Skills & Start Building
Choose a skills library to install. Each provides Salesforce development knowledge via the Agent Skills open standard. Compare all options.
Start Building
Copy and paste this prompt into Codex. Optionally enter a project and agent name below; if you leave it blank, the prompt uses "ExampleName".
What Happens Next
After you paste the prompt, Codex will use the installed agentforce-adlc skills:
- Discover: Retrieve your agent, parse subagents and actions, validate targets exist in the org
- Scaffold: Generate real backing actions (Flows/Apex) for every subagent, no stubs or mocks
- Deploy: Validate bundle, deploy metadata, publish and activate the agent
- Test & Optimize: Run evaluation tests, analyze traces, fix issues, and iterate until quality is good
Tips
- Be specific about scope: "Handle order status and returns" beats "Customer support"
- Say what it should NOT do: "Does NOT handle billing questions or account changes"
- Mention verification needs: "Verify identity before showing account details"
- Include state tracking: "Track the order number across conversation turns so the customer doesn't have to repeat it"