Add Zed host support (--host zed)#1785
Open
jeffwitters wants to merge 3 commits into
Open
Conversation
Installs gstack skills to ~/.agents/skills/gstack, matching Zed's global skill directory convention per https://zed.dev/docs/ai/skills. - globalRoot / localSkillRoot: .agents/skills/gstack - hostSubdir: .agents - frontmatter allowlist: name + description (1024 char limit, truncate) - pathRewrites: .claude/skills → .agents/skills - skipSkills: codex (Claude Code-specific) - suppressedResolvers: GBRAIN_CONTEXT_LOAD, GBRAIN_SAVE_RESULTS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 'zed' to the validation allowlist (was failing with unknown host error) - Add INSTALL_ZED=0 flag and elif branch - Auto-detect zed in --host auto mode - Add install block that generates .zed/skills/ via gen:skill-docs, then copies to ~/.agents/skills/ (Zed's global skill directory) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Zed enforces a hard 100KB ceiling on SKILL.md files (MAX_SKILL_FILE_SIZE in crates/agent_skills/agent_skills.rs). Seven gstack skills exceed this: ship (168KB), plan-ceo-review (132KB), office-hours (112KB), plan-design-review (108KB), plan-devex-review (106KB), spec (104KB), plan-eng-review (103KB). Changes: - host-config.ts: add optional `maxFileBytes` field to HostConfig - gen-skill-docs.ts: add truncateToMaxBytes() helper; call it in processTemplate() after the generated header is inserted (so header bytes are included in the budget). Truncates at last complete line that fits, appends a one-line notice pointing to the full Claude skill. - hosts/zed.ts: set maxFileBytes: 100 * 1024 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Zed as a supported host (
--host zed), including:hosts/zed.ts— host config targeting~/.agents/skills/gstackhosts/index.ts— registerszedin the host registrysetup— wires up--host zedthrough the validation allowlist, install flags, auto-detection, and install blockscripts/host-config.ts— new optionalmaxFileBytesfield onHostConfigscripts/gen-skill-docs.ts—truncateToMaxBytes()helper called after header insertionDetails
Zed uses the same
SKILL.mdformat as gstack, so skills translate cleanly.globalRoot.agents/skills/gstack~/.agents/skills/localSkillRoot.agents/skills/gstack<worktree>/.agents/skills/hostSubdir.zed.agents)frontmattername+descriptiondescriptionLimitmaxFileBytes100 * 1024MAX_SKILL_FILE_SIZEincrates/agent_skills)skipSkillscodexsuppressedResolversGBRAIN_CONTEXT_LOAD,GBRAIN_SAVE_RESULTS100KB file size limit
Zed rejects any
SKILL.mdover 100KB. Seven gstack skills exceed this limit (ship 168KB, plan-ceo-review 132KB, office-hours 112KB, plan-design-review 108KB, plan-devex-review 106KB, spec 104KB, plan-eng-review 103KB).Rather than skipping these skills entirely, this PR introduces a
maxFileBytesfield onHostConfig. When set,truncateToMaxBytes()is called inprocessTemplate()after the generated header is inserted (so header bytes count toward the budget). It trims the body at the last complete line that fits and appends a one-line notice pointing to the full skill in the source tree.Install
Skills install to
~/.agents/skills/. Auto-detection via--host autoalso picks up Zed if thezedbinary is on$PATH.Test plan
./setup --host zedcreates skills under~/.agents/skills/SKILL.mdcontains onlynameanddescriptionfrontmatter fields~/.agents/skills/gstacknot~/.claude/skills/gstackcodexskill is excluded from generated output--host autoinstalls for Zed whenzedis on$PATH