creating-zed-extensions

creating-zed-extensions is a skill for Claude Code, Codex from pr-pm/prpm. It costs 52 tokens per session (2,813 once invoked), scanned C, original, MIT.

A guide for building Zed extensions, which are Rust programs that add features to the Zed code editor. These features can include slash commands, language support, themes, and connections to external tools.

In plain words
What is it for?
It helps create Assistant commands such as /deploy or /analyze, add syntax support and formatting, build themes, and connect Zed to MCP servers or other tools.
Why use it?
It explains the required project structure and development process, reducing confusion when starting or compiling a Zed extension.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pr-pm/prpm/creating-zed-extensions
Any agent
npx skills add pr-pm/prpm --skill creating-zed-extensions
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for creating-zed-extensions

README.md
[![agentmods](https://agentmods.dev/badge/skills/pr-pm/prpm/creating-zed-extensions.svg)](https://agentmods.dev/skills/pr-pm/prpm/creating-zed-extensions)
Your own site
<a href="https://agentmods.dev/skills/pr-pm/prpm/creating-zed-extensions"><img src="https://agentmods.dev/badge/skills/pr-pm/prpm/creating-zed-extensions.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,813 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.02813
Opus 5 $0.00026 $0.01406
Sonnet 5 $0.00010 $0.00563
Haiku 4.5 $0.00005 $0.00281

Measured 4d ago against content hash 6dcdb30ba517, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

creating-zed-extensions scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

let output = Command::new("curl")
.claude/skills/creating-zed-extensions/SKILL.md · 457 lines

How it starts

The opening of the file, as written. The whole thing — 457 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Zed Extensions

Overview

Zed extensions are Rust programs compiled to WebAssembly that can provide slash commands, language support, themes, grammars, and MCP servers. Extensions implement the zed::Extension trait and are distributed via Zed's extension registry.

When to Use

Create a Zed extension when:

  • Adding custom slash commands to the Assistant (/deploy, /analyze, /fetch-docs)
  • Providing language support (syntax highlighting, LSP, formatting)
  • Creating custom color themes
  • Integrating external tools via slash commands
  • Providing MCP server integrations

Don't create for:

  • Simple rules or instructions (use .rules files)
  • One-time scripts (use terminal)
  • Project-specific configuration (use .zed/settings.json)

Quick Reference

Extension Structure

my-extension/
├── Cargo.toml              # Rust manifest
├── extension.toml          # Extension metadata
└── src/
    └── lib.rs             # Extension implementation

Minimal Slash Command Extension

# extension.toml
id = "my-commands"
name = "My Commands"
version = "0.1.0"
authors = ["Your Name"]
repository = "https://github.com/username/my-commands"
license = "MIT"

[slash_commands.echo]
description = "echoes the provided input"
requires_argument = true

[slash_commands.greet]
description = "greets the user"
requires_argument = false
// src/lib.rs
use zed_extension_api::{self as zed, Result, SlashCommand, SlashCommandOutput};

struct MyExtension;

impl zed::Extension for MyExtension {
    fn run_slash_command(
        &self,
        command: SlashCommand,
        args: Vec<String>,
        _worktree: Option<&zed::Worktree>,
    ) -> Result<SlashCommandOutput> {
        match command.name.as_str() {
            "echo" => {
                if args.is_empty() {
                    return Err("echo requires an argument".to_string());
                }
                Ok(SlashCommandOutput {
                    text: args.join(" "),
                    sections: vec![],
                })
            }
            "greet" => {
                Ok(SlashCommandOutput {
                    text: "Hello! How can I help you today?".to_string(),
                    sections: vec![],
                })
            }
            _ => Err(format!("Unknown command: {}", command.name)),
        }
    }
}

zed::register_extension!(MyExtension);

Read the full file on GitHub · 457 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 457 lines · 52 tokens per session scan C 6dcdb30ba517

Subscribe to this mod's changes

creating-zed-extensions is a skill published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 2,813 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.