> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codealive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Share the plugin with Codex CLI

> Reuse the Claude Code plugin's skill from Codex CLI and other skill-aware agents, with a launchd agent that follows every plugin update.

## Overview

The [CodeAlive Claude Code plugin](https://docs.codealive.ai/integrations/plugin-claude-code.md) ships the
`codealive-context-engine` skill along with a subagent and authentication
hook. Claude Code installs it into a versioned cache directory. Other
skill-aware agents — Codex CLI, Gemini CLI, Cursor, Windsurf — look for skills
in their own user directories and don't read the Claude Code plugin cache.

This guide sets up a one-time bridge so those agents pick up the exact same
skill files the plugin installs, and keeps following new versions every time
you run `claude plugin update`.

> [!NOTE]
>
> You only need this if you want a single source of truth for the skill across
> multiple agents. If you use Codex (or another agent) in isolation, the simpler
> option is to run the universal installer:
>
> ```bash theme={null}
> npx skills add CodeAlive-AI/codealive-skills@codealive-context-engine
> ```
>
> See the [Agent Skills & Plugins](https://docs.codealive.ai/integrations/skills.md) page for details.

## How it works

A symlink from `~/.codex/skills/codealive-context-engine` points into the
plugin's versioned cache at `~/.claude/plugins/cache/codealive-marketplace/codealive/<version>/skills/codealive-context-engine`.
Codex CLI loads the skill through the symlink.

Each `claude plugin update` writes a new versioned directory and leaves the old
one in place, so the symlink's target becomes stale. A `launchd` agent watches
the parent cache directory and re-runs a short shell script that rewrites the
symlink to the highest version currently on disk.

## Prerequisites

* macOS with the [Claude Code plugin installed](https://docs.codealive.ai/integrations/plugin-claude-code.md)
* Codex CLI (or another skill-aware agent)
* The `codealive-skills` repository cloned locally, so you can run the bridge scripts:

  ```bash theme={null}
  git clone https://github.com/CodeAlive-AI/codealive-skills.git
  ```

## Install (macOS)

**1. Run the installer**

```bash theme={null}
cd codealive-skills/tools/plugin-bridge
./install-macos.sh
```

The installer renders `com.codealive.plugin-bridge.plist`, writes it to
`~/Library/LaunchAgents/`, bootstraps the agent, and creates the symlink
once synchronously so it's ready immediately.

**2. Verify the symlink**

```bash theme={null}
ls -la ~/.codex/skills/codealive-context-engine
```

The output should show a symlink pointing into
`~/.claude/plugins/cache/codealive-marketplace/codealive/<version>/skills/codealive-context-engine`.

**3. Confirm the launchd agent**

```bash theme={null}
launchctl print "gui/$(id -u)/com.codealive.plugin-bridge" | head
```

You should see `state = waiting` (the expected idle state for a `WatchPaths`
agent) and the watched path listed.

**4. Test with a plugin update**

From any shell, run:

```bash theme={null}
claude plugin update codealive@codealive-marketplace
```

Then re-check the symlink — it should now point at the newer version.
The bridge also writes a line per relink to `/tmp/codealive-plugin-bridge.log`.

## Targeting a different agent

The scripts default to Codex CLI. Every path is driven by an environment
variable, so you can point the bridge at any agent.

| Variable | Default |
| - | - |
| `CODEALIVE_PLUGIN_CACHE` | `~/.claude/plugins/cache/codealive-marketplace/codealive` |
| `CODEALIVE_PLUGIN_SUBPATH` | `skills/codealive-context-engine` |
| `CODEALIVE_AGENT_LINK` | `~/.codex/skills/codealive-context-engine` |

Example for Gemini CLI:

```bash theme={null}
CODEALIVE_AGENT_LINK=~/.gemini/skills/codealive-context-engine ./install-macos.sh
```

> [!WARNING]
>
> `launchd` starts `update-symlink.sh` through `/bin/bash` and does not inherit
> your interactive shell environment. If you customise a variable, either edit
> the defaults inside `update-symlink.sh`, set them in `~/.zshenv` (which is
> read by non-login bash on macOS when sourced explicitly), or add an
> `EnvironmentVariables` dictionary to the plist before installing.

## Linux

A `systemd --user` path unit gives the equivalent behaviour. See the
[Linux section of the bridge README](https://github.com/CodeAlive-AI/codealive-skills/tree/main/tools/plugin-bridge#linux)
for ready-to-use unit files.

## Uninstall

```bash theme={null}
cd codealive-skills/tools/plugin-bridge
./uninstall-macos.sh
```

This removes the `launchd` agent. The existing symlink stays in place; delete
it manually if you want to remove it as well:

```bash theme={null}
rm ~/.codex/skills/codealive-context-engine
```

## Troubleshooting

> [accordion] Codex doesn't see the skill after install
>
> Confirm the symlink resolves to a directory that contains `SKILL.md`:
>
> ```bash theme={null}
> ls -la "$(readlink ~/.codex/skills/codealive-context-engine)"
> ```
>
> If the link is dangling, check that the Claude Code plugin is installed
> (`claude plugin list`) and that
> `~/.claude/plugins/cache/codealive-marketplace/codealive/` contains at
> least one version directory.

> [accordion] Symlink didn't update after `claude plugin update`
>
> Inspect the bridge log:
>
> ```bash theme={null}
> tail /tmp/codealive-plugin-bridge.log /tmp/codealive-plugin-bridge.err
> ```
>
> Re-run the updater manually to confirm the logic:
>
> ```bash theme={null}
> bash codealive-skills/tools/plugin-bridge/update-symlink.sh
> ```
>
> If the manual run relinks correctly but the `launchd` agent didn't fire,
> reload it:
>
> ```bash theme={null}
> launchctl bootout "gui/$(id -u)/com.codealive.plugin-bridge" || true
> launchctl bootstrap "gui/$(id -u)" ~/Library/LaunchAgents/com.codealive.plugin-bridge.plist
> ```

> [accordion] launchctl bootstrap fails with 'Input/output error'
>
> Another `launchd` job is already loaded under the same label. Boot it out
> first:
>
> ```bash theme={null}
> launchctl bootout "gui/$(id -u)/com.codealive.plugin-bridge"
> ./install-macos.sh
> ```

> [accordion] Old plugin versions pile up in the cache
>
> `claude plugin update` doesn't delete prior versions. The bridge always
> picks the highest version by `sort -V`, so older directories don't affect
> behaviour. Remove them manually if you want to reclaim disk space:
>
> ```bash theme={null}
> ls ~/.claude/plugins/cache/codealive-marketplace/codealive
> # keep the latest, remove anything older
> ```

> [!TIP]
>
> For general integration issues, see the [Troubleshooting Guide](https://docs.codealive.ai/troubleshooting.md).

## Related resources

> [card] [Claude Code Plugin](https://docs.codealive.ai/integrations/plugin-claude-code.md)
>
> Install the plugin this bridge depends on

> [card] [Agent Skills & Plugins](https://docs.codealive.ai/integrations/skills.md)
>
> Install the skill directly via the universal installer

> [card] [Bridge source](https://github.com/CodeAlive-AI/codealive-skills/tree/main/tools/plugin-bridge)
>
> Scripts, launchd template, and Linux unit files

> [card] [Codex MCP setup](https://docs.codealive.ai/integrations/mcp/codex.md)
>
> Direct tool access for Codex via MCP


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.