Skip to content
LinkedInX

Commands and Workflows - Entry Points for Skills and Automation

Target audience: Developers who want to organize repeated Codex work across commands, skills, and non-interactive automation
Prerequisites: Basic operation of the Codex CLI or Codex app

Codex commands include built-in controls and entry points for reusable or automated work. Separate them by purpose.

Four Entry Points

Entry pointPurposeExample
Built-in commandControl a CLI session or feature/agent, /skills, /plugins
SkillReuse procedures, references, and scripts$docs-content
codex execRun non-interactively from a local script or CIScheduled review, report generation
Codex GitHub ActionRun with bounded permissions in GitHub ActionsPR review, release checks
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Built-in commands control the Codex CLI itself.[1] Put project procedures in Skills, use codex exec for repeatable script execution, and use the Codex GitHub Action for GitHub Actions workflows.[2][3][4]

Design an automation prompt

When the inputs change but the review criteria stay the same, keep the prompt text in the repository and pass it as a codex exec argument or as the GitHub Action’s prompt-file.[3][4]

# Pull request review

Compare this branch with main.
Report bugs, security risks, regressions, and missing tests.
List findings first with file and line references.
Do not edit files.

An automation prompt should define the goal, input scope, restrictions, output format, and completion condition. Keep repository-wide permanent rules in AGENTS.md instead of duplicating them.

Custom Prompts under ~/.codex/prompts are deprecated. Use Skills for reusable interactive procedures and use codex exec or the Action prompt for automation input.[5]

codex exec and the GitHub Action

codex exec runs from scripts or CI without opening the interactive TUI.[3] The Codex GitHub Action can invoke it with a prompt file, model, sandbox, and output file.[4] Before automation, decide whether the task is read-only or can write patches, what network or secrets are available, how failures affect the job, and whether reruns are safe.

When to Move a Workflow into a Skill

A one-off short instruction can remain in the conversation or automation prompt. Move it into a Skill when it should be reusable during interactive work and needs multiple steps, supporting references, helper scripts, or explicit trigger rules.[2]

Next, Skills design patterns explains progressive loading of task-specific procedures.

Summary

Use built-in commands for interactive controls, Skills for reusable procedures, codex exec for non-interactive local automation, and the Codex GitHub Action for GitHub Actions workflows.

See the references for the external specifications and background sources used on this page.[1][2][3][4][5]

This article is a general information summary and is not legal advice. Confirm practical decisions with a qualified specialist.

References

  1. OpenAI, Slash commands in Codex CLI
  2. OpenAI, Build skills
  3. OpenAI, Non-interactive mode
  4. OpenAI, Codex GitHub Action
  5. OpenAI, Custom Prompts
Quiz