Skip to content

docs(codex): add symlink install guide for git-pull upgrades#587

Open
yuanxiao0115 wants to merge 4 commits intoEveryInc:mainfrom
yuanxiao0115:docs/codex-install-guide
Open

docs(codex): add symlink install guide for git-pull upgrades#587
yuanxiao0115 wants to merge 4 commits intoEveryInc:mainfrom
yuanxiao0115:docs/codex-install-guide

Conversation

@yuanxiao0115
Copy link
Copy Markdown

• ## Summary

This PR adds a Codex-native install path for Compound Engineering that supports straightforward git pull upgrades.

What changed

  • Added .codex/INSTALL.md with a clone + symlink workflow for Codex native skill discovery.
  • Documented migration from copied CE skill installs (~/.codex/skills/ce-*) to a symlinked source-of-truth setup.
  • Added a pointer in README.md to .codex/INSTALL.md for users who prefer the git-based upgrade path.
  • Updated .gitignore to keep .codex ignored by default while explicitly tracking .codex/INSTALL.md.

Why

The converted install flow is convenient, but copied skills can make updates harder to reason about.
This guide provides a repo-linked workflow so CE skill updates can be pulled with git pull, with explicit install, verify, update,
and uninstall steps.

Validation

  • Docs-only change.
  • No runtime tests were executed.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a698bb1e6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .codex/INSTALL.md Outdated
If you previously installed CE skills by copying into `~/.codex/skills`, remove the copied CE directories so the symlinked source is authoritative:

```bash
rm -rf ~/.codex/skills/ce-*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove all legacy CE skill copies during migration

This migration command does not match the stated goal of removing copied Compound Engineering skills: rm -rf ~/.codex/skills/ce-* only deletes ce-* folders, but the Codex conversion installs all plugin skills (see skillDirs = copiedSkills.map(...) in src/converters/claude-to-codex.ts), including many non-ce-* names (for example proof, todo-create, and others). Users who follow this step will keep stale CE skill copies in ~/.codex/skills, so the symlinked repo is not actually authoritative and outdated duplicates can still be discovered.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

The migration step no longer uses rm -rf ~/.codex/skills/ce-*.

It now uses cleanup-codex-copied-skills.py, which derives the full Codex copy target set from current CE skill metadata (name +
ce_platforms) and Codex name normalization (: -> -), so it covers non-ce-* skills as well (for example proof, todo- create, etc.).

By default it runs in --dry-run, and --apply performs deletion.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eadd223bb2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/cleanup-codex-copied-skills.py Outdated
Comment on lines +72 to +76
target = target_skills_root / name
if not target.exists() and not target.is_symlink():
continue

if dry_run:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Verify ownership before deleting matched skill directories

This migration script deletes ~/.codex/skills/<name> purely by matching directory names derived from current CE metadata, but it never verifies that the target actually came from Compound Engineering before calling unlink/rmtree. Since the computed list includes generic names (for example proof, onboarding, changelog), a user who has unrelated skills with the same names will lose them when running this command; please check each target's SKILL.md provenance (or require explicit confirmation) before deletion.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

I updated scripts/cleanup-codex-copied-skills.py to verify ownership before any deletion. For each candidate under ~/.codex/ skills/<name>, it now checks:

  1. SKILL.md exists
  2. frontmatter name matches the expected CE skill name
  3. SKILL.md content matches the current CE source skill file

If verification fails, the target is skipped by default (skipped_unverified).
Deleting unverified targets now requires explicit opt-in: --apply --force-unverified.

Comment thread .codex/INSTALL.md Outdated
If you previously installed CE skills by copying into `~/.codex/skills`, run the cleanup script to derive exact Codex copy targets from current `skills/*/SKILL.md` metadata (`name` + `ce_platforms`) and remove only those copied CE skill directories:

```bash
python3 scripts/cleanup-codex-copied-skills.py
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use clone-absolute path for cleanup command

The migration step invokes python3 scripts/cleanup-codex-copied-skills.py, but the install flow never instructs users to cd into the cloned repository first. Following the guide verbatim from another working directory makes this command fail with a missing-file error, so users can unintentionally skip the cleanup; the doc should either add a cd ~/.codex/compound-engineering-plugin step or use the full script path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — addressed.

I updated the cleanup commands to use the clone-absolute script path:

  • python3 ~/.codex/compound-engineering-plugin/scripts/cleanup-codex-copied-skills.py --dry-run
  • python3 ~/.codex/compound-engineering-plugin/scripts/cleanup-codex-copied-skills.py --apply

So the migration flow no longer depends on running from the repository root.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d93ee28ead

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .codex/INSTALL.md

```bash
mkdir -p ~/.agents/skills
ln -s ~/.codex/compound-engineering-plugin/plugins/compound-engineering/skills ~/.agents/skills/compound-engineering
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Symlink each CE skill directory directly under .agents/skills

This command links the whole plugins/compound-engineering/skills tree as a single entry (~/.agents/skills/compound-engineering), but Codex skill discovery expects each child under the skills root to be a skill directory with its own SKILL.md (the same one-level layout our loader enforces in src/parsers/claude-home.ts via <skillsDir>/<entry>/SKILL.md). In that setup, compound-engineering itself has no SKILL.md, so users following these steps can restart Codex and still have no CE skills discovered; the install flow should link individual skill folders (or use plugin packaging) instead of a nested bundle directory.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review.

I believe this comment is based on an assumption that is stricter than the current Codex docs.

According to the official docs, Codex scans .agents/skills across repo hierarchy ($CWD/.agents/skills, $CWD/../.agents/skills,
$REPO_ROOT/.agents/skills) and explicitly supports symlinked skill folders:
https://developers.openai.com/codex/skills

Given that behavior, linking the CE skills source and relying on Codex discovery is intentional here, and has been validated locally
(skills are discovered after restart).

If maintainers still prefer per-skill links for readability/explicitness, I can update the guide accordingly, but this is not a hard
functional requirement per the official docs.

@yuanxiao0115
Copy link
Copy Markdown
Author

I replied in-thread with the rationale and doc reference:
https://developers.openai.com/codex/skills

Given the documented discovery behavior (including parent-folder scanning and symlinked skill folders), this PR keeps the current
approach intentionally. Happy to adjust if maintainers prefer a stricter layout convention, but functionally this matches the
official model.

Would appreciate a human review decision on this point. Thanks.

@tmchow
Copy link
Copy Markdown
Collaborator

tmchow commented Apr 17, 2026

Thanks for the contribution and welcome!

We are overhauling how we install so may need to take a pause on this while we figure this out. So leaving open for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants