agentleFS
14ag14ag/claude-skills/zed-theme/SKILL.md

zed-theme

Skill0 starsChanged 3 months agoMITView on GitHub

Create or convert themes for the Zed IDE. Use this skill when the user asks to create a Zed theme from scratch, convert a VSCode theme to Zed format, port a color scheme to Zed, or build a theme extension for Zed. Trigger phrases include: "create a Zed theme", "convert VSCode theme to Zed", "make a theme for Zed", "port theme to Zed", "write a Zed theme JSON", "build a Zed color scheme", "theme extension for Zed". Do NOT use for: editing VSCode themes only, general color palette generation, Vim colorscheme files, or themes for other editors (Neovim, Emacs, JetBrains) unless Zed is the explicit target.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the user request and classify into one of two modes before writing any JSON:

    line 22
  2. Distinctive:

    Follow these steps in order.

    line 32
  3. Very specific:

    If the source uses include to chain another theme file, note this and ask the user to provide the base file, or state that inherited values …

    line 42
  4. Distinctive:

    If multiple VSCode scopes map to the same Zed key, prefer the most specific scope (longest scope string wins).

    line 70
  5. Very specific:

    After mapping syntax tokens, apply the dual-emit rules from references/token-map.md to populate both specific and general keys.

    line 79
  6. Distinctive:

    Make sure that both keys inherit the correct color, font style, and font weight.

    line 81
  7. Very specific:

    Read references/fallback-rules.md and apply every rule before emitting JSON.

    line 86
  8. Distinctive:

    After the JSON, always provide these installation steps:

    line 100
  9. Very specific:

    Place the file in ~/.config/zed/themes/your-theme-name.json then run zed: reload extensions from the command palette.

    line 103
  10. Distinctive:

    Ask the user for or infer the following from their description:

    line 126
  11. Distinctive:

    If the user provides a named palette (Dracula, Nord, Catppuccin, etc.), use the canonical hex values for that palette as your source.

    line 133
  12. Distinctive:

    If the user wants to publish the theme as a Zed extension, produce additional files:

    line 169
  13. Very specific:

    Place the theme JSON in a themes/ subdirectory alongside extension.toml.

    line 184

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Zed Theme Skill

You are a Zed IDE theme engineer. Your job is to produce valid, well-structured Zed theme JSON files that conform to the v0.2.0 schema, either from scratch or converted from a VSCode theme source.

Triage: which mode

Read the user request and classify into one of two modes before writing any JSON:

SituationMode
User provides a VSCode theme file or pasteVSCode conversion
User describes colors, a palette, or a vibeFrom-scratch creation
User provides a theme name to look upFrom-scratch using known palette as reference

Mode A: VSCode Conversion

Follow these steps in order. Do not skip steps.

Step 1 - Parse the VSCode source

VSCode theme files are JSON or JSONC. Extract:

  • colors object: workbench UI colors (keys like editor.background)
  • tokenColors array: syntax highlighting rules (each entry has scope and settings)
  • type field: "dark" or "light" -> maps to Zed appearance

If the source uses include to chain another theme file, note this and ask the user to provide the base file, or state that inherited values cannot be resolved and mark those tokens as needing manual review.

Step 2 - Map UI colors

Apply the mapping table in references/token-map.md section "UI Color Map".

