Communitygithub.com

G1Joshi/Agent-Skills

Zed 編輯器專業協助,涵蓋高效能 Rust 文字編輯、多緩衝區編輯、語言伺服器協定 (LSP) 及 AI 助手整合。適用於設定 Zed 的 settings.json、建置語言擴充、即時協作或最佳化編輯器啟動速度。

Agent-Skills 是什麼?

這個技能為開發者提供完整的 Zed 編輯器使用指引,Zed 是一款由 Atom 創作者打造、使用 Rust 和 GPU 加速的高效能編輯器。技能重點介紹 2025 年的 Zeta(開放模型 AI)與 ACP(代理客戶端協定),並涵蓋即時多人協作、原生 LLM 助手、以及 Tree-sitter / LSP 多語言開發等核心功能。透過詳細的 settings.json 與 keymap.json 設定範例,使用者可配置字型、格式化工具、LSP 語言伺服器及 AI 整合,實現次毫秒級打字延遲與流暢的 120 FPS 渲染。技能亦提供多緩衝區搜尋取代、自訂語言伺服器設定、以及 Vim 模式等常見模式,並包含 2026 年最佳實務(如使用 vtsls 提升 TypeScript 效能)與常見問題排解。

相容平台✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/G1Joshi/Agent-Skills/tree/HEAD/skills/tools/zed

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Zed

Zed 是由 Atom 創作者打造的高效能編輯器,以 Rust 建構並搭配 GPU 加速 UI。2025 年迎來 Zeta(開放模型 AI)與 ACP(代理客戶端協定)。

使用時機

  • 高效能 Rust 工程程式碼編輯:次毫秒級打字延遲、即時檔案開啟、流暢的 120 FPS 渲染。
  • 即時多人配對程式設計:直接在編輯器緩衝區中協作,支援語音聊天與共享游標工作階段。
  • 整合語言模型 (LLM) 助手:原生產生程式碼、重構函式、查詢程式碼庫上下文。
  • 現代 Tree-sitter 與 LSP 多語言開發:開箱即用支援 Rust、TypeScript、Python 與 Go。

快速入門

1. 最小化 ~/.config/zed/settings.json

{
  "theme": "One Dark",
  "buffer_font_family": "JetBrains Mono",
  "buffer_font_size": 14,
  "tab_size": 2,
  "hard_tabs": false,
  "format_on_save": "on",
  "formatter": "auto",
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "checkOnSave": { "command": "clippy" }
      }
    }
  }
}

2. 核心快捷鍵

  • Cmd + P:檔案搜尋器
  • Cmd + Shift + P:指令面板
  • Cmd + Shift + F:專案搜尋
  • Cmd + ?:切換 AI 助手面板

核心概念

生產級 Zed 設定 (~/.config/zed/settings.json)

設定字型、格式化工具、LSP 語言伺服器與 AI 整合:

{
  "theme": "One Dark",
  "ui_font_size": 15,
  "buffer_font_size": 14,
  "buffer_font_family": "JetBrains Mono",
  "autosave": "on_focus_change",
  "format_on_save": "on",
  "tab_size": 2,
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },
  "languages": {
    "TypeScript": {
      "language_servers": ["vtsls", "!typescript-language-server"],
      "formatter": {
        "external": {
          "command": "prettier",
          "arguments": ["--stdin-filepath", "{buffer_path}"]
        }
      }
    },
    "Rust": {
      "language_servers": ["rust-analyzer"]
    },
    "Python": {
      "language_servers": ["pyright", "ruff"]
    }
  },
  "assistant": {
    "default_model": {
      "provider": "anthropic",
      "model": "claude-3-5-sonnet"
    }
  }
}

自訂 Modal 與 Vim 按鍵綁定 (~/.config/zed/keymap.json)

自訂按鍵映射以實現高速導覽:

[
  {
    "context": "Editor && vim_mode == normal",
    "bindings": {
      "space f f": "file_finder::Toggle",
      "space f g": "pane::DeploySearch",
      "space b d": "pane::CloseActiveItem",
      "space c a": "editor::ToggleCodeActions",
      "g d": "editor::GoToDefinition",
      "g r": "editor::FindAllReferences"
    }
  }
]

即時多人協作

  • 點擊右上角視窗標題列的 Collaborate 圖示。
  • 分享您的聊天室連結或透過 GitHub 使用者名稱邀請團隊成員。
  • 團隊成員可共享編輯器檢視、跟隨游標,並同時編輯程式碼,無螢幕分享延遲。

常見模式

多緩衝區專案搜尋與取代

