agentsclimarketplace

Codex cli setup

Skill bokuwalily/claude-code-skills/skills/codex-cli-setup

75 battle-tested Claude Code skills from shipping 20+ apps solo — macOS, Next.js, Vercel, iOS/Expo, Cloudflare, Phaser, local AI media & more

Install
npx -y skills add bokuwalily/claude-code-skills --skill codex-cli-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

OpenAI Codex CLIをインストールし認証して、Claudeのbashツールや自動化スクリプトからノンインタラクティブで呼び出せるようにするときに使う

SKILL.md

2.6 KB, 831 tokens by cl100k_base, as published. Nobody here has run it

Procedure

  1. インストール
npm i -g @openai/codex
# または
npm install -g @openai/codex

インストール後、バイナリが通っているか確認:

codex --version
# 例: 0.133.0
  1. 認証
codex login
# ブラウザが開いてOpenAIアカウントでサインインするよう求められる
# ブラウザ認証が完了するとCLIがトークンを自動保存する

API keyを直接指定する場合(非インタラクティブ環境向け):

export OPENAI_API_KEY="sk-..."
codex --api-key "$OPENAI_API_KEY" exec "プロンプト"
  1. ノンインタラクティブ実行
# Gitリポジトリ外での実行(--skip-git-repo-checkが必要)
codex exec --skip-git-repo-check "タスクの説明をここに書く"

# モデルを指定する場合
codex exec --model gpt-4o --skip-git-repo-check "プロンプト"

# 出力をファイルに保存
codex exec --skip-git-repo-check "プロンプト" > output.txt
  1. ClaudeのBashツールからの呼び出し

Claudeセッション内では以下のように利用可能:

# Claude Codeの ! プレフィックスまたはBashツールから
codex exec --skip-git-repo-check "このコードのバグを見つけて修正案を提示して"

Pitfalls

  • --skip-git-repo-check はGitリポジトリ外(tmp, home直下等)で実行する際に必須。付けないとエラーになる
  • インタラクティブ認証不要: APIキーを環境変数で渡すほうが自動化に向いている。codex login はブラウザを開くため、SSH環境や自動スクリプトでは使えない
  • PATHが通らない場合: npm i -g のグローバルパスがPATHに含まれていないことがある。npm bin -g でパスを確認して .zshrc/.bashrc に追加する
  • 既存のcodex設定が残っている場合: ~/.codex/ にキャッシュが残っていても、バイナリがPATHにないと動かない。インストールが必要

Verification

# バージョン確認(バイナリの存在確認)
codex --version

# 簡単なタスクで動作確認
codex exec --skip-git-repo-check "Hello と出力するPythonスクリプトを1行で書いて"
# → print('Hello') のような出力が返ればOK

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,970. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.