Zed Workflow for Codex
Use this skill when the user wants to configure Zed (settings, keymap, tasks), automate editor workflows, or review agent-made changes in Zed before commit.
What This Combines
- •Zed editor configuration patterns from the Claude
zed-skill - •Codex pre-commit behavior: ask before commit, offer Zed review first
- •A robust review launcher that works with:
- •Claude-style change manifests (
~/.claude/changes/latest.json), or - •plain git diff fallback (for Codex/local edits)
- •Claude-style change manifests (
Paths
Detect OS first (uname) and use:
- •macOS:
- •
~/Library/Application Support/Zed/settings.json - •
~/Library/Application Support/Zed/keymap.json - •
~/Library/Application Support/Zed/tasks.json
- •
- •Linux:
- •
~/.config/zed/settings.json - •
~/.config/zed/keymap.json - •
~/.config/zed/tasks.json
- •
- •Project overrides:
- •
<repo>/.zed/settings.json - •
<repo>/.zed/tasks.json
- •
Core Rules
- •Read existing config before writing.
- •Keep JSON valid (Zed does not support JSON comments).
- •Preserve structure:
- •
keymap.jsonandtasks.jsonare arrays - •
settings.jsonis an object
- •Merge, do not clobber existing user configuration.
- •Validate JSON after edits.
workspace::SendKeystrokes Guidance
Use it for synchronous command chaining only:
"alt-w": ["workspace::SendKeystrokes", "cmd-c escape"]
Do not chain actions that require async completion (file opens, palette search resolution, LSP responses).
Codex Pre-Commit Review Gate
Before creating any commit, ask:
Want to review these changes in Zed first?
If yes, run the Zed review task from command palette:
- •
cmd-shift-p - •
task: spawn - •
Review Agent Changes
Review Workflow
This skill uses scripts/review-agent-changes.sh.
It attempts, in order:
- •Manifest mode: open files from
~/.claude/changes/latest.jsonif present. - •Git mode: open changed files from
git diff+git diff --cached+ untracked files.
Output is <file>:<line> entries passed to zed.
Codex Edit Hook Shim
Codex currently does not expose a documented PostToolUse hook key in ~/.codex/config.toml.
To provide equivalent behavior, this skill includes scripts/sync-codex-manifest.sh, which creates/updates ~/.codex/changes/latest.json from current git changes.
- •
review-agent-changes.shruns this sync script automatically before opening files. - •Zed task
Sync Codex Change Manifestcan be run manually when needed.
Setup
- •Install the script:
chmod +x scripts/review-agent-changes.sh
- •
Add the example tasks from
examples/tasks.jsoninto Zed global tasks. - •
Optional: merge
examples/keymap.jsonandexamples/settings.json.
Troubleshooting
- •If
zedis missing, install CLI from Zed app menu and verifywhich zed. - •If no files open, check manifest existence and git status.
- •If task fails in Zed, run script directly in terminal to inspect stderr.