While Constellation's MCP server provides raw code intelligence capabilities, this plugin enhances your Codex experience with:
| Feature | Benefit |
|---|---|
| Constellation Skills | $constellation: workflows for common code intelligence tasks |
| Troubleshooting Skill | Targeted diagnostics for auth, indexing, API, and MCP failures |
| Impact Skill | Pre-change blast-radius guidance before refactors, renames, or deletions |
| Hooks | Setup checks, session guidance, and reminders to prefer code_intel over text search for structural queries |
Reusable $constellation: skills for structural analysis and plugin diagnostics. Codex also selects impact, deps, unused, architecture, and troubleshooting on its own when a request matches; status and diagnose run only when you invoke them:
| Skill | Description |
|---|---|
$constellation:get-started |
Set up Constellation: install the CLI, authenticate, initialize, index, and verify |
$constellation:status |
Check API connectivity and project indexing status |
$constellation:diagnose |
Quick health check for connectivity and authentication |
$constellation:impact <symbol> [file] |
Analyze blast radius before changing a symbol |
$constellation:deps <file> [--reverse] |
Map dependencies or find what depends on a file |
$constellation:unused |
Discover orphaned exports and dead code |
$constellation:architecture |
Get a high-level overview of your codebase structure |
$constellation:troubleshooting |
Diagnose Constellation errors, indexing problems, auth issues, and MCP failures |
Event hooks enable intelligent, transparent assistance:
| Hook | Event | Behavior |
|---|---|---|
| Session guidance | SessionStart |
Establishes code_intel as the primary tool for code search and navigation. On startup, tells you when CONSTELLATION_ACCESS_KEY is missing or invalid and points to $constellation:get-started, and tells Codex when the project is not indexed |
| Subagent guidance | SubagentStart |
Gives subagents the same code_intel guidance |
| Symbol search nudge | PostToolUse (Bash) |
When a shell search such as grep or rg looks like a symbol lookup in an indexed project, reminds Codex that code_intel finds definitions and usages across files |
| Freshness note | PostToolUse (Bash) |
After a git command that moves HEAD (commit, pull, checkout, merge, rebase), warns once per HEAD when the index is behind your checkout and suggests constellation index |
| Search augmentation (opt-in) | PostToolUse (Bash, mcp_tool) |
Once you add it, when a shell search looks like a symbol lookup, adds where the symbol is defined and how many usages it has, once per symbol per session |
| Impact notice (opt-in) | PreToolUse (apply_patch|Edit|Write, mcp_tool) |
Once you add it, notes files a patch touches that have many dependents (high or critical risk), with top dependents, used symbols, and test exposure |
| PR impact (opt-in) | PostToolUse (Bash) |
When CONSTELLATION_PR_IMPACT=inform, after a gh pr create whose body has no Impact section, suggests one listing the project's changed files for Codex to add with gh pr edit, once per project and branch |
| Usage tracking | PostToolUse (mcp__constellation__code_intel) |
Records that code_intel was used so nudges stay quiet for that turn, and remembers which commit the index reflects |
All hooks except the setup check require an ak: access key and a constellation.json in the project tree (or, when Codex starts in a folder above several projects, in one of its subdirectories), so they stay silent elsewhere. Nudges are limited per session (3 by default, tracked separately for each subagent). Hooks never send source code to the Constellation API, and their output never includes source code. The two opt-in mcp_tool hooks hand the shell command or the full patch text to the local constellation MCP server process, which keeps it on your machine; only symbol names and project-relative paths reach the API. Hooks fail open if anything goes wrong.
PR impact is off until you set CONSTELLATION_PR_IMPACT. It runs inside the existing PostToolUse Bash hook, so it adds no hook process of its own. It sees a gh pr create only once the command finishes inside Codex's shell yield window (10 seconds by default), so a slow git push && gh pr create chain can miss it. The plugin does not register the search augmentation and impact notice hooks at all, so they cost nothing until you add them yourself (see Opt-in hooks).
The impact notice takes patch paths relative to the directory Codex runs in, so it is accurate when Codex starts at the indexed project root (the directory with constellation.json). Started from a subdirectory, or from a workspace folder above several projects, it stays silent or undercounts.
Hooks are on by default ([features].hooks = false turns them off). After install, and after any plugin update, open /hooks in Codex and re-trust the Constellation hooks, or they will not run.
Search augmentation and the impact notice are mcp_tool hooks: on every matching Bash call or patch, Codex calls the constellation MCP server's code_intel tool in hook mode. The plugin ships them in plugins/constellation/hooks/opt-in-hooks.json but does not load that file. They need an @constellationdev/mcp release with hook mode; on a server without it, and on the first call while the server is still starting, they fail open and show a Failed hook row.
To turn them on:
-
Add them to your user hooks file,
hooks.jsonin your Codex home (~/.codex, or$CODEX_HOMEwhen set).-
If you have no user
hooks.jsonyet, download the shipped file as it is:f="${CODEX_HOME:-$HOME/.codex}/hooks.json" [ -e "$f" ] && echo "$f exists, copy the groups by hand" || curl -fsSL https://raw.githubusercontent.com/ShiftinBits/constellation-codex/main/plugins/constellation/hooks/opt-in-hooks.json -o "$f"
-
If you already have one, copy the
PostToolUsegroup with matcherBash(search augmentation) and thePreToolUsegroup with matcherapply_patch|Edit|Write(impact notice) from the shipped file into the matching event arrays of yours.
Keep only one of the two groups to turn on only that hook. Codex also reads hooks from
[hooks]tables inconfig.toml; keep your user hooks in one of the two places, since Codex warns when a config folder has both. -
-
Start Codex (restart it if it is running), open
/hooks, and trust the new hooks. Codex does not run a user hook until you trust it, and asks again whenever the hook changes. -
After a plugin update, copy the hooks again to pick up fixes; your copy does not update with the plugin.
The symbol search nudge still fires alongside search augmentation; CONSTELLATION_NUDGE_LIMIT=0 turns nudges off. Do not define your own MCP server named constellation in config.toml: the hooks call the server by that name, and yours would take the place of the plugin's.
CONSTELLATION_NUDGE_LIMIT sets how many symbol search nudges Codex gets per session (default 3; 0 disables nudges). Set it in the environment Codex is launched from. Codex plugins have no per-plugin user settings, so environment variables are the settings mechanism.
| Variable | Default | Effect |
|---|---|---|
CONSTELLATION_PR_IMPACT |
off | inform enables the PR impact section |
- Constellation Account (see Constellation)
- Project indexed in Constellation
- Access key configured
Not sure where you are? Run $constellation:get-started for guided setup.
# Add the marketplace to Codex
codex plugin marketplace add ShiftinBits/constellation-codex
# Install the Constellation Codex plugin
codex plugin add constellation@constellation-pluginsYou can also browse and install from the Codex CLI /plugins browser or the ChatGPT desktop app Plugins Directory. The Codex IDE extension does not support plugins.
Optionally let Codex call the Constellation MCP tools without asking each time. Add this to ~/.codex/config.toml:
[plugins."constellation@constellation-plugins".mcp_servers.constellation]
default_tools_approval_mode = "approve"> $constellation:status
Status: Connected
Project: my-awesome-app
Files Indexed: 1,247
Symbols: 8,932
Languages: TypeScript, JavaScript
> $constellation:diagnose
Constellation Health Check
===========================
MCP Server: OK
API Auth: OK
Project: my-awesome-app
Index: 1,247 files, 8,932 symbols
All systems operational.
> $constellation:architecture
Project Summary
- Files: 1,247
- Symbols: 8,932
- Languages: TypeScript, JavaScript
Dependency Hotspots
- src/services
- src/controllers
- src/utils
> $constellation:impact validateUser src/auth/validator.ts
Symbol: validateUser (function)
Risk Level: MEDIUM
Files Affected: 12
Symbols Affected: 34
Impacted Test Files: 3
Recommendations:
- Update unit tests in auth.spec.ts
- Check integration with UserController
> $constellation:unused function
Found 7 orphaned functions:
├── src/utils/legacy.ts
│ ├── formatLegacyDate (line 23)
│ └── parseLegacyConfig (line 45)
├── src/helpers/deprecated.ts
│ └── oldValidation (line 12)
...
> $constellation:deps src/services/payment.service.ts
Dependencies (12):
├── Internal (8)
│ ├── src/models/payment.model.ts
│ ├── src/utils/currency.ts
│ └── ...
└── External (4)
├── stripe
├── lodash
└── ...
No circular dependencies detected.
> $constellation:troubleshooting AUTH_ERROR
Issue: Authentication failed - API key missing or invalid.
Quick Fix: Run `constellation auth` in your shell.
| Issue | Solution |
|---|---|
AUTH_ERROR |
Check CONSTELLATION_ACCESS_KEY is set correctly, then run constellation auth in your shell |
PROJECT_NOT_INDEXED |
Run constellation index --full in your project |
| Skills not appearing | Restart Codex or check plugin path |
Missing key, no constellation.json, or hooks not running |
Run $constellation:get-started |
- Constellation Documentation - Full platform documentation
- MCP Server - Underlying MCP server
- Codex Plugins - Plugin development guide
GNU Affero General Public License v3.0 (AGPL-3.0)
Copyright © 2026 ShiftinBits Inc.
See LICENSE file for details.