Local Codex logo

Local Codex

CommunityPopular
daymade
local-codex

Launch and manage OpenAI Codex CLI (local agent) as a non-interactive coding sub-agent. Use when the user wants to delegate coding tasks to Codex, run code reviews, generate or refactor code, or use Codex GPT-5.5 agent capabilities through local CLI. Triggers on phrases like 'codex', 'run codex', 'codex exec', 'code review with codex', 'delegate to codex', 'use codex for coding', or any request to invoke the local Codex CLI agent. Uses ChatGPT Pro OAuth (flat-rate, no API charges) via ~/.codex/auth.json. Never uses API keys.

Overview

Publisherdaymade
Repositoryclaude-code-skills
Skill namelocal-codex
Stars
1.4K
Forks
219
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by daymade on GitHub. Read the source before you install it.

Installation

Install the Local Codex AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daymade/claude-code-skills.git /tmp/claude-code-skills
mkdir -p .claude/skills
cp -r /tmp/claude-code-skills/daymade-codex/local-codex .claude/skills/local-codex
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Local Codex in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Local Codex on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Local Codex is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Local Codex

Delegate coding tasks to the local OpenAI Codex CLI agent using your ChatGPT Pro subscription (OAuth, no API charges).

When to Use

  • User wants to generate, refactor, or review code via Codex
  • User wants to run codex exec for non-interactive tasks
  • User wants to use Codex's GPT-5.5 agent capabilities
  • User mentions "codex", "run codex", "delegate to codex"

Authentication (OAuth / ChatGPT Pro)

CRITICAL: This skill uses OAuth authentication from ~/.codex/auth.json (ChatGPT Pro flat-rate subscription). Do NOT set OPENAI_API_KEY or pass API keys — that would switch to pay-per-use billing.

  • Codex desktop app and CLI share the same auth cache
  • If auth fails, run codex login in terminal (browser OAuth flow)
  • For auth issues, see references/oauth-guide.md

Codex CLI Path

The skill auto-detects Codex CLI in this order:

  1. /Applications/Codex.app/Contents/Resources/codex (desktop app)
  2. /usr/local/bin/codex (npm global)
  3. /opt/homebrew/bin/codex (Homebrew)
  4. ~/.npm-global/bin/codex
  5. which codex fallback

Usage Patterns

1. Basic exec (single task)

bash
python3 scripts/codex_wrapper.py exec "<prompt>" [<workdir>] [<model>] [<sandbox>] [<timeout>]

Example:

bash
python3 scripts/codex_wrapper.py exec \
  "Write a Python function to calculate fibonacci" \
  /tmp \
  gpt-5.5 \
  workspace-write \
  300

2. Code review

bash
python3 scripts/codex_wrapper.py review [<workdir>] [<model>] [uncommitted:true] [<timeout>]

Example:

bash
python3 scripts/codex_wrapper.py review \
  /path/to/repo \
  gpt-5.5 \
  true \
  300

3. Check status

bash
python3 scripts/codex_wrapper.py status

Output Format

The wrapper returns JSON with:

  • success: bool
  • exit_code: int
  • elapsed_seconds: float
  • stdout: raw output
  • stderr: error stream (truncated)
  • parsed_jsonl: parsed JSONL events (if --json)
  • final_message: extracted assistant text (if available)

Parameters

ParameterDefaultOptions
modelgpt-5.5gpt-5.5, gpt-5.5-pro, o4-mini, etc.
sandboxworkspace-writeread-only, workspace-write, danger-full-access
timeout300seconds (increase for large tasks)
json_outputtruealways true (wrapper parses JSONL)

Safety Notes

  • sandbox=read-only for analysis/review tasks (no file writes)
  • sandbox=workspace-write for code generation (writes to working dir)
  • sandbox=danger-full-access only when explicitly needed (full system access)
  • Always use --skip-git-repo-check when running outside git repos
  • Use --ephemeral for one-off tasks (no session persistence)

Session Management

For multi-step tasks, Codex supports session resume:

bash
# First step
codex exec --ephemeral "Step 1..."
# Later
codex exec resume --last "Step 2..."

The wrapper currently runs single-shot exec. For multi-step workflows, use raw codex exec commands.

Limitations

  • Desktop app must be running for OAuth token refresh (or token must be fresh)
  • codex doctor is buggy in current version (alpha), avoid using
  • Environment variables are NOT inherited into Codex's sandbox; pass via config or prompt
  • Large file operations may need increased timeout

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Local Codex AI skill do?

Launch and manage OpenAI Codex CLI (local agent) as a non-interactive coding sub-agent. Use when the user wants to delegate coding tasks to Codex, run code reviews, generate or refactor code, or use Codex GPT-5.5 agent capabilities through local CLI. Triggers on phrases like 'codex', 'run codex', 'codex exec', 'code review with codex', 'delegate to codex', 'use codex for coding', or any request to invoke the local Codex CLI agent. Uses ChatGPT Pro OAuth (flat-rate, no API charges) via ~/.codex/auth.json. Never uses API keys.

Why use Local Codex on TypingMind?

Because you install it once and use it with any model. Local Codex is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Local Codex in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/daymade/claude-code-skills/tree/main/daymade-codex/local-codex. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Local Codex?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Local Codex?

As many as you like. As long as a model supports skills, you can use Local Codex with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Local Codex AI skill free?

Yes. It is published on GitHub by daymade under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