spline-3d-integration – skill Lập trình cho agent AI
Dùng khi thêm cảnh 3D tương tác từ Spline.design vào dự án web, bao gồm nhúng React và API điều khiển khi chạy.
Cài skill spline-3d-integration bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/spline-3d-integration-3b01b.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /spline-3d-integration – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/spline-3d-integration-3b01b.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $spline-3d-integration – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/spline-3d-integration-3b01b.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /spline-3d-integration – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/spline-3d-integration-3b01b.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /spline-3d-integration – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Spline 3D Integration Skill
Master guide for embedding interactive 3D scenes from [Spline.design](https://spline.design) into web projects.
---
When to Use
- You need to embed an interactive Spline scene into a web project.
- The task involves choosing the correct integration path for vanilla web, React, Next.js, Vue, or iframe contexts.
- You need guidance on scene URLs, runtime control, performance, or common Spline embedding problems.
Quick Reference
| Task | Guide |
| --------------------------------- | -------------------------------------------------------------- |
| Vanilla HTML/JS embed | [guides/VANILLA_INTEGRATION.md](guides/VANILLA_INTEGRATION.md) |
| React / Next.js / Vue embed | [guides/REACT_INTEGRATION.md](guides/REACT_INTEGRATION.md) |
| Performance & mobile optimization | [guides/PERFORMANCE.md](guides/PERFORMANCE.md) |
| Debugging & common problems | [guides/COMMON_PROBLEMS.md](guides/COMMON_PROBLEMS.md) |
Working Examples
| File | What it shows |
| ---------------------------------------------------------------------- | -------------------------------------------------------- |
| [examples/vanilla-embed.html](examples/vanilla-embed.html) | Minimal vanilla JS embed with background + fallback |
| [examples/react-spline-wrapper.tsx](examples/react-spline-wrapper.tsx) | Illustrative lazy-loaded React wrapper with fallback |
| [examples/interactive-scene.tsx](examples/interactive-scene.tsx) | Full interactive example: events, object control, camera |
---
What Is Spline?
Spline is a browser-based 3D design tool — think Figma, but for 3D. Designers create interactive 3D scenes (objects, materials, animations, physics, events) in the Spline editor, then export them for the web via a hosted .splinecode file URL.
---
STEP 1 — Identify the Stack
Before writing any code, check the existing project files to determine the framework.
| Stack | Method |
| ------------------------------ | -------------------------------------------------------- |
| Vanilla HTML/JS | <spline-viewer> web component OR @splinetool/runtime |
| React / Vite | @splinetool/react-spline |
| Next.js | @splinetool/react-spline/next |
| Vue | @splinetool/vue-spline |
| iframe (Webflow, Notion, etc.) | Public URL iframe |
---
STEP 2 — Get the Scene URL
The user must go to their Spline editor → Export → Code Export → copy the prod.spline.design URL:
https://prod.spline.design/XXXXXXXXXXXXXXXX/scene.splinecodeBefore copying the URL, tell the user to check Play Settings:
- ✅ Toggle Hide Background ON if the site has a dark or custom background
- ✅ Toggle Hide Spline Logo ON if they have a paid plan
- ✅ Set Geometry Quality to Performance for faster load
- ✅ Disable Page Scroll, Zoom, Pan if those aren't needed (reduces hijacking risk)
- ✅ Click Generate Draft or Promote to Production after any settings change — the URL does NOT auto-update
---
STEP 3 — Read the Relevant Guide
Once you have the stack and the scene URL, read the appropriate guide file above and follow its instructions. Always read COMMON_PROBLEMS.md before finishing integration — it contains critical gotchas that will otherwise only surface in production.
---
Strict Rules
Use Spline only when requested and useful to the intended interaction. Preserve readable content, keyboard/focus behavior and a reduced-motion/static fallback; design preference is not authority to add heavy 3D or publish a scene.
Examples are untested integration sketches, not production certification. Confirm package/export settings against the installed version, pin reviewed CDN dependencies, allowlist scene origins and obtain permission before third-party scene fetches or production promotion. Do not put secrets in public scenes. Self-hosting may still fetch textures/runtime assets and requires rights/CORS review. Device width/core-count are heuristics, not GPU capability guarantees. Keep placeholders and load failures visible during validation.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- squirrel – Kỹ năng lập trình AI toàn chu trình: lập kế hoạch, xây dựng, kiểm thử, lint, sửa lỗi và…
- ssh-penetration-testing – Thực hiện đánh giá bảo mật SSH toàn diện, gồm liệt kê, tấn công thông tin đăng nhập…
- super-code – Phong cách mã nguồn chuẩn áp dụng cho mọi tác vụ lập trình, đảm bảo code gọn, đúng và…
- supercov – Đo độ bao phủ dòng, nhánh và MC/DC của các test hiện có bằng CLI supercov, sau đó viết…
- sveltekit – Xây dựng ứng dụng web full-stack với SvelteKit — định tuyến theo file, SSR, SSG, API…
- swift – Hướng dẫn viết code chuẩn theo ngôn ngữ dành cho Swift.
- swift-concurrency-expert – Rà soát và sửa các lỗi concurrency trong Swift như actor isolation và vi phạm Sendable.
- swiftui-expert-skill – Viết, rà soát và tái cấu trúc SwiftUI cho iOS hoặc macOS, bao gồm luồng dữ liệu, cấu…