reuse-scripts
Use before writing PlayCanvas behaviour from scratch, to reuse the scripts and helpers the installed Engine already ships.
How do I install this agent skill?
npx skills add https://github.com/playcanvas/skills --skill reuse-scriptsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill facilitates the discovery and reuse of existing scripts within the PlayCanvas engine. It includes instructions for searching local project dependencies and integrating found components into various project types (Direct Engine, React, Web Components).
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Reuse shipped Engine code
Before writing behaviour, check what the installed playcanvas package already provides.
Scripts live under scripts/esm/**; import only from there. List them:
rg 'static scriptName =' node_modules/playcanvas/scripts/esm \
| sed "s|.*/scripts/esm/||; s|:.*static scriptName = ['\"]| -> |; s|['\"].*||" \
| sort
Common ones are CameraControls, FirstPersonController, ThirdPersonController,
ShadowCatcher, ProceduralSky, Water, and Grid, plus XR and splat scripts. Modules under
scripts/esm/parsers are resource-handler classes, not scripts.
Core exports that are not scripts include CameraFrame for post-processing, Picker
(getSelectionAsync), TransformGizmo, OutlineRenderer, MiniStats, GltfExporter, and
UsdzExporter.
Integrate
- Read the source for exports,
@attributeproperties, defaults, and required components. - Find its official example with
find-examples, and copy the assets, layers, scene settings, and render setup it depends on. - Adapt configuration and extension points. If nothing fits, implement only the missing part and say what was missing.
- After a rendered frame, fail on console, shader, or missing-asset errors.
Keep a shipped script's input mapping and damping unless asked otherwise, and verify input directions with real input rather than deriving signs from memory.
Grouped property updates differ by surface; preserve defaults you do not change. Read only the reference matching the code: direct Engine, React, or Web Components.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/playcanvas/skills/reuse-scripts">View reuse-scripts on skillZs</a>