Skip to content
Back to skills

Reuse Scripts

ASecurity

Use before writing PlayCanvas behaviour from scratch, to reuse the scripts and helpers the installed Engine already ships.

  • 24 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added August 31, 2026
ai-agentsreactnode

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 1, 2026

npx -y skills add playcanvas/skills --skill reuse-scripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Reuse Scripts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Reuse Scripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/playcanvas-reuse-scripts/badge)](https://www.skillsdirectory.com/skills/playcanvas-reuse-scripts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: reuse-scripts
description: Use before writing PlayCanvas behaviour from scratch, to reuse the scripts and helpers the installed Engine already ships.
---

# 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:

```sh
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

1. Read the source for exports, `@attribute` properties, defaults, and required components.
2. Find its official example with `find-examples`, and copy the assets, layers, scene settings, and
   render setup it depends on.
3. Adapt configuration and extension points. If nothing fits, implement only the missing part and
   say what was missing.
4. 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](references/direct-engine.md),
[React](references/react.md), or [Web Components](references/web-components.md).

Files in this skill

  • SKILL.md3 KB
  • references/direct-engine.md1.3 KB
  • references/react.md940 B
  • references/web-components.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.