fix: unify skill sync across all AI agents - #757
Conversation
install-skills.sh を全エージェント対応に拡張し、Claude Code のスキル・ コマンド・ルールを Codex/Cursor/Gemini CLI でも利用可能にする。 - skills.txt のインストールに -a '*' を追加して全エージェント対応 - @tag 付きエントリの存在チェック修正(毎回再インストール防止) - カスタムスキル・コマンド・ルールを .agents/skills/ に SKILL.md 形式で同期 - 各エージェントディレクトリへの相対パスシンボリックリンク作成 - .codex/prompts/ へのコマンドリンク作成 - .codex/config.toml を実際の設定に同期(モデル・MCP・プラグイン) - プロジェクト/グローバル両方の冪等性チェック Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR migrates the agent skills installation system from home-directory to project-local directories, refactors the installation script with new helper functions and a multi-agent synchronization pipeline, updates Codex AI to model gpt-5.5 with xhigh reasoning, configures MCP servers with refreshed authentication, and enables multiple Codex plugins. ChangesMulti-agent Skills Installation and Codex Configuration Migration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @keito4's task in 1m 47s —— View job コードレビュー
総評スキル同期の統一化という意図は明確で、実装の方向性は良いです。冪等性の考慮や 🔴 Major1.
model_reasoning_effort = "xhigh"標準的な推論努力レベルは 2.
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
bearer_token_env_var = "LINEAR_API_KEY"🟡 Minor3. macOS 固有のパスが DevContainer 環境で動作しない可能性
[mcp_servers.doppler.env]
npm_config_cache = "/private/tmp/codex-npm-cache"
4. シンボリックリンクの相対パスが2階層固定
if [[ -d "${PROJECT_AGENTS_DIR}/${skill_name}" ]]; then
ln -s "../../.agents/skills/${skill_name}" "$link_path"
5. 旧設定の 💡 Recommendation6.
[notice.model_migrations]
"gpt-5.1-codex-max" = "gpt-5.2-codex"
7.
関数内で ✅ 良い点
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.codex/config.toml:
- Around line 53-59: The Docker/DevContainer config sets npm_config_cache to a
macOS-specific path "/private/tmp/codex-npm-cache" under the
[mcp_servers.doppler.env] block which will break on Linux; update the
npm_config_cache value to a cross-platform temp location (e.g., use
"/tmp/codex-npm-cache" or resolve from TMPDIR/TEMP environment variables) so the
doppler MCP server launched by the "command"/"args" (npx `@dopplerhq/mcp-server`)
works in DevContainer/Linux environments; change only the npm_config_cache env
value to use a portable path or an environment-derived fallback.
In `@script/install-skills.sh`:
- Around line 171-178: The frontmatter writes description unquoted which breaks
YAML when description contains special characters; update the printf that emits
"description: ${description}" so the description value is safely quoted/escaped
(e.g., wrap the value in double quotes and escape any inner quotes) before
writing to "$target_file" — adjust the printf invocation that uses variables
name, description, target_file (and keep the subsequent printf "$body" append)
to emit a properly quoted/escaped description string.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ace1c822-83e6-475e-a19f-b13972f73361
📒 Files selected for processing (4)
.codex/config.toml.devcontainer/Dockerfile.gitignorescript/install-skills.sh
| [mcp_servers.doppler] | ||
| command = "npx" | ||
| args = ["-y", "@dopplerhq/mcp-server", "--read-only"] | ||
|
|
||
| [mcp_servers.github.http_headers] | ||
| Authorization = "Bearer ${GITHUB_COPILOT_MCP_TOKEN}" | ||
| [mcp_servers.doppler.env] | ||
| npm_config_cache = "/private/tmp/codex-npm-cache" | ||
|
|
There was a problem hiding this comment.
macOS-specific path will fail in DevContainer/Linux environments.
/private/tmp/ is a macOS-specific path (where /tmp is a symlink to /private/tmp). On Linux systems, including the DevContainer which runs Ubuntu, this path doesn't exist and will cause the doppler MCP server to fail or behave unexpectedly.
Proposed fix
[mcp_servers.doppler.env]
-npm_config_cache = "/private/tmp/codex-npm-cache"
+npm_config_cache = "/tmp/codex-npm-cache"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [mcp_servers.doppler] | |
| command = "npx" | |
| args = ["-y", "@dopplerhq/mcp-server", "--read-only"] | |
| [mcp_servers.github.http_headers] | |
| Authorization = "Bearer ${GITHUB_COPILOT_MCP_TOKEN}" | |
| [mcp_servers.doppler.env] | |
| npm_config_cache = "/private/tmp/codex-npm-cache" | |
| [mcp_servers.doppler] | |
| command = "npx" | |
| args = ["-y", "`@dopplerhq/mcp-server`", "--read-only"] | |
| [mcp_servers.doppler.env] | |
| npm_config_cache = "/tmp/codex-npm-cache" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.codex/config.toml around lines 53 - 59, The Docker/DevContainer config sets
npm_config_cache to a macOS-specific path "/private/tmp/codex-npm-cache" under
the [mcp_servers.doppler.env] block which will break on Linux; update the
npm_config_cache value to a cross-platform temp location (e.g., use
"/tmp/codex-npm-cache" or resolve from TMPDIR/TEMP environment variables) so the
doppler MCP server launched by the "command"/"args" (npx `@dopplerhq/mcp-server`)
works in DevContainer/Linux environments; change only the npm_config_cache env
value to use a portable path or an environment-derived fallback.
| printf '%s\n' "---" \ | ||
| "name: ${name}" \ | ||
| "description: ${description}" \ | ||
| "metadata:" \ | ||
| " author: keito4" \ | ||
| " version: \"1.0.0\"" \ | ||
| "---" > "$target_file" | ||
| printf '%s\n' "$body" >> "$target_file" |
There was a problem hiding this comment.
YAML description field should be quoted to handle special characters.
If the extracted description contains YAML special characters (:, #, ", etc.), the generated SKILL.md will have malformed frontmatter. For example, a heading like "Fix: improve performance" would produce description: Fix: improve performance, which is ambiguous YAML.
Proposed fix
mkdir -p "$target_dir"
+ # Escape double quotes and wrap in quotes for YAML safety
+ local safe_description="${description//\"/\\\"}"
printf '%s\n' "---" \
"name: ${name}" \
- "description: ${description}" \
+ "description: \"${safe_description}\"" \
"metadata:" \🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@script/install-skills.sh` around lines 171 - 178, The frontmatter writes
description unquoted which breaks YAML when description contains special
characters; update the printf that emits "description: ${description}" so the
description value is safely quoted/escaped (e.g., wrap the value in double
quotes and escape any inner quotes) before writing to "$target_file" — adjust
the printf invocation that uses variables name, description, target_file (and
keep the subsequent printf "$body" append) to emit a properly quoted/escaped
description string.
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review
全体判定: patch is incorrect。主要な同期経路が Docker build と既存グローバルインストール環境で壊れます。信頼度: 0.88。
|
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review発見事項
全体判定 patch is incorrect。DevContainer ビルド時の同期先が不安定で、新機能の all-agent skill 同期が期待通りに配置されない可能性が高いです。信頼度: 0.87 確認:
|
|
🎉 This PR is included in version 1.112.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
install-skills.shを全エージェント(Claude Code / Codex / Cursor / Gemini CLI)対応に拡張.agents/skills/に SKILL.md 形式で同期し、各エージェントのスキルディレクトリへシンボリックリンク.codex/config.tomlを実際の設定に同期(モデル・MCP サーバー・プラグイン更新)主な変更点
npx skills add -a '*'で全エージェント対応、@tag付きエントリの冪等性修正、カスタムスキル/コマンド/ルール同期、Codex prompts リンク作成gpt-5.5モデル、o3/context7/linear/doppler MCP 追加、bearer_token_env_var 形式に統一、curated plugins 追加.codex/prompts/追加Test plan
bash script/install-skills.shを複数回実行して冪等性を確認codex debug prompt-inputでスキルの認識を確認🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores