脚手架生成 WebGPU 场景
何时使用: 你需要一个可以直接跑的 WebGPU + Three.js 启动器,不想浪费时间在配置上。
步骤
-
描述需求Describe scene; skill drafts.✓ 已复制→ 文件已写入
-
迭代Tweak shader; skill applies✓ 已复制→ 可见渲染结果
结果: WebGPU 场景快速在浏览器中运行。
作者 dgreenheck · dgreenheck/webgpu-claude-skill
用 Claude 快速搭建 WebGPU + Three.js 项目——样板代码、shader 模式、性能检查,全部封装在一个 skill 里。
WebGPU 足够新,Claude 经常会产生 API 幻觉。这个 skill 为其提供接地:可运行的 Three.js + WebGPU 脚手架、常用 shader 模式、浏览器性能启发式规则。
%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。保存后重启应用。
{
"mcpServers": {
"webgpu-claude-skill": {
"command": "git",
"args": [
"clone",
"https://github.com/dgreenheck/webgpu-claude-skill"
],
"_inferred": true
}
}
}
Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。
{
"mcpServers": {
"webgpu-claude-skill": {
"command": "git",
"args": [
"clone",
"https://github.com/dgreenheck/webgpu-claude-skill"
],
"_inferred": true
}
}
}
点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。
{
"mcpServers": {
"webgpu-claude-skill": {
"command": "git",
"args": [
"clone",
"https://github.com/dgreenheck/webgpu-claude-skill"
],
"_inferred": true
}
}
}
格式与 Claude Desktop 相同。重启 Windsurf 生效。
{
"mcpServers": [
{
"name": "webgpu-claude-skill",
"command": "git",
"args": [
"clone",
"https://github.com/dgreenheck/webgpu-claude-skill"
]
}
]
}
Continue 使用服务器对象数组,而非映射。
{
"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 + Three.js 启动器,不想浪费时间在配置上。
结果: WebGPU 场景快速在浏览器中运行。
将场景文件写入你的项目
| 工具 | 输入参数 | 何时调用 | 成本 |
|---|---|---|---|
| scaffold / shade | (见文档) | 两种工作流 | 1 次调用 |
WebGPU 不可用请求时 skill 会输出 WebGL 回退方案
| 替代方案 | 何时用它替代 | 权衡 |
|---|---|---|
| 直接查阅 Three.js 文档 | 你对 WebGPU 已经很熟悉 | 启动更慢 |