lukagiorgadze/opencto/codex-noninteractive
Claude Code and agent skill by lukagiorgadze/opencto
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when a user asks for non-trivial code changes — such as implementing a new feature, fixing a bug, refactoring, or any task that requires meaningful edits across one or more files. Skip it for minor changes that can be done in a few lines directly.
Install
npx vskill@latest install lukagiorgadze/opencto/codex-noninteractiveSKILL.md
The same SKILL.md was published earlier as lukagiorgadze/opencto/codex-noninteractive.
Codex Non-Interactive Mode
Use this skill for
Use this skill when designing, reviewing, or generating commands and workflows around codex exec.
Good matches include CI jobs, release-note generation, repo triage, automated fixes, log summarization, structured JSON output, stdin piping, schema-constrained output, sandbox configuration, API-key handling, and non-interactive session resume.
Core model
codex exec runs Codex without opening the interactive TUI. It is meant for scripts, pipelines, scheduled jobs, and automation.
Default behavior:
- Progress streams to
stderr. - The final assistant message prints to
stdout. - Piped stdin can be used as task context.
codex exec -makes stdin the full prompt.- The default sandbox is read-only.
- Runs normally require a Git repository unless
--skip-git-repo-checkis used. codex eis the short alias forcodex exec.
Standard procedure
- Identify the automation shape: one-off shell command, CI step, JSONL event stream, schema output, or resumed multi-stage run.
- Choose the safest permission level that can complete the task.
- Choose the input pattern: prompt only, prompt plus stdin context, or stdin-as-prompt with
-. - Choose output handling: final stdout,
--output-last-message, JSONL with--json, or--output-schema. - For CI, keep credentials out of untrusted setup/build/test steps.
- When generating a workflow that writes changes, separate read-only Codex generation from write-permission PR creation.
Common commands
Prompt only:
Redirect final output:
Avoid persisted rollout files:
Allow workspace edits:
Emit JSONL events:
Write only the final message to a file:
Resume the last non-interactive session:
Permissions and safety
Use least privilege.
| Need | Command pattern | |
|---|---|---|
| Inspect only | codex exec "<task>" | |
| Modify workspace files | codex exec --sandbox workspace-write "<task>" | |
| Broader system access | codex exec --sandbox danger-full-access "<task>" | |
| No saved rollout files | codex exec --ephemeral "<task>" | |
| Ignore local user config | codex exec --ignore-user-config "<task>" | |
| Ignore execpolicy rules | codex exec --ignore-rules "<task>" | |
| Outside Git repository | codex exec --skip-git-repo-check "<task>" |
Avoid danger-full-access unless the runner is isolated. Treat --full-auto as deprecated compatibility behavior; prefer explicit --sandbox workspace-write.
If an enabled MCP server has required = true and cannot initialize, expect codex exec to exit with an error.
Input patterns
Prompt plus stdin context:
Stdin as the full prompt:
Dynamic generated prompt:
Use prompt-plus-stdin when command output is context and the instruction is known. Use codex exec - when another script or file generates the full instruction.
Structured and machine-readable output
Use --json when downstream tooling needs progress/events. JSONL event types include thread.started, turn.started, turn.completed, turn.failed, item.*, and error.
Use --output-schema when downstream tooling needs a stable final JSON shape:
Keep schemas strict: require needed fields and set additionalProperties: false.
Authentication in automation
codex exec reuses saved CLI authentication by default.
For GitHub Actions, prefer openai/codex-action over installing the CLI and exposing an API key to a shell step.
Do not set OPENAI_API_KEY or CODEX_API_KEY as a job-level environment variable in workflows that check out or run repository-controlled code.
For non-GitHub automation, scope CODEX_API_KEY to the single codex exec invocation:
CODEX_API_KEY is supported only by codex exec.
Treat ~/.codex/auth.json like a password. Do not use ChatGPT-managed auth files in public or open-source repository runners.
GitHub Actions autofix pattern
When asked to auto-fix CI failures in GitHub Actions, use this security pattern:
- Trigger a follow-up workflow from failed CI.
- Check out the failing commit with
contents: read. - Run setup and tests before exposing OpenAI credentials.
- Run
openai/codex-action. - Save Codex changes as a patch artifact.
- In a separate job with write permissions, apply the patch and open a PR.
Read references/github-actions-autofix.md when a full workflow is needed.
Resources
Load these only when the task needs the extra detail:
references/codex-exec-flags.md: fullcodex execandcodex exec resumeflag table.references/structured-output.md: JSONL events and schema-constrained output patterns.references/stdin-piping.md: prompt-plus-stdin and stdin-as-prompt examples.references/auth-and-ci-security.md: API-key handling and CI auth guidance.references/github-actions-autofix.md: full secure GitHub Actions auto-fix workflow.references/full-non-interactive-reference.md: complete cleaned source reference.references/agentskills-practices-used.md: Agent Skills design choices used in this package.
Response checklist
Before returning a command or workflow, verify:
- The command uses
codex execorcodex exec resume, not the interactive TUI. - The sandbox is the least-permissive viable option.
- Secrets are scoped only to the Codex invocation or protected action.
- Untrusted repository code does not run with API keys in its environment.
- Output mode matches the caller's downstream consumer.
- Stdin mode matches whether stdin is context or the full prompt.
- The Git repository requirement is handled explicitly.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/codex-noninteractive/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lukagiorgadze/opencto/codex-noninteractive)