Commands and Workflows - Entry Points for Skills and Automation
About 5 minutes
Codex commands include built-in controls and reusable workflow entry points. Separate them by purpose.
Four Entry Points
Section titled “Four Entry Points”| Entry point | Purpose | Example |
|---|---|---|
| Built-in command | Control a session or UI | /agent, /skills, /plugins |
| Prompt file | Share a standard request | PR review criteria |
| Skill | Reuse procedures, references, and scripts | $docs-content |
| Non-interactive execution | Run repeatable automation | codex exec, Codex GitHub Action |
Built-in commands control Codex itself. Put project procedures in Skills and move CI workflows to non-interactive execution.
Design a reusable prompt
Section titled “Design a reusable prompt”# 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.A reusable 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.
codex exec and the GitHub Action
Section titled “codex exec and the GitHub Action”The Codex GitHub Action can invoke codex exec with a prompt file, model, sandbox, and output file. 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
Section titled “When to Move a Workflow into a Skill”A short instruction can remain a prompt file. Move it into a Skill when it needs multiple steps, supporting references, helper scripts, or explicit trigger rules.
Next, Skills design patterns explains progressive loading of task-specific procedures.