reduce-draw-calls

reduce-draw-calls is a skill for Claude Code, Codex from playcanvas/create-playcanvas. It costs 45 tokens per session (812 once invoked), scanned A, original, MIT.

A workflow for reducing the number of separate rendering submissions, called draw calls, that a PlayCanvas application makes each frame.

In plain words
What is it for?
It helps measure draw calls, disable invisible objects, group compatible objects, and choose increasingly involved ways to lower rendering overhead.
Why use it?
Fewer draw calls can reduce CPU work when a scene contains many repeated objects, dense grids, or interface elements that are not visible.

Skill for Claude CodeCodex

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

Good fit It helps measure draw calls, disable invisible objects, group compatible objects, and choose increasingly involved ways to lower rendering overhead.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/playcanvas/create-playcanvas/reduce-draw-calls
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.

Any agent
npx skills add playcanvas/create-playcanvas --skill reduce-draw-calls
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 reduce-draw-calls

README.md
[![agentmods](https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/reduce-draw-calls/github.svg)](https://agentmods.dev/skills/playcanvas/create-playcanvas/reduce-draw-calls)
Your own site
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/reduce-draw-calls"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/reduce-draw-calls/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for reduce-draw-calls

Your own site · 80×15
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/reduce-draw-calls"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/reduce-draw-calls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 812 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00045 $0.00812
Opus 5 $0.00023 $0.00406
Sonnet 5 $0.00009 $0.00162
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

reduce-draw-calls 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 9d 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/reduce-draw-calls/SKILL.md · 62 lines

How it starts

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

Cut draw calls, ranked by cost

Work the ladder in order and stop at the first rung that clears the budget. Each rung trades away less flexibility than the next; skipping straight to a custom renderer or hand-written mesh merge costs more engineering time than the draw calls it saves.

Measure first

Read app.stats.drawCalls.total (or the forward/depth/shadow breakdown) before changing anything, or drop in MiniStats for a live overlay. Every rung below is proved against this number, not against intuition about what "looks expensive."

Rung 1: stop drawing invisible things

An element at opacity 0 still submits a draw call — its mesh instance exists and is still in a layer, so the GPU processes it every frame for no visible result. Toggle enabled on the entity to actually skip it. Check every element that is ever fully transparent, not only the ones on screen when you're profiling — this rung is easy to skip precisely because nothing looks wrong.

Rung 2: BatchManager — merge without touching shaders

app.batcher.addGroup(name, dynamic, maxAabbSize), then set batchGroupId on each member's component (render, sprite, or UI element). Use dynamic: false for geometry that never moves.

Contract: the batchGroupId setter only inserts into the batcher while entity.enabled is true, and that flag requires both the local enable state and hierarchy attachment — set batchGroupId after the entity is parented into the live tree, not before, or the member silently drops out of the group. BatchManager.generate() runs once automatically on the app's first rendered frame; if group membership changes afterward, call app.batcher.markGroupDirty(id) (or generate([id])) yourself. An Engine-only app without the full Application bootstrap must register the class via AppOptions.batchManager before it can batch anything.

Rung 3: hardware instancing — merge without touching layout

Reach for this once distinct materials or per-frame transform updates would defeat BatchManager. Build a per-instance vertex buffer with VertexFormat.getDefaultInstancingFormat(device) (one mat4 per instance), call meshInstance.setInstancing(vb), and set instancingCount. A custom vertex chunk needs its own INSTANCING code path with an identity-matrix fallback for the non-instanced case (cross-reference override-shader-chunks).

Read the full file on GitHub · 62 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. 9d ago First seen · 62 lines · 45 tokens per session scan A 870fc639e8a3

Subscribe to this mod's changes

reduce-draw-calls is a skill published in the GitHub repository playcanvas/create-playcanvas (53 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 812 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.