zed-workflow

star 1

Configure Zed and run a Codex-friendly change review workflow with manifest-first and git-diff fallback.

zmanian By zmanian schedule Updated 2/14/2026

name: zed-workflow description: Configure Zed and run a Codex-friendly change review workflow with manifest-first and git-diff fallback.

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)

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

  1. Read existing config before writing.
  2. Keep JSON valid (Zed does not support JSON comments).
  3. Preserve structure:
  • keymap.json and tasks.json are arrays
  • settings.json is an object
  1. Merge, do not clobber existing user configuration.
  2. 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:

  1. Manifest mode: open files from ~/.claude/changes/latest.json if present.
  2. 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.sh runs this sync script automatically before opening files.
  • Zed task Sync Codex Change Manifest can be run manually when needed.

Setup

  1. Install the script:
chmod +x scripts/review-agent-changes.sh
  1. Add the example tasks from examples/tasks.json into Zed global tasks.

  2. Optional: merge examples/keymap.json and examples/settings.json.

Troubleshooting

  • If zed is missing, install CLI from Zed app menu and verify which zed.
  • If no files open, check manifest existence and git status.
  • If task fails in Zed, run script directly in terminal to inspect stderr.
Install via CLI
npx skills add https://github.com/zmanian/zed-workflow-codex --skill zed-workflow
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator