Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/playcanvas/react/playcanvas-reactgit clone --depth 1 https://github.com/playcanvas/reactWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00559 | $0.00559 |
| Opus 5 | $0.00280 | $0.00280 |
| Sonnet 5 | $0.00112 | $0.00112 |
| Haiku 4.5 | $0.00056 | $0.00056 |
Grade A, and why
.playcanvas-react scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Overview of @playcanvas/react
@playcanvas/react is a fully featured thin wrapper around the PlayCanvas API. You use it to build 3D content
📚 Full Docs
🔗 GitHub Repo
🧩 API Reference
Structure
// Core
import { Application, Entity } from '@playcanvas/react'
// Components add behaviors to Entities
import { Light, Camera, Render, Gsplat, Screen, Collision, RigidBody, Anim } from '@playcanvas/react/components'
// Hooks add functionality
import { useModel, useSplat, useAppEvent, useParent, useApp } from '@playcanvas/react/hooks'
Rules for 3D Content
When generating 3D content with @playcanvas/react, follow these conventions:
- Always wrap components at the root in an
<Application />to initialize the engine. <Entity />defines a transform node — use it forposition,rotation, andscale. It does not render anything on its own.- Use components from
@playcanvas/react/componentsto add functionality (e.g.,<Camera />,<Light />,<Render />). - Load assets using hooks like
useModel(src)anduseSplat(src). - Materials must be created using the
useMaterial()hook. - Use numeric arrays for colors and vectors:
- Colors:
[1, 0, 0] - Position/rotation/scale:
[0, 0, 0]
- Colors:
Examples
📸 A Camera
Transform goes on <Entity />, camera settings go on <Camera />.
<Entity position={[0, 0, 4]}>
<Camera fov={30}/>
</Entity>
A Light
<Entity position={[0, 0, 4]}>
<Light type='directional' />
</Entity>
A Primitive
<Entity position={[0, 0, 4]}>
<Render type='sphere' />
</Entity>
An Asset
export const Car = () => {
const { asset } = useModel('./car.glb');
if (!asset) return null;
return (
<Entity>
<Render type="asset" asset={asset} />
</Entity>
);
};
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 84 lines · 559 tokens per session scan A 03de0bf71080
.playcanvas-react is a cursor rule published in the GitHub repository playcanvas/react (525 stars, last pushed 12d ago), licensed MIT. It adds 559 tokens to every session, about $0.0028 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
frontend
Frontend development rules for TT Studio - AI model management interface.
editor-commands
One undoable command class per file under packages/editor-core/src/commands. Apply when adding or editing editor-core commands.
guidelines
Cursor rule "guidelines" from vucinatim/air-jam, covering tooling, conventions, refactoring, tips and notes.
editor-ui
Editor React UI vs editor-core separation, selection, viewport, and dirty/undo rules. Apply when editing apps/editor or packages/editor-core.
server-security
Browser input is untrusted. All project filesystem access goes through ProjectService.resolveProjectPath → ProjectRootGuard.resolveSafe. Do not call path.resolve/readFile/writeFile on user-influenced paths without that guard.
typescript
TypeScript conventions for this monorepo (strict mode, Zod boundaries, package imports, naming). Apply when editing .ts/.tsx files.