Skip to content
Back to skills

Codex Cli

ASecurity

Executes tasks using the Codex CLI (`codex`). Automatically determines the least privilege required (Read-Only, Editor, or Autonomous) based on the user's request and handles security approvals.

  • 30 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 12, 2026
ai-agentspythonbashtestingrefactoringsecurity

Works with

  • cli

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill codex-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codex Cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codex Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-codex-cli-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-codex-cli-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codex-cli
description: Executes tasks using the Codex CLI (`codex`). Automatically determines the least privilege required (Read-Only, Editor, or Autonomous) based on the user's request and handles security approvals.
---

# executing-codex

## Purpose

Use this skill to perform coding tasks, research, or system analysis using the `codex` CLI. This skill follows the Principle of Least Privilege by automatically mapping requests to the safest possible profile and gating dangerous operations behind user approval.

## Permission Tiers

| Tier  | Profile      | Capability                         | Approval Required | Typical Tasks                          |
| :---- | :----------- | :--------------------------------- | :---------------- | :------------------------------------- |
| **0** | `readonly`   | Read files, live search, analysis. | **No**            | Research, code review, explanation.    |
| **1** | `editor`     | File edits, cached search.         | **Yes**           | Refactoring, bug fixes, formatting.    |
| **2** | `autonomous` | Edits + Sandbox commands.          | **Yes**           | Testing, building, dependency updates. |

## Implementation Workflow

### 1. Analyze & Classify

Analyze the user's intent to determine the required permission tier.

- **Tier 0**: Does the task only involve reading code or searching for information?
- **Tier 1**: Does the task involve modifying files but no command execution?
- **Tier 2**: Does the task require running tests, build scripts, or managing dependencies?

### 2. Approval Protocol

If the task maps to **Tier 1** or **Tier 2**, you **MUST** obtain user approval before executing the `codex` command.

Use the `AskQuestion` tool to confirm:

> "I've detected that this task requires [Editor/Autonomous] permissions to [modify files/run commands]. OK to proceed?"

### 3. Execution

Execute `codex` using the flags corresponding to the tier.

```bash
# Tier 0 (Read-only)
codex -q "<prompt>"

# Tier 1 (Editor)
codex --auto-edit "<prompt>"

# Tier 2 (Autonomous)
codex --full-auto "<prompt>"
```

**Security Rules:**

- **NEVER** use `--dangerously-auto-approve-everything`.
- **ALWAYS** use the most restrictive flags possible.
- If you are unsure, default to Tier 0 (`-q`) and escalate only if `codex` reports it cannot complete the task.

## Configuration

This skill leverages native `codex` CLI flags to enforce the permission tiers. No additional configuration files are required.

## Examples

### Research (Tier 0)

> User: "What are the latest best practices for Python packaging in 2026?"
> Action: Execute `codex --profile readonly "..."`

### Refactor (Tier 1)

> User: "Rename the 'User' class to 'Account' across the whole repo."
> Action:
>
> 1. Request approval for `editor` profile.
> 2. Execute `codex --profile editor "..."`

### Automated Testing (Tier 2)

> User: "Run the test suite and fix any failures found."
> Action:
>
> 1. Request approval for `autonomous` profile.
> 2. Execute `codex --profile autonomous "..."`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.