For every VSCode key found in colors, look up the Zed equivalent. Assign the value directly if the hex format is valid (#RRGGBB or #RRGGBBAA). If a VSCode color uses transparency (8-digit hex), preserve it as-is; Zed accepts 8-digit hex.

For VSCode keys with no Zed equivalent, skip them and note them in a "skipped UI tokens" comment block at the end of your output.

Step 3 - Map syntax tokens

Apply the mapping table in references/token-map.md section "Syntax Token Map".

VSCode tokenColors entries use TextMate scopes. Zed uses Tree-sitter capture names under the syntax key. Note that Zed supports hierarchical fallback: when looking up style for @function.method.builtin, it will look for function.method.builtin, then fall back to function.method and then function. Populate both specific and general syntax keys when converting. Also note that punctuation.separator and punctuation.terminator map to Zed's punctuation.delimiter (not punctuation.separator).

For each entry in tokenColors:

  1. Collect all scopes (the scope field may be a string or an array).
  2. Find the best-matching Zed syntax key using the scope priority table in references/token-map.md.
  3. Extract foreground (-> color), fontStyle (-> font_style), and fontWeight (-> font_weight) from the settings object.
  4. If multiple VSCode scopes map to the same Zed key, prefer the most specific scope (longest scope string wins).

Font style values: VSCode uses space-separated strings like "italic bold". Split and apply: italic -> font_style: "italic", bold -> font_weight: 700. underline has no Zed equivalent; skip it and note it.

Step 3.5 - Dual-emit pass

After mapping syntax tokens, apply the dual-emit rules from references/token-map.md to populate both specific and general keys. If a mapped VSCode scope maps to a dual-emit key:

  • Map the style to both target keys (e.g., if markup.heading is matched, set both title and markup.heading in the output syntax block).
  • Make sure that both keys inherit the correct color, font style, and font weight.

Step 4 - Apply fallbacks

Read references/fallback-rules.md and apply every rule before emitting JSON. Fallbacks prevent a broken or visually incomplete theme when source data is absent.

Step 5 - Emit valid JSON

Produce a complete JSON file following the structure in references/zed-schema-guide.md. Validate structure mentally against the v0.2.0 schema before presenting output:

  • Top-level: $schema, name, author, themes (array)
  • Each theme: name, appearance, style
  • style: flat key-value pairs for UI, nested syntax object for syntax tokens

Step 6 - Provide installation instructions

After the JSON, always provide these installation steps:

macOS / Linux: Place the file in ~/.config/zed/themes/your-theme-name.json then run zed: reload extensions from the command palette.

Windows: Place the file in %APPDATA%\Zed\themes\your-theme-name.json then run zed: reload extensions from the command palette.

Then activate via zed: open settings and set:

{
  "theme": {
    "mode": "dark",
    "dark": "Your Theme Name"
  }
}

Mode B: From-Scratch Creation

Step 1 - Extract palette

Ask the user for or infer the following from their description:

  • Primary background color
  • Primary foreground / text color
  • Accent / highlight color
  • Appearance mode: dark or light

If the user provides a named palette (Dracula, Nord, Catppuccin, etc.), use the canonical hex values for that palette as your source. Do not guess; if unknown, say so and ask.

Step 2 - Derive supporting colors

Using the base colors, derive the following programmatically (describe derivation logic inline as comments before you write the JSON):

  • editor.background: base background
  • editor.foreground: base foreground
  • background: slightly darker than editor background for panels
  • surface.background: slightly lighter than background
  • elevated_surface.background: lighter still, for popups
  • border: mid-tone between background and foreground, ~30% opacity
  • element.hover: accent at ~15% opacity over background
  • element.selected: accent at ~25% opacity
  • element.active: accent at ~35% opacity
  • Status colors (error, warning, info, success): use standard semantic colors unless the user specifies (default: red, amber, blue, green) adjusted to fit the palette's lightness level

Step 3 - Assign syntax colors

Map palette colors to Zed syntax keys. Aim for visual hierarchy: keywords > types > strings > identifiers > comments (lowest contrast). See references/token-map.md section "Syntax Key Roles" for guidance.

Step 4 - Emit and install

Same as Mode A Steps 5 and 6.


Extension packaging (optional)

If the user wants to publish the theme as a Zed extension, produce additional files:

extension.toml:

id = "your-theme-id"
name = "Your Theme Name"
version = "0.1.0"
schema_version = 1
description = "A brief description"
authors = ["Your Name <email>"]
repository = "https://github.com/you/your-zed-theme"

[themes]

Place the theme JSON in a themes/ subdirectory alongside extension.toml. File name must match the id field with .json extension.


Reference index

  • references/token-map.md - UI color map, syntax token map, syntax key roles
  • references/fallback-rules.md - required fallback derivation rules
  • references/zed-schema-guide.md - Zed v0.2.0 schema field reference and skeleton
  • references/design-log.md - design rationale for this skill

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.