Communitygithub.com

Codex CLI スキル

Hermes ターミナル経由で OpenAI Codex CLI にコーディングタスク(機能追加、PR レビューなど)を委任します。

Codex CLI スキル とは?

このスキルは、Hermes ターミナルを通じて OpenAI の自律コーディングエージェント CLI である Codex にコーディングタスクを委任するためのものです。機能開発、リファクタリング、プルリクエストレビュー、バグ修正の一括処理などに活用できます。Codex CLI と Git リポジトリが必要で、ターミナルでは必ず `pty=true` を指定してください。また、`background=true` を使ったバックグラウンド実行や、複数の Codex プロセスを並列起動するバッチ処理も可能です。本スキールは、ワンショット実行から長時間タスク、PR レビュー、並列 issue 修正までをカバーしており、Hermes ゲートウェイ経由で使用する際の注意点(サンドボックスエラーへの対処方法)も含まれています。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Lord1Egypt/awesome-skill-forge/tree/HEAD/skills/codex

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Codex CLI

コーディングタスクを Hermes ターミナル経由で Codex に委任します。Codex は OpenAI の自律コーディングエージェント CLI です。

使用するタイミング

  • 機能開発
  • リファクタリング
  • PR レビュー
  • バグの一括修正

Codex CLI と Git リポジトリが必要です。

前提条件

  • Codex のインストール: npm install -g @openai/codex
  • OpenAI 認証の構成: OPENAI_API_KEY または Codex CLI ログインフローからの Codex OAuth 認証情報のいずれか
  • Git リポジトリ内で実行する必要があります — Codex は Git リポジトリ外では動作しません
  • ターミナル呼び出しで pty=true を使用する — Codex は対話型ターミナルアプリです

Hermes 自身については、model.provider: openai-codex を設定すると、hermes auth add openai-codex 実行後の ~/.hermes/auth.json にある Hermes 管理の Codex OAuth が使用されます。スタンドアロンの Codex CLI の場合、有効な CLI OAuth セッションが ~/.codex/auth.json に存在する可能性があります。OPENAI_API_KEY がなくても、Codex 認証がないとは判断しないでください。

ワンショットタスク

terminal(command="codex exec '設定にダークモードトグルを追加'", workdir="~/project", pty=true)

スクラッチ作業の場合(Codex は Git リポジトリが必要です):

terminal(command="cd $(mktemp -d) && git init && codex exec 'Python でスネークゲームを作成'", pty=true)

バックグラウンドモード(長時間タスク)

# PTY 付きでバックグラウンド開始
terminal(command="codex exec --full-auto '認証モジュールをリファクタリング'", workdir="~/project", background=true, pty=true)
# session_id が返されます

# 進捗を監視
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")

# Codex が質問した場合に入力送信
process(action="submit", session_id="<id>", data="yes")

# 必要に応じて強制終了
process(action="kill", session_id="<id>")

主要フラグ

フラグ効果
exec "prompt"ワンショット実行、完了後に終了
--full-autoサンドボックス内だが、ワークスペース内のファイル変更を自動承認
--yoloサンドボックスなし、承認なし(最速、最も危険)
--sandbox danger-full-accessCodex サンドボックスなし。ホストサービスのコンテキストが bubblewrap を破壊する場合に有用

Hermes ゲートウェイに関する注意点

Hermes ゲートウェイ / サービスのコンテキスト(例:Telegram 駆動のエージェントセッション)から Codex CLI を呼び出す場合、同じコマンドがユーザーの対話型シェルで動作しても、Codex の workspace-write サンドボックス化が失敗する可能性があります。典型的な症状は、bubblewrap / ユーザーネームスペースエラー(例:setting up uid map: Permission denied や loopback: Failed RTM_NEWADDR: Operation not permitted)です。

そのようなコンテキストでは、以下を優先して使用してください:

codex exec --sandbox danger-full-access "<task>"

代わりにプロセス境界を安全策として使用します。明示的な workdir、起動前のクリーンな git ステータス、狭いタスクプロンプト、git diff によるレビュー、対象を絞ったテスト、広範囲な変更をコミットする前に人間またはエージェントによる確認を行います。

PR レビュー

安全なレビューのために一時ディレクトリにクローン:

terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && codex review --base origin/main", pty=true)

ワークツリーを使った並列 Issue 修正

