apply-conventions

apply-conventions is a skill for Claude Code, Codex from playcanvas/create-playcanvas. It costs 40 tokens per session (954 once invoked), scanned A, original, MIT.

A set of PlayCanvas coding conventions for positions, rotations, cameras, physics, materials, models, bounds, and imports. PlayCanvas is a browser game engine with its own coordinate system and APIs.

In plain words
What is it for?
Use it when writing or reviewing Engine code that moves entities, aims cameras, handles physics, imports models, sets rotations, or works with world and local transforms.
Why use it?
It prevents common mistakes such as using the wrong axis, rotating models incorrectly, mishandling angle wraparound, or applying transforms to the wrong parent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/playcanvas/create-playcanvas/apply-conventions
Any agent
npx skills add playcanvas/create-playcanvas --skill apply-conventions
Clone the repo
git clone --depth 1 https://github.com/playcanvas/create-playcanvas

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for apply-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/apply-conventions.svg)](https://agentmods.dev/skills/playcanvas/create-playcanvas/apply-conventions)
Your own site
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/apply-conventions"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/apply-conventions.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 954 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00954
Opus 5 $0.00020 $0.00477
Sonnet 5 $0.00008 $0.00191
Haiku 4.5 $0.00004 $0.00095

Measured 6d ago against content hash df464d24380a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

apply-conventions 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 6d ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/apply-conventions/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Engine conventions

Read package.json and the installed playcanvas source before relying on version-sensitive API details. Apply these stable conventions throughout the project.

Coordinates and angles

  • Use the right-handed coordinate system: +Y is up and the gameplay ground plane is XZ.
  • Treat entity.forward and the camera viewing direction as -Z; entity.right is +X and entity.up is +Y. lookAt points -Z at the target.
  • Expect glTF models authored toward +Z to need a yaw correction. Inspect and calibrate each directional model instead of applying one global correction.
  • Pass degrees in XYZ order to high-level angle APIs.
  • Keep pitch, yaw, and roll as application state. Do not repeatedly read getEulerAngles() and feed its decomposition back into setEulerAngles().
  • Interpolate periodic angles with math.lerpAngle() or rotations with Quat.slerp(), not scalar lerp across the 0/360 seam.

Transforms and units

  • Use setPosition, setRotation, and setEulerAngles for world transforms.
  • Use the setLocal* variants below a parent.
  • Treat units as metres. Physics gravity defaults to (0, -9.81, 0).
  • Keep gameplay transforms on a semantic root and asset-authoring corrections on a child.
  • Do not scale rigid-body roots or skinned bones.

Cameras, materials, and bounds

  • Perspective camera FOV is vertical and defaults to 45 degrees.
  • Smooth an orbit camera's focus, yaw, pitch, and distance, then derive its position. Do not Vec3.lerp() between orbit positions on opposite sides of the focus; the chord crosses the subject.
  • Before writing custom camera input, inspect the installed controller script and its matching Engine example. Preserve their gesture mapping and damping unless the product explicitly asks for different behavior; do not derive signs from memory.
  • Define the input contract in screen space, then verify positive and negative movement on both axes with real input after a rendered frame. Judge the camera basis or a projected fixed landmark, not world-space camera coordinates or internal angle signs; both can approve inverted behavior.
  • Materials cull back faces by default; counter-clockwise winding defines the front face.
  • Clone a material before per-instance tinting or edits, and assign the clone; never mutate one shared by other instances, including default and asset-imported materials.
  • setParameter uploads raw values; author colours in sRGB and convert with Color#linear() before upload — do not hand-roll gamma.
  • Entities do not have an aabb. Union descendant meshInstance.aabb values after transforms have synchronized.
  • Let Mesh.update() calculate local bounds. If passing false for updateBoundingBox, assign an explicit mesh.aabb before the mesh can be culled.
  • Expand custom-mesh bounds by the maximum vertex-shader displacement; CPU bounds do not observe shader deformation.
  • Treat offline skinned-mesh bounds as bind-pose estimates and confirm animated poses at runtime.

Read the full file on GitHub · 76 lines

Changes

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.

  1. 6d ago First seen · 76 lines · 40 tokens per session scan A df464d24380a

Subscribe to this mod's changes

apply-conventions is a skill published in the GitHub repository playcanvas/create-playcanvas (53 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 954 once invoked, about $0.0002 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.