Creator · staruhub
Last updated · Sep 4, 2026
Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。
Creator · staruhub
Last updated · Sep 4, 2026
Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。
Creator · staruhub
Last updated · Sep 4, 2026
Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。
Creator · staruhub
Last updated · Sep 4, 2026
Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。
Review then install
Install targets
Codex install prompt
Install the "threejs-performance" agent skill from https://github.com/staruhub/ClaudeSkills/tree/main/skills/Geek-skills-threejs-performance. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"staruhub-threejs-performance","task":"Install threejs-performance","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Maintenance
fresh
24d since push
Risk
Safe to try
Quality score needs review
GitHub quality
707
75/100 Quality · 84/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
707 GitHub stars
Repo activity
707 stars, 130 forks
Maintenance
24d since push
License
MIT
Install
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add staruhub/ClaudeSkills --skill threejs-performanceDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/staruhub-threejs-performance/install
Agent should check
Copy prompt
Task: Use threejs-performance in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install
Install command: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/staruhub-threejs-performance/install
LLM text format
/api/skills/staruhub-threejs-performance/install?format=text
Find alternatives
/api/skills/search?q=threejs-performance&limit=3
Agent prompt
Use threejs-performance for this task. Review https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install, then install with: npx skills add staruhub/ClaudeSkills --skill threejs-performanceRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/staruhub-threejs-performance
LLM text
/api/registry/manifest/staruhub-threejs-performance?format=text
Install alias
/api/registry/install/staruhub-threejs-performance
Recommend
/api/registry/recommend?task=Use%20threejs-performance%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Browser automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
INFO707 GitHub stars
Stars/forks activity
INFO707 stars, 130 forks; issue activity unavailable in current metadata
Recent maintenance
PASS24d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: threejs-performance version: 1.1.0 description: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 ---
# Three.js 性能优化指南
## 黄金法则
**绘制调用 < 100 次/帧。** 三角形数量不如绘制调用数量重要;超过 500 次绘制调用,强大 GPU 也会吃力。用 `renderer.info.render.calls` 监控(完整监控代码见 `references/examples.md`)。
## 诊断决策树
| 症状 | 先查 | 深入 | |------|------|------| | 掉帧、卡顿 | `renderer.info.render.calls` 是否 >100 | 实例化/合批(下文),后处理链 | | 内存持续增长 | `renderer.info.memory` 的 geometries/textures 计数是否只增不减 | dispose 铁律(下文),`references/examples.md` 完整清理代码 | | 加载慢、显存爆 | 模型是否未压缩 | `references/assets.md` 压缩管线 | | 粒子/物理瓶颈 | CPU 粒子是否 >5 万 | WebGPU 计算着色器,`references/webgpu.md` | | R3F 项目莫名重渲染 | useFrame 里是否 setState | R3F 三规则(下文) |
## 各领域规则速查
### WebGPU:何时迁移 绘制调用密集掉帧 / 需要计算着色器做物理粒子(CPU 约 5 万上限,GPU 可达数百万)/ 复杂后处理链卡顿。 `WebGPURenderer` 必须 `await renderer.init()`。TSL 写一次自动编译 WGSL/GLSL。 浏览器支持下限(记录时点数据,现查 caniuse 为准):Chrome/Edge 113+,Firefox 141+,Safari 26+。 初始化回退、TSL 完整指南、计算着色器示例:`references/webgpu.md`。
### 绘制调用优化 - 大量**相同**几何体(树、石头)→ `InstancedMesh`:1000 棵树 = 1 次绘制 - 多个**不同**几何体共享材质 → `BatchedMesh` - 静态小物件 → `mergeGeometries` 合并 - 材质**共享复用**,永远不要在循环里 `new Material`
### 资源压缩(收益数字) - Draco 几何体压缩:体积减 90-95% - KTX2 纹理:GPU 内存约降 10 倍 - 一条命令:`gltf-transform optimize model.glb out.glb --texture-compress ktx2 --compress draco` - 解码器路径配置与 Meshopt/Draco 选型:`references/assets.md`
### 内存铁律 **Three.js 不会自动回收 GPU 资源。** 移除对象必须:geometry.dispose() + 遍历 material 的所有 texture 属性逐个 dispose + material.dispose();GLTF 的 ImageBitmap 还要 `texture.source.data.close()`。频繁增删对象用对象池。完整代码:`references/examples.md`。
### 着色器三规则 ① 移动端 `precision mediump float`(约快 2 倍)② 用 `mix/step` 替代 if 分支(分支破坏 GPU 并行)③ 数据打包进 vec4,一次纹理取 4 个值。
### 光照阴影预算 活动光源 ≤3;PointLight 阴影 = 每光源 6 次阴影贴图渲染;贴图尺寸移动端 512-1024、桌面 1024-2048;静态场景 `shadowMap.autoUpdate = false` 手动触发 + 烘焙光照。
### React Three Fiber 三规则 ① 动画走 `useFrame` 直改 ref,**永远不在 useFrame 里 setState** ② 静态场景用 `frameloop="demand"` + `invalidate()` 按需渲染 ③ 显隐切 `visible` 属性,不要条件挂载 `{show && <Model/>}`(重挂载重建资源)。完整优化模板:`references/examples.md`。
### 后处理选型 WebGL → `pmndrs/postprocessing`(多效果合并 EffectPass);WebGPU → 原生 TSL 后处理管线。两者完整设置:`references/examples.md`。
## 验收标准(优化任务完成前自查)
- [ ] `renderer.info.render.calls` < 100(超出需给出场景理由) - [ ] `renderer.info.memory` 计数在增删对象后回落,无单调增长 - [ ] 目标设备实测帧率达标(移动端也要测,不只桌面) - [ ] 发布资源经过 Draco/KTX2 压缩管线 - [ ] 每条优化建议都对应用户场景的实测症状,不是清单式全量套用
## 不做什么
- React 组件层的通用性能问题(memo/useMemo/bundle)→ `vercel-react-best-practices` - Three.js 基础教学、场景搭建入门 - 模型/贴图美术制作本身(只管加载与渲染性能) - 未量测先优化:没有 renderer.info 或帧率数据时,先装监控再动手
## 已知陷阱
| 陷阱 | 具体表现 | 应对 | |------|---------|------| | dispose 不彻底 | 只 dispose 了 geometry,material 上挂的 texture 全泄漏 | 遍历 material 属性逐个 dispose;GLTF ImageBitmap 还需 close() | | useFrame 里 setState | 每帧触发 React 重渲染,帧率断崖 | 直改 ref;状态只在交互事件里更新 | | 条件挂载切换模型 | `{show && <Model/>}` 每次重建几何体和纹理 | 切 visible 属性 | | demand 模式忘 invalidate | 相机动了画面不动,被当成"卡死" | 交互回调里调用 invalidate() | | 循环里 new Material | 1000 个网格 1000 个材质,合批全部失效 | 材质提到循环外共享 | | PointLight 随手加阴影 | 一个点光 6 次阴影渲染,移动端直接跪 | 优先 SpotLight/DirectionalLight 阴影,点光阴影只留一个 |
## 调试工具
**stats-gl**(FPS/CPU/GPU)· **lil-gui**(实时调参)· **Spector.js**(WebGL 帧捕获)· **three-mesh-bvh**(8 万+ 面 @60fps 射线检测)· **r3f-perf**(R3F 监控)
## 参考文档(按需加载)
| 文件 | 何时读 | |------|--------| | `references/webgpu.md` | 迁移 WebGPU / 写 TSL / 计算着色器时 | | `references/assets.md` | 配置压缩管线、LOD、渐进加载时 | | `references/examples.md` | 需要完整可粘贴代码时(监控/内存清理/对象池/粒子/R3F 模板/后处理/上下文丢失恢复) |
Source provenance
Decision snapshot
707 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for threejs-performance, ready for a manual X post.
threejs-performance: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化... 707 stars https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x
Listing + install path for threejs-performance: https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x Install: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to staruhub but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance/audit)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)staruhub
@staruhub
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsReview then install
Install targets
Codex install prompt
Install the "threejs-performance" agent skill from https://github.com/staruhub/ClaudeSkills/tree/main/skills/Geek-skills-threejs-performance. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"staruhub-threejs-performance","task":"Install threejs-performance","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Maintenance
fresh
24d since push
Risk
Safe to try
Quality score needs review
GitHub quality
707
75/100 Quality · 84/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
707 GitHub stars
Repo activity
707 stars, 130 forks
Maintenance
24d since push
License
MIT
Install
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add staruhub/ClaudeSkills --skill threejs-performanceDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/staruhub-threejs-performance/install
Agent should check
Copy prompt
Task: Use threejs-performance in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install
Install command: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/staruhub-threejs-performance/install
LLM text format
/api/skills/staruhub-threejs-performance/install?format=text
Find alternatives
/api/skills/search?q=threejs-performance&limit=3
Agent prompt
Use threejs-performance for this task. Review https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install, then install with: npx skills add staruhub/ClaudeSkills --skill threejs-performanceRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/staruhub-threejs-performance
LLM text
/api/registry/manifest/staruhub-threejs-performance?format=text
Install alias
/api/registry/install/staruhub-threejs-performance
Recommend
/api/registry/recommend?task=Use%20threejs-performance%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Browser automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
INFO707 GitHub stars
Stars/forks activity
INFO707 stars, 130 forks; issue activity unavailable in current metadata
Recent maintenance
PASS24d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: threejs-performance version: 1.1.0 description: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 ---
# Three.js 性能优化指南
## 黄金法则
**绘制调用 < 100 次/帧。** 三角形数量不如绘制调用数量重要;超过 500 次绘制调用,强大 GPU 也会吃力。用 `renderer.info.render.calls` 监控(完整监控代码见 `references/examples.md`)。
## 诊断决策树
| 症状 | 先查 | 深入 | |------|------|------| | 掉帧、卡顿 | `renderer.info.render.calls` 是否 >100 | 实例化/合批(下文),后处理链 | | 内存持续增长 | `renderer.info.memory` 的 geometries/textures 计数是否只增不减 | dispose 铁律(下文),`references/examples.md` 完整清理代码 | | 加载慢、显存爆 | 模型是否未压缩 | `references/assets.md` 压缩管线 | | 粒子/物理瓶颈 | CPU 粒子是否 >5 万 | WebGPU 计算着色器,`references/webgpu.md` | | R3F 项目莫名重渲染 | useFrame 里是否 setState | R3F 三规则(下文) |
## 各领域规则速查
### WebGPU:何时迁移 绘制调用密集掉帧 / 需要计算着色器做物理粒子(CPU 约 5 万上限,GPU 可达数百万)/ 复杂后处理链卡顿。 `WebGPURenderer` 必须 `await renderer.init()`。TSL 写一次自动编译 WGSL/GLSL。 浏览器支持下限(记录时点数据,现查 caniuse 为准):Chrome/Edge 113+,Firefox 141+,Safari 26+。 初始化回退、TSL 完整指南、计算着色器示例:`references/webgpu.md`。
### 绘制调用优化 - 大量**相同**几何体(树、石头)→ `InstancedMesh`:1000 棵树 = 1 次绘制 - 多个**不同**几何体共享材质 → `BatchedMesh` - 静态小物件 → `mergeGeometries` 合并 - 材质**共享复用**,永远不要在循环里 `new Material`
### 资源压缩(收益数字) - Draco 几何体压缩:体积减 90-95% - KTX2 纹理:GPU 内存约降 10 倍 - 一条命令:`gltf-transform optimize model.glb out.glb --texture-compress ktx2 --compress draco` - 解码器路径配置与 Meshopt/Draco 选型:`references/assets.md`
### 内存铁律 **Three.js 不会自动回收 GPU 资源。** 移除对象必须:geometry.dispose() + 遍历 material 的所有 texture 属性逐个 dispose + material.dispose();GLTF 的 ImageBitmap 还要 `texture.source.data.close()`。频繁增删对象用对象池。完整代码:`references/examples.md`。
### 着色器三规则 ① 移动端 `precision mediump float`(约快 2 倍)② 用 `mix/step` 替代 if 分支(分支破坏 GPU 并行)③ 数据打包进 vec4,一次纹理取 4 个值。
### 光照阴影预算 活动光源 ≤3;PointLight 阴影 = 每光源 6 次阴影贴图渲染;贴图尺寸移动端 512-1024、桌面 1024-2048;静态场景 `shadowMap.autoUpdate = false` 手动触发 + 烘焙光照。
### React Three Fiber 三规则 ① 动画走 `useFrame` 直改 ref,**永远不在 useFrame 里 setState** ② 静态场景用 `frameloop="demand"` + `invalidate()` 按需渲染 ③ 显隐切 `visible` 属性,不要条件挂载 `{show && <Model/>}`(重挂载重建资源)。完整优化模板:`references/examples.md`。
### 后处理选型 WebGL → `pmndrs/postprocessing`(多效果合并 EffectPass);WebGPU → 原生 TSL 后处理管线。两者完整设置:`references/examples.md`。
## 验收标准(优化任务完成前自查)
- [ ] `renderer.info.render.calls` < 100(超出需给出场景理由) - [ ] `renderer.info.memory` 计数在增删对象后回落,无单调增长 - [ ] 目标设备实测帧率达标(移动端也要测,不只桌面) - [ ] 发布资源经过 Draco/KTX2 压缩管线 - [ ] 每条优化建议都对应用户场景的实测症状,不是清单式全量套用
## 不做什么
- React 组件层的通用性能问题(memo/useMemo/bundle)→ `vercel-react-best-practices` - Three.js 基础教学、场景搭建入门 - 模型/贴图美术制作本身(只管加载与渲染性能) - 未量测先优化:没有 renderer.info 或帧率数据时,先装监控再动手
## 已知陷阱
| 陷阱 | 具体表现 | 应对 | |------|---------|------| | dispose 不彻底 | 只 dispose 了 geometry,material 上挂的 texture 全泄漏 | 遍历 material 属性逐个 dispose;GLTF ImageBitmap 还需 close() | | useFrame 里 setState | 每帧触发 React 重渲染,帧率断崖 | 直改 ref;状态只在交互事件里更新 | | 条件挂载切换模型 | `{show && <Model/>}` 每次重建几何体和纹理 | 切 visible 属性 | | demand 模式忘 invalidate | 相机动了画面不动,被当成"卡死" | 交互回调里调用 invalidate() | | 循环里 new Material | 1000 个网格 1000 个材质,合批全部失效 | 材质提到循环外共享 | | PointLight 随手加阴影 | 一个点光 6 次阴影渲染,移动端直接跪 | 优先 SpotLight/DirectionalLight 阴影,点光阴影只留一个 |
## 调试工具
**stats-gl**(FPS/CPU/GPU)· **lil-gui**(实时调参)· **Spector.js**(WebGL 帧捕获)· **three-mesh-bvh**(8 万+ 面 @60fps 射线检测)· **r3f-perf**(R3F 监控)
## 参考文档(按需加载)
| 文件 | 何时读 | |------|--------| | `references/webgpu.md` | 迁移 WebGPU / 写 TSL / 计算着色器时 | | `references/assets.md` | 配置压缩管线、LOD、渐进加载时 | | `references/examples.md` | 需要完整可粘贴代码时(监控/内存清理/对象池/粒子/R3F 模板/后处理/上下文丢失恢复) |
Source provenance
Decision snapshot
707 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for threejs-performance, ready for a manual X post.
threejs-performance: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化... 707 stars https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x
Listing + install path for threejs-performance: https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x Install: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to staruhub but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance/audit)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)staruhub
@staruhub
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsReview then install
Install targets
Codex install prompt
Install the "threejs-performance" agent skill from https://github.com/staruhub/ClaudeSkills/tree/main/skills/Geek-skills-threejs-performance. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"staruhub-threejs-performance","task":"Install threejs-performance","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Maintenance
fresh
24d since push
Risk
Safe to try
Quality score needs review
GitHub quality
707
75/100 Quality · 84/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
707 GitHub stars
Repo activity
707 stars, 130 forks
Maintenance
24d since push
License
MIT
Install
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add staruhub/ClaudeSkills --skill threejs-performanceDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/staruhub-threejs-performance/install
Agent should check
Copy prompt
Task: Use threejs-performance in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install
Install command: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/staruhub-threejs-performance/install
LLM text format
/api/skills/staruhub-threejs-performance/install?format=text
Find alternatives
/api/skills/search?q=threejs-performance&limit=3
Agent prompt
Use threejs-performance for this task. Review https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install, then install with: npx skills add staruhub/ClaudeSkills --skill threejs-performanceRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/staruhub-threejs-performance
LLM text
/api/registry/manifest/staruhub-threejs-performance?format=text
Install alias
/api/registry/install/staruhub-threejs-performance
Recommend
/api/registry/recommend?task=Use%20threejs-performance%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Browser automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
INFO707 GitHub stars
Stars/forks activity
INFO707 stars, 130 forks; issue activity unavailable in current metadata
Recent maintenance
PASS24d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: threejs-performance version: 1.1.0 description: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 ---
# Three.js 性能优化指南
## 黄金法则
**绘制调用 < 100 次/帧。** 三角形数量不如绘制调用数量重要;超过 500 次绘制调用,强大 GPU 也会吃力。用 `renderer.info.render.calls` 监控(完整监控代码见 `references/examples.md`)。
## 诊断决策树
| 症状 | 先查 | 深入 | |------|------|------| | 掉帧、卡顿 | `renderer.info.render.calls` 是否 >100 | 实例化/合批(下文),后处理链 | | 内存持续增长 | `renderer.info.memory` 的 geometries/textures 计数是否只增不减 | dispose 铁律(下文),`references/examples.md` 完整清理代码 | | 加载慢、显存爆 | 模型是否未压缩 | `references/assets.md` 压缩管线 | | 粒子/物理瓶颈 | CPU 粒子是否 >5 万 | WebGPU 计算着色器,`references/webgpu.md` | | R3F 项目莫名重渲染 | useFrame 里是否 setState | R3F 三规则(下文) |
## 各领域规则速查
### WebGPU:何时迁移 绘制调用密集掉帧 / 需要计算着色器做物理粒子(CPU 约 5 万上限,GPU 可达数百万)/ 复杂后处理链卡顿。 `WebGPURenderer` 必须 `await renderer.init()`。TSL 写一次自动编译 WGSL/GLSL。 浏览器支持下限(记录时点数据,现查 caniuse 为准):Chrome/Edge 113+,Firefox 141+,Safari 26+。 初始化回退、TSL 完整指南、计算着色器示例:`references/webgpu.md`。
### 绘制调用优化 - 大量**相同**几何体(树、石头)→ `InstancedMesh`:1000 棵树 = 1 次绘制 - 多个**不同**几何体共享材质 → `BatchedMesh` - 静态小物件 → `mergeGeometries` 合并 - 材质**共享复用**,永远不要在循环里 `new Material`
### 资源压缩(收益数字) - Draco 几何体压缩:体积减 90-95% - KTX2 纹理:GPU 内存约降 10 倍 - 一条命令:`gltf-transform optimize model.glb out.glb --texture-compress ktx2 --compress draco` - 解码器路径配置与 Meshopt/Draco 选型:`references/assets.md`
### 内存铁律 **Three.js 不会自动回收 GPU 资源。** 移除对象必须:geometry.dispose() + 遍历 material 的所有 texture 属性逐个 dispose + material.dispose();GLTF 的 ImageBitmap 还要 `texture.source.data.close()`。频繁增删对象用对象池。完整代码:`references/examples.md`。
### 着色器三规则 ① 移动端 `precision mediump float`(约快 2 倍)② 用 `mix/step` 替代 if 分支(分支破坏 GPU 并行)③ 数据打包进 vec4,一次纹理取 4 个值。
### 光照阴影预算 活动光源 ≤3;PointLight 阴影 = 每光源 6 次阴影贴图渲染;贴图尺寸移动端 512-1024、桌面 1024-2048;静态场景 `shadowMap.autoUpdate = false` 手动触发 + 烘焙光照。
### React Three Fiber 三规则 ① 动画走 `useFrame` 直改 ref,**永远不在 useFrame 里 setState** ② 静态场景用 `frameloop="demand"` + `invalidate()` 按需渲染 ③ 显隐切 `visible` 属性,不要条件挂载 `{show && <Model/>}`(重挂载重建资源)。完整优化模板:`references/examples.md`。
### 后处理选型 WebGL → `pmndrs/postprocessing`(多效果合并 EffectPass);WebGPU → 原生 TSL 后处理管线。两者完整设置:`references/examples.md`。
## 验收标准(优化任务完成前自查)
- [ ] `renderer.info.render.calls` < 100(超出需给出场景理由) - [ ] `renderer.info.memory` 计数在增删对象后回落,无单调增长 - [ ] 目标设备实测帧率达标(移动端也要测,不只桌面) - [ ] 发布资源经过 Draco/KTX2 压缩管线 - [ ] 每条优化建议都对应用户场景的实测症状,不是清单式全量套用
## 不做什么
- React 组件层的通用性能问题(memo/useMemo/bundle)→ `vercel-react-best-practices` - Three.js 基础教学、场景搭建入门 - 模型/贴图美术制作本身(只管加载与渲染性能) - 未量测先优化:没有 renderer.info 或帧率数据时,先装监控再动手
## 已知陷阱
| 陷阱 | 具体表现 | 应对 | |------|---------|------| | dispose 不彻底 | 只 dispose 了 geometry,material 上挂的 texture 全泄漏 | 遍历 material 属性逐个 dispose;GLTF ImageBitmap 还需 close() | | useFrame 里 setState | 每帧触发 React 重渲染,帧率断崖 | 直改 ref;状态只在交互事件里更新 | | 条件挂载切换模型 | `{show && <Model/>}` 每次重建几何体和纹理 | 切 visible 属性 | | demand 模式忘 invalidate | 相机动了画面不动,被当成"卡死" | 交互回调里调用 invalidate() | | 循环里 new Material | 1000 个网格 1000 个材质,合批全部失效 | 材质提到循环外共享 | | PointLight 随手加阴影 | 一个点光 6 次阴影渲染,移动端直接跪 | 优先 SpotLight/DirectionalLight 阴影,点光阴影只留一个 |
## 调试工具
**stats-gl**(FPS/CPU/GPU)· **lil-gui**(实时调参)· **Spector.js**(WebGL 帧捕获)· **three-mesh-bvh**(8 万+ 面 @60fps 射线检测)· **r3f-perf**(R3F 监控)
## 参考文档(按需加载)
| 文件 | 何时读 | |------|--------| | `references/webgpu.md` | 迁移 WebGPU / 写 TSL / 计算着色器时 | | `references/assets.md` | 配置压缩管线、LOD、渐进加载时 | | `references/examples.md` | 需要完整可粘贴代码时(监控/内存清理/对象池/粒子/R3F 模板/后处理/上下文丢失恢复) |
Source provenance
Decision snapshot
707 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for threejs-performance, ready for a manual X post.
threejs-performance: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化... 707 stars https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x
Listing + install path for threejs-performance: https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x Install: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to staruhub but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance/audit)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)staruhub
@staruhub
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsReview then install
Install targets
Codex install prompt
Install the "threejs-performance" agent skill from https://github.com/staruhub/ClaudeSkills/tree/main/skills/Geek-skills-threejs-performance. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"staruhub-threejs-performance","task":"Install threejs-performance","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Maintenance
fresh
24d since push
Risk
Safe to try
Quality score needs review
GitHub quality
707
75/100 Quality · 84/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
707 GitHub stars
Repo activity
707 stars, 130 forks
Maintenance
24d since push
License
MIT
Install
npx skills add staruhub/ClaudeSkills --skill threejs-performance
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add staruhub/ClaudeSkills --skill threejs-performanceDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/staruhub-threejs-performance/install
Agent should check
Copy prompt
Task: Use threejs-performance in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20threejs-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install
Install command: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/staruhub-threejs-performance/install
LLM text format
/api/skills/staruhub-threejs-performance/install?format=text
Find alternatives
/api/skills/search?q=threejs-performance&limit=3
Agent prompt
Use threejs-performance for this task. Review https://www.openagentskill.com/api/skills/staruhub-threejs-performance/install, then install with: npx skills add staruhub/ClaudeSkills --skill threejs-performanceRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/staruhub-threejs-performance
LLM text
/api/registry/manifest/staruhub-threejs-performance?format=text
Install alias
/api/registry/install/staruhub-threejs-performance
Recommend
/api/registry/recommend?task=Use%20threejs-performance%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Browser automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
INFO707 GitHub stars
Stars/forks activity
INFO707 stars, 130 forks; issue activity unavailable in current metadata
Recent maintenance
PASS24d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: threejs-performance version: 1.1.0 description: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。 ---
# Three.js 性能优化指南
## 黄金法则
**绘制调用 < 100 次/帧。** 三角形数量不如绘制调用数量重要;超过 500 次绘制调用,强大 GPU 也会吃力。用 `renderer.info.render.calls` 监控(完整监控代码见 `references/examples.md`)。
## 诊断决策树
| 症状 | 先查 | 深入 | |------|------|------| | 掉帧、卡顿 | `renderer.info.render.calls` 是否 >100 | 实例化/合批(下文),后处理链 | | 内存持续增长 | `renderer.info.memory` 的 geometries/textures 计数是否只增不减 | dispose 铁律(下文),`references/examples.md` 完整清理代码 | | 加载慢、显存爆 | 模型是否未压缩 | `references/assets.md` 压缩管线 | | 粒子/物理瓶颈 | CPU 粒子是否 >5 万 | WebGPU 计算着色器,`references/webgpu.md` | | R3F 项目莫名重渲染 | useFrame 里是否 setState | R3F 三规则(下文) |
## 各领域规则速查
### WebGPU:何时迁移 绘制调用密集掉帧 / 需要计算着色器做物理粒子(CPU 约 5 万上限,GPU 可达数百万)/ 复杂后处理链卡顿。 `WebGPURenderer` 必须 `await renderer.init()`。TSL 写一次自动编译 WGSL/GLSL。 浏览器支持下限(记录时点数据,现查 caniuse 为准):Chrome/Edge 113+,Firefox 141+,Safari 26+。 初始化回退、TSL 完整指南、计算着色器示例:`references/webgpu.md`。
### 绘制调用优化 - 大量**相同**几何体(树、石头)→ `InstancedMesh`:1000 棵树 = 1 次绘制 - 多个**不同**几何体共享材质 → `BatchedMesh` - 静态小物件 → `mergeGeometries` 合并 - 材质**共享复用**,永远不要在循环里 `new Material`
### 资源压缩(收益数字) - Draco 几何体压缩:体积减 90-95% - KTX2 纹理:GPU 内存约降 10 倍 - 一条命令:`gltf-transform optimize model.glb out.glb --texture-compress ktx2 --compress draco` - 解码器路径配置与 Meshopt/Draco 选型:`references/assets.md`
### 内存铁律 **Three.js 不会自动回收 GPU 资源。** 移除对象必须:geometry.dispose() + 遍历 material 的所有 texture 属性逐个 dispose + material.dispose();GLTF 的 ImageBitmap 还要 `texture.source.data.close()`。频繁增删对象用对象池。完整代码:`references/examples.md`。
### 着色器三规则 ① 移动端 `precision mediump float`(约快 2 倍)② 用 `mix/step` 替代 if 分支(分支破坏 GPU 并行)③ 数据打包进 vec4,一次纹理取 4 个值。
### 光照阴影预算 活动光源 ≤3;PointLight 阴影 = 每光源 6 次阴影贴图渲染;贴图尺寸移动端 512-1024、桌面 1024-2048;静态场景 `shadowMap.autoUpdate = false` 手动触发 + 烘焙光照。
### React Three Fiber 三规则 ① 动画走 `useFrame` 直改 ref,**永远不在 useFrame 里 setState** ② 静态场景用 `frameloop="demand"` + `invalidate()` 按需渲染 ③ 显隐切 `visible` 属性,不要条件挂载 `{show && <Model/>}`(重挂载重建资源)。完整优化模板:`references/examples.md`。
### 后处理选型 WebGL → `pmndrs/postprocessing`(多效果合并 EffectPass);WebGPU → 原生 TSL 后处理管线。两者完整设置:`references/examples.md`。
## 验收标准(优化任务完成前自查)
- [ ] `renderer.info.render.calls` < 100(超出需给出场景理由) - [ ] `renderer.info.memory` 计数在增删对象后回落,无单调增长 - [ ] 目标设备实测帧率达标(移动端也要测,不只桌面) - [ ] 发布资源经过 Draco/KTX2 压缩管线 - [ ] 每条优化建议都对应用户场景的实测症状,不是清单式全量套用
## 不做什么
- React 组件层的通用性能问题(memo/useMemo/bundle)→ `vercel-react-best-practices` - Three.js 基础教学、场景搭建入门 - 模型/贴图美术制作本身(只管加载与渲染性能) - 未量测先优化:没有 renderer.info 或帧率数据时,先装监控再动手
## 已知陷阱
| 陷阱 | 具体表现 | 应对 | |------|---------|------| | dispose 不彻底 | 只 dispose 了 geometry,material 上挂的 texture 全泄漏 | 遍历 material 属性逐个 dispose;GLTF ImageBitmap 还需 close() | | useFrame 里 setState | 每帧触发 React 重渲染,帧率断崖 | 直改 ref;状态只在交互事件里更新 | | 条件挂载切换模型 | `{show && <Model/>}` 每次重建几何体和纹理 | 切 visible 属性 | | demand 模式忘 invalidate | 相机动了画面不动,被当成"卡死" | 交互回调里调用 invalidate() | | 循环里 new Material | 1000 个网格 1000 个材质,合批全部失效 | 材质提到循环外共享 | | PointLight 随手加阴影 | 一个点光 6 次阴影渲染,移动端直接跪 | 优先 SpotLight/DirectionalLight 阴影,点光阴影只留一个 |
## 调试工具
**stats-gl**(FPS/CPU/GPU)· **lil-gui**(实时调参)· **Spector.js**(WebGL 帧捕获)· **three-mesh-bvh**(8 万+ 面 @60fps 射线检测)· **r3f-perf**(R3F 监控)
## 参考文档(按需加载)
| 文件 | 何时读 | |------|--------| | `references/webgpu.md` | 迁移 WebGPU / 写 TSL / 计算着色器时 | | `references/assets.md` | 配置压缩管线、LOD、渐进加载时 | | `references/examples.md` | 需要完整可粘贴代码时(监控/内存清理/对象池/粒子/R3F 模板/后处理/上下文丢失恢复) |
Source provenance
Decision snapshot
707 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for threejs-performance, ready for a manual X post.
threejs-performance: Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化... 707 stars https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x
Listing + install path for threejs-performance: https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=x Install: npx skills add staruhub/ClaudeSkills --skill threejs-performance
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to staruhub but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance/audit)
[](https://www.openagentskill.com/skills/staruhub-threejs-performance?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)staruhub
@staruhub
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsPermission surface
no high-risk permission surface in public metadata
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
no high-risk permission surface in public metadata
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
no high-risk permission surface in public metadata
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
no high-risk permission surface in public metadata
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness