/ 目录 / 演练场 / WebGPU Claude Skill
● 社区 dgreenheck ⚡ 即开即用

WebGPU Claude Skill

作者 dgreenheck · dgreenheck/webgpu-claude-skill

用 Claude 快速搭建 WebGPU + Three.js 项目——样板代码、shader 模式、性能检查,全部封装在一个 skill 里。

WebGPU 足够新,Claude 经常会产生 API 幻觉。这个 skill 为其提供接地:可运行的 Three.js + WebGPU 脚手架、常用 shader 模式、浏览器性能启发式规则。

为什么要用

核心特性

实时演示

实际使用效果

就绪

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "webgpu-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/dgreenheck/webgpu-claude-skill"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "webgpu-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/dgreenheck/webgpu-claude-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "webgpu-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/dgreenheck/webgpu-claude-skill"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "webgpu-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/dgreenheck/webgpu-claude-skill"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "webgpu-claude-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/dgreenheck/webgpu-claude-skill"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "webgpu-claude-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/dgreenheck/webgpu-claude-skill"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add webgpu-claude-skill -- git clone https://github.com/dgreenheck/webgpu-claude-skill

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: WebGPU Claude Skill

脚手架生成 WebGPU 场景

👤 Claude Code 用户 ⏱ ~15 min intermediate

何时使用: 你需要一个可以直接跑的 WebGPU + Three.js 启动器,不想浪费时间在配置上。

步骤
  1. 描述需求
    Describe scene; skill drafts.✓ 已复制
    → 文件已写入
  2. 迭代
    Tweak shader; skill applies✓ 已复制
    → 可见渲染结果

结果: WebGPU 场景快速在浏览器中运行。

组合

与其他 MCP 搭配,撬动十倍杠杆

webgpu-claude-skill + filesystem

将场景文件写入你的项目

Combine webgpu-claude-skill with filesystem: Write the scene into your project✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
scaffold / shade (见文档) 两种工作流 1 次调用

成本与限制

运行它的成本

API 配额
不适用
每次调用 Token 数
中等
费用
免费
提示
在 Chrome 稳定版上测试;WebGPU 基本可用但仍有一些怪癖

安全

权限、密钥、影响范围

凭据存储:
数据出站:

故障排查

常见错误与修复

WebGPU 不可用

请求时 skill 会输出 WebGL 回退方案

替代方案

WebGPU Claude Skill 对比其他方案

替代方案何时用它替代权衡
直接查阅 Three.js 文档你对 WebGPU 已经很熟悉启动更慢

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills