Zed (zed)
Set up this tool
Zed reads .rules, .agents/skills/, .zed/settings.json MCP servers, and optional tasks.
Set outputs.zed.agents: skill to write agents as on-demand skills; see agents as skills.
First rule
Install the client using the official setup guide, then open your project in it.
Select zed in agnostic-ai.yaml, then follow First rule to add the shared commit-prefix rule and sync it. With the default paths, it reaches .rules.
Hooks become optional Zed Tasks. They do not provide general before-tool enforcement.
For existing files, check what import zed reads before syncing.
Verify
Run agnostic-ai sync --check and inspect .rules for the commit-prefix rule. Open the project in Zed and ask for a commit subject for a small fix; it should use fix:.
Next, add a skill.
Output
.rules # canonical entry-point pointer body + inlined rules (written by sync)
.agents/skills/<name>/SKILL.md # one folder per skill (shared tree)
.zed/settings.json # when MCP entries exist (merged with existing user config)
.zed/tasks.json # one task per hook, only when tasks-file is set
Native mappings
Field mappings, discovery, and compatibility
- Rules: Zed 1.4.2 retired its rules library, so
syncwrites the instructions that point to source specs and a marked## Rulesblock to.rules.- Zed reads the first matching file of
.rules,.cursorrules,.windsurfrules,.clinerules,.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,GEMINI.md. Nothing agnostic-ai writes ranks above.rules.AGENTS.mdranks below Copilot's file that only points to source specs. With copilot enabled, rules inAGENTS.mdnever reach Zed. - Zed calls
AGENTS.mdprimary and.rulesa compatibility file. If Zed drops.rules, the rules move back toAGENTS.md. - For older Zed,
outputs.zed.rules-file: .rulesreplaces the instructions that point to source specs with the legacy single document (agent bodies included).
- Zed reads the first matching file of
- Skills: Zed skills. Identical files are written once. Sync reports
x-zedoverrides that make two copies differ.disable-model-invocation: trueis written toSKILL.md. Zed then hides the skill from the agent's catalog, and it still runs as a slash command or @-mention (Zed skills). So each command reaches Zed as a skill the user runs by name (tools without commands). When another target also writes the skills folder, the files must match, so the field is dropped with a note and commands are skipped. Anx-zed.disable-model-invocationvalue wins.- A separate
outputs.zed.skills-dirkeeps the output apart during sync, but does not add a native search path. Zed loads skills only as direct children of~/.agents/skills/or<worktree>/.agents/skills/. To use another backing folder, expose it through a symlink at a documented root; sync does not create the link. - Names must be 1-64 lowercase letters or digits, with single hyphens between segments. Sync fails on names such as
Deploy,my_skill, andmy--skilland states the format. It does not rename them.
- Agents: Zed has no per-agent support. Sync reports this unless
outputs.zed.rules-fileis set (the single document includes agent sections). - MCP: servers go under
context_servers(notmcpServers): flatcommand/args/envfor stdio,url/headersfor remote (HTTP / SSE). Your other keys (theme, buffer_font_size) stay.disabled: truebecomesenabled: false. Enabled servers get no key, because Zed defaults to true. Seedisabledsupport by target.- Set
timeout(both transports; seconds per tool call, default 60),oauth(HTTP), andremote(stdio and extension servers) throughx-zed. No other tool has them.
- Hooks: with
outputs.zed.tasks-fileset, hooks become Zed Tasks runningsh -c "<hook command>".WorktreeCreatewriteshooks: ["create_worktree"], so the task runs after Zed creates a linked worktree. Import restores it. Other tasks import asOnDemand(command palette).- Sync controls
label,command,args, andhooks(addingcreate_worktreekeeps other hook names).x-zedsets other fields, such ascwd,env,shell,reveal,hide,save,allow_concurrent_runs,use_new_terminal,tags, andreevaluate_context.
Source for the MCP keys
Zed's MCP docs do not name the enabled toggle. Zed's settings source, crates/settings_content/src/project.rs, defines it, plus timeout, oauth, and remote.
Config keys
| Key | Default | Notes |
|---|---|---|
outputs.zed.skills-dir | .agents/skills | |
outputs.zed.agents | unset (agents are dropped) | skill writes each agent as an on-demand skill. Sync keeps it off with a note while another tool with subagents writes the same skills folder; see agents as skills |
outputs.zed.mcp-file | .zed/settings.json | |
outputs.zed.tasks-file | empty | opt-in |
outputs.zed.rules-file | unset | writes the legacy single document and skips the write of instructions that point to source specs, so pointing it at .rules replaces the pointer file instead of clashing with it |
Global instructions
agnostic-ai sync --global --only zed writes home instructions and rules to Zed's personal instruction file. See the global output table for each platform's path. Skills still use ~/.agents/skills/.
Zed uses ~/.config/zed/AGENTS.md on macOS, ignoring XDG_CONFIG_HOME. On Linux and FreeBSD, it uses $FLATPAK_XDG_CONFIG_HOME/zed/AGENTS.md when that variable is present, then $XDG_CONFIG_HOME/zed/AGENTS.md or ~/.config/zed/AGENTS.md. Windows uses %APPDATA%\Zed\AGENTS.md. These roots follow Zed's native path selection. An empty or relative Flatpak root is rejected to avoid writing under the working directory.
The first sync after a path correction clears the managed block from the old XDG file only when the ledger records it. Personal text and private permissions remain. A link to the active file is retained. An old file not recorded by sync stays untouched. explain --global rules/<name>.md shows the current native file. Global instruction import is not supported; project import zed keeps its existing paths below.
Import
agnostic-ai import zed reads .rules, .zed/tasks.json (as hook specs), and MCP servers from .zed/settings.json. It copies .agents/skills/<name>/SKILL.md with all bundled files.
Protected paths
Not enforced. This target takes no settings specs, so sync reports a spec with a protected block as unsupported. See protected-path alternatives.