Skip to content

Write Codex a skill, not a prompt it stopped reading - #8

Merged
UnbreakableMJ merged 1 commit into
mainfrom
codex-skills
Aug 23, 2026
Merged

Write Codex a skill, not a prompt it stopped reading#8
UnbreakableMJ merged 1 commit into
mainfrom
codex-skills

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Reported: the engram slash command shows up in OpenClaude and Opencode, but not Codex. The cause is a defect in engram, not a configuration problem.

What happened

Codex 0.149 removed ~/.codex/prompts/ entirely. The shipped binary contains no prompts string at all:

$ strings codex | grep -c '^prompts$'
0

The feature moved to skills, discovered as <skills-root>/<name>/SKILL.md. Engram had been writing three prompt files into that directory for a release, and nothing ever loaded them — the harness table had drifted from the harness.

Why ~/.codex/skills, and not a plugin

Codex has two extension routes, and only one is appropriate here:

Route Registration required Verdict
~/.codex/skills/<name>/SKILL.md none — scanned directly ✅ what engram writes
plugin + marketplace ~/.agents/plugins/marketplace.json and an entry in config.toml ❌ mutates two configs engram doesn't own

Only --hooks is allowed to touch a config engram doesn't own, and only opt-in and with a backup. Writing a marketplace entry and an install record just to deliver three commands would break that posture.

CommandSurface::Skill is a new variant

Not a reuse of Plugin { dir }. A plugin wraps its skills in a directory with a manifest; a bare skills root does not. Collapsing them would have written Codex a plugin.json it has no use for.

Skill { dir: ".codex/skills" }    // → .codex/skills/engram-<name>/SKILL.md
Plugin { dir: ".gemini/config/plugins" }  // → plugins/engram/skills/engram-<name>/SKILL.md

The skill body and its name/description frontmatter come from the same shared template as the command files, so the surfaces cannot disagree about what a command does.

Note on this machine

~/.codex/skills here is a symlink chain into the Nix store (→ ~/.agents/skills → ~/.local/state/construct/current → /nix/store/…), so the existing is_nix_managed warning fires and engram declines to write rather than failing. That is the correct behaviour for a declaratively-managed skills root — the skills belong in that bundle, not written underneath it at runtime.

Engram never deletes, so the stale ~/.codex/prompts/engram-*.md files stay put; the CHANGELOG notes they can be removed by hand.

Gates

fmt · clippy -D warnings · 255 tests · REUSE 3.3 · makeinfo clean

🤖 Generated with Claude Code

https://claude.ai/code/session_016i16R4GhdSffsboRYq97Fs

Reported: the engram slash command appears in OpenClaude and Opencode but not
Codex. The cause is a defect in engram, not the user's configuration.

Codex 0.149 removed `~/.codex/prompts/` entirely. The shipped binary contains
no `prompts` string at all; the feature moved to skills, discovered as
`<skills-root>/<name>/SKILL.md`. Engram had been writing three prompt files
into that directory for a release and nothing ever loaded them — the harness
table had drifted from the harness.

Codex's skills root is `~/.codex/skills`, which needs no marketplace entry, no
`config.toml` registration, and no `codex plugin add`. That is why it is the
right target: the alternative route (a personal plugin plus an entry in
`~/.agents/plugins/marketplace.json` plus an install entry in `config.toml`)
would mean mutating two config files engram does not own, which only `--hooks`
is allowed to do, opt-in and with a backup.

`CommandSurface::Skill { dir }` is a new variant rather than a reuse of
`Plugin { dir }`: a plugin wraps its skills in a directory with a manifest,
a bare skills root does not, and collapsing the two would have written Codex a
manifest it has no use for.

Engram never deletes, so the stale `~/.codex/prompts/engram-*.md` files stay
where they are; the CHANGELOG says they can be removed by hand.

Gates: fmt, clippy -D warnings, 255 tests, REUSE 3.3, makeinfo clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016i16R4GhdSffsboRYq97Fs
@UnbreakableMJ
UnbreakableMJ merged commit 37a77e7 into main Aug 23, 2026
5 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the codex-skills branch August 23, 2026 23:41

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

Copy link
Copy Markdown

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: 7c69ba7baf

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/install.rs

let body = match spec.command_surface {
CommandSurface::Plugin { .. } => {
CommandSurface::Plugin { .. } | CommandSurface::Skill { .. } => {

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 Quote descriptions before emitting Codex skill YAML

When installing engram-save-chat for Codex, this new arm routes the template through render_skill, which emits its description without YAML escaping. That template contains description: Save this conversation: capture ...; the colon followed by a space makes the generated SKILL.md invalid YAML, so Codex cannot load the primary save-chat skill. Serialize or quote the description rather than interpolating it as a plain scalar.

AGENTS.md reference: AGENTS.md:L274-L275

Useful? React with 👍 / 👎.

Comment thread src/harness.rs
Comment on lines +204 to +205
command_surface: CommandSurface::Skill {
dir: ".codex/skills",

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 Update the bundled install guide for the skill migration

This switch leaves plugins/engram/README.md lines 32–47 directing Codex users to ~/.codex/prompts/ and explicitly stating that engram never ships skills because skill directories are unwritable. Those instructions are now the opposite of the installer behavior and will mislead users following the source-tree installation and Nix guidance; update that guide alongside the path change.

Useful? React with 👍 / 👎.

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.

1 participant