問題:在整個程式碼庫中搜尋並在單一統一緩衝區中同時編輯結果。 解決方案:開啟多緩衝區編輯器。

  1. 按下 Cmd + Shift + F 開啟專案搜尋。
  2. 輸入搜尋詞彙並按下 Enter。
  3. 按下 Option + Enter 將所有符合結果展開為可編輯的多緩衝區。
  4. 在跨多個檔案的位置編輯程式碼,然後儲存 (Cmd + S) 以寫入所有檔案。

在 Zed 中設定自訂語言伺服器

問題:在 Zed 中設定特定語言伺服器引數與格式化工具。 解決方案:在 settings.json 中定義伺服器設定。

{
  "languages": {
    "Python": {
      "language_servers": ["pyright", "ruff"],
      "format_on_save": "on",
      "formatter": {
        "external": {
          "command": "ruff",
          "arguments": ["format", "--stdin-filename", "{buffer_path}"]
        }
      }
    }
  }
}

最佳實務 (2026)

  • 務必設定 format_on_save: "on" 並搭配外部工具(Prettier、Ruff、Rustfmt)以自動保持程式碼整潔。
  • 務必在 Zed 中使用 vtsls 進行 TypeScript 開發,以獲得優異效能與記憶體效率。
  • 務必啟用 Vim 模式 ("vim_mode": true),如果您習慣使用 Modal 編輯工作流程。
  • 務必善用內建助手面板 (Cmd + ?) 與程式碼庫上下文進行快速重構。
  • 切勿讓專案資料夾包含未排除的建置快取(target、dist、.next)。
  • 切勿在 settings.json 中硬編碼私有 API 金鑰;應使用系統金鑰鏈或環境變數。
  • 切勿在編輯敏感性生產設定檔時,讓協作聊天室保持開放並設定為公開。

問題排解

錯誤 / 症狀原因解決方案
語言伺服器無法初始化伺服器二進位檔(例如 gopls、pyright)在系統 $PATH 中找不到全域安裝伺服器二進位檔,或確保其可在使用者 Shell 環境中存取。
按鍵綁定與系統快捷鍵衝突Mac 系統鍵盤快捷鍵攔截了 Zed 按鍵輸入檢查 ~/.config/zed/keymap.json 中的按鍵映射覆蓋設定。
Zed AI 助手無法回應缺少 API 金鑰(OpenAI / Anthropic)或配額用盡開啟 Zed 設定並配置 "features": { "edit_prediction_provider": "copilot" },或提供 API 金鑰。

參考資料

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

G1Joshi/Agent-Skills

Expert Dask distributed computing assistance covering Dask DataFrames, Arrays, Futures, and cluster scaling. Use when analyzing datasets too large for pandas on a single machine or multi-node cluster.

G1Joshi/Agent-Skills

Expert dbt (data build tool) assistance covering SQL modeling, Jinja macros, tests, documentation, and semantic layer. Use when building analytics engineering pipelines on BigQuery, Snowflake, or PostgreSQL.

G1Joshi/Agent-Skills

Expert JAX assistance covering Autograd, XLA compilation (`jit`), vectorization (`vmap`), and parallelization (`pmap`). Use when building high-performance numerical computing and cutting-edge deep learning research.

G1Joshi/Agent-Skills

Expert Ray distributed computing assistance covering Ray Core (actors, tasks), Ray Train, Ray Tune, and Ray Serve. Use when scaling Python compute and ML training across multi-node clusters.

G1Joshi/Agent-Skills

Expert Git version control assistance covering branching, interactive rebase, cherry-pick, submodules, worktrees, and conflict resolution. Use when managing source code history and collaboration workflows.

G1Joshi/Agent-Skills

Expert K9s CLI assistance covering terminal Kubernetes cluster navigation, real-time log streaming, port forwarding, and pod debugging. Use when managing and troubleshooting Kubernetes clusters with speed.

G1Joshi/Agent-Skills

Expert SWC assistance covering high-performance Rust-based JavaScript/TypeScript compilation, .swcrc configuration, Jest testing via @swc/jest, and minification. Use when replacing Babel with SWC for faster builds, accelerating test execution, or compiling modern ECMAScript features.

G1Joshi/Agent-Skills

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

G1Joshi/Agent-Skills

Expert Vim assistance covering modal editing, .vimrc configuration, registers, macros, search/replace, and plugin management via vim-plug. Use when editing text efficiently in terminal environments, writing Vimscript, recording macros, or configuring core Vim settings.

G1Joshi/Agent-Skills

Expert Zsh assistance covering shell customization, Oh My Zsh plugins, Zinit plugin manager, prompt engineering (Starship/Powerlevel10k), and shell scripting. Use when configuring .zshrc, writing Zsh automation scripts, optimizing shell startup time, or configuring tab-completion.

G1Joshi/Agent-Skills

Expert [skill-name] assistance covering [feature 1], [feature 2], and [feature 3]. Use when [working with X], [debugging Y], or [implementing Z].

相關技能