# ワークツリーを作成
terminal(command="git worktree add -b fix/issue-78 /tmp/issue-78 main", workdir="~/project")
terminal(command="git worktree add -b fix/issue-99 /tmp/issue-99 main", workdir="~/project")

# 各ワークツリーで Codex を起動
terminal(command="codex --yolo exec 'Issue #78 を修正: <説明>。完了したらコミット。'", workdir="/tmp/issue-78", background=true, pty=true)
terminal(command="codex --yolo exec 'Issue #99 を修正: <説明>。完了したらコミット。'", workdir="/tmp/issue-99", background=true, pty=true)

# 監視
process(action="list")

# 完了後、プッシュして PR を作成
terminal(command="cd /tmp/issue-78 && git push -u origin fix/issue-78")
terminal(command="gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'")

# クリーンアップ
terminal(command="git worktree remove /tmp/issue-78", workdir="~/project")

バッチ PR レビュー

# すべての PR 参照を取得
terminal(command="git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'", workdir="~/project")

# 複数の PR を並列レビュー
terminal(command="codex exec 'PR #86 をレビュー。git diff origin/main...origin/pr/86'", workdir="~/project", background=true, pty=true)
terminal(command="codex exec 'PR #87 をレビュー。git diff origin/main...origin/pr/87'", workdir="~/project", background=true, pty=true)

# 結果を投稿
terminal(command="gh pr comment 86 --body '<review>'", workdir="~/project")

ルール

  1. 常に pty=true を使用する — Codex は対話型ターミナルアプリであり、PTY がないとハングします
  2. Git リポジトリ必須 — Codex は Git ディレクトリ外では動作しません。スクラッチ作業には mktemp -d && git init を使用
  3. ワンショットには exec を使う — codex exec "prompt" で実行し、完了後クリーンに終了します
  4. 開発時は --full-auto を使う — サンドボックス内の変更を自動承認します
  5. 長時間タスクはバックグラウンドで — background=true を使用し、process ツールで監視します
  6. 干渉しない — poll / log で監視し、長時間タスクには辛抱強く待ちます
  7. 並列実行しても問題ない — バッチ処理では複数の Codex プロセスを同時に実行できます

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a insurance agency. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generates a complete landing page with copy, layout, hero image, and responsive design from a text description. Use when launching a product quickly.

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a family law practice. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a fractional CFO firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a home remodeling company. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a HVAC service company. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a immigration law firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a CPA tax advisory firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a estate planning law firm. Use when handling...

Lord1Egypt/awesome-skill-forge

Fastest way to create or update a pawr.link profile. One curl command, $19 USDC to create, $0.10 to update. Patch-style update-links endpoint lets you add, remove, or move individual links without replacing the whole profile.

Lord1Egypt/awesome-skill-forge

Use this skill when the user wants to review today, look back on yesterday, reflect on this week, or wrap things up with a gentle, low-pressure reflection.

Lord1Egypt/awesome-skill-forge

Read-only queue dashboard for workspace-aware ship. (gstack)

Lord1Egypt/awesome-skill-forge

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says landing page, post-click experience, landing page audit, LP audit, conversion rate, landing page CRO, post-click CRO, or landing page optimization.

Lord1Egypt/awesome-skill-forge

Create HTML-based video compositions, animated title cards, social overlays, captioned talking-head videos, audio-reactive visuals, and shader transitions using HyperFrames. HTML is the source of truth for video. Use when the user wants a rendered MP4/WebM from an HTML composition, wants to animate text/logos/charts over media, needs captions synced to audio, wants TTS narration, or wants to convert a website into a video.

Lord1Egypt/awesome-skill-forge

Search arXiv papers by keyword, author, category, or ID.

Lord1Egypt/awesome-skill-forge

Track Apple devices/AirTags via FindMy.app on macOS.

Lord1Egypt/awesome-skill-forge

Jailbreak LLMs: Parseltongue, GODMODE, ULTRAPLINIAN.

Lord1Egypt/awesome-skill-forge

Geocode, POIs, routes, timezones via OpenStreetMap/OSRM.

Lord1Egypt/awesome-skill-forge

Notion API + ntn CLI: pages, databases, markdown, Workers.

Lord1Egypt/awesome-skill-forge

p5.js sketches: gen art, shaders, interactive, 3D.

関連スキル