2d-games

2d-games is a skill for Claude Code, Codex from frogobox/frogo-sdk. It costs 57 tokens per session (781 once invoked), scanned A, original, Apache-2.0.

A guide to making two-dimensional games using sprites, tilemaps, cameras, physics, and animation. Sprites are individual game images, while tilemaps build larger scenes from repeated tiles.

In plain words
What is it for?
Use it for platformers, top-down games, canvas games, Phaser, Kaplay, PixiJS, or small interactive game areas embedded in web interfaces.
Why use it?
It provides practical principles for structuring 2D game scenes and choosing how they should run, either as a full game or inside a section of a web app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

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/frogobox/frogo-sdk/2d-games
Any agent
npx skills add frogobox/frogo-sdk --skill 2d-games
Clone the repo
git clone --depth 1 https://github.com/frogobox/frogo-sdk

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 2d-games

README.md
[![agentmods](https://agentmods.dev/badge/skills/frogobox/frogo-sdk/2d-games.svg)](https://agentmods.dev/skills/frogobox/frogo-sdk/2d-games)
Your own site
<a href="https://agentmods.dev/skills/frogobox/frogo-sdk/2d-games"><img src="https://agentmods.dev/badge/skills/frogobox/frogo-sdk/2d-games.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 781 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.00057 $0.00781
Opus 5 $0.00028 $0.00391
Sonnet 5 $0.00011 $0.00156
Haiku 4.5 $0.00006 $0.00078

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

Security

Grade A, and why

2d-games 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.

.agents/skills/game-development/2d-games/SKILL.md · 133 lines

How it starts

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

2D Game Development

Principles for 2D game systems. Pair with game-development/web-games / game-development/engine-selection for framework choice.


Shell vs guest (web)

Setup 2D systems live…
Full-screen 2D game Entire app (Phaser/Kaplay/Pixi/Canvas)
Hybrid DOM + challenges Only inside guest viewports; tear down when done

1. Sprite Systems

Component Purpose
Atlas Combine textures, reduce draw calls
Animation Frame sequences (often 8-24 FPS)
Pivot Rotation/scale origin
Layering Z-order control

Animation Principles

  • Squash and stretch for impact
  • Anticipation before action
  • Follow-through after action

2. Tilemap Design

Factor Recommendation
Size 16x16, 32x32, 64x64
Auto-tiling Use for terrain
Collision Simplified shapes
Layer Content
Background Non-interactive scenery
Terrain Walkable ground
Props Interactive objects
Foreground Parallax overlay

3. 2D Physics

Shape Use Case
Box Rectangular objects
Circle Balls, rounded
Capsule Characters
Polygon Complex shapes
  • Pixel-perfect vs physics-based: pick one approach per game
  • Fixed timestep for consistency
  • Layers for filtering

4. Camera Systems

Type Use
Follow Track player
Look-ahead Anticipate movement
Multi-target Two-player
Room-based Metroidvania
Static Board games, modal skill-checks

Screen Shake

  • Short duration (50-200ms)
  • Diminishing intensity
  • Use sparingly

5. Genre Patterns

Platformer

  • Coyote time (leniency after edge)
  • Jump buffering
  • Variable jump height

Top-down

  • 8-directional or free movement
  • Aim-based or auto-aim
  • Decide whether rotation matters

6. Anti-Patterns

Read the full file on GitHub · 133 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 · 133 lines · 57 tokens per session scan A 2c80c482dd52

Subscribe to this mod's changes

2d-games is a skill published in the GitHub repository frogobox/frogo-sdk (21 stars, last pushed 3d ago), licensed Apache-2.0. It adds 57 tokens to every session and 781 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

sceneview-web

Build 3D and WebXR (AR/VR) experiences in the browser with SceneView for Web — Filament.js (WebGL2/WASM) wrapped in a Kotlin/JS DSL and a plain-JavaScript API on window.sceneview. Use whenever the user asks for "3D in the browser", "a web model viewer", "WebXR AR/VR", or any browser 3D/AR app where the dependency is…

sceneview/sceneview · 147 tokens

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

sceneview-ios

Build 3D and AR apps on Apple platforms (iOS, macOS, visionOS) with SceneViewSwift — the SwiftUI wrapper around RealityKit. Use whenever the user asks for "3D in SwiftUI", "AR with ARKit in SwiftUI", a model viewer for iOS, or any Apple-platform 3D/AR app where the dependency is the SceneViewSwift Swift Package from…

sceneview/sceneview · 148 tokens

add-card

Implements new Magic: The Gathering cards for the Argentum Engine. Use when adding a new card, the user provides one or more card names to implement, or asks to implement a specific MTG card. Several cards that reuse existing primitives can be implemented together into one PR.

wingedsheep/argentum-engine · 0 tokens

add-feature

Adds a new feature or mechanic to the Argentum Engine (SDK primitive, effect, trigger, condition, static/replacement ability, server/client capability) following the project's architecture and SDK-elegance principles. Use when implementing engine/SDK/server/client functionality that isn't a single card — e.g. "add an…

wingedsheep/argentum-engine · 87 tokens

verify-set

Prove a Magic set is actually finished — card-for-card complete, field-for-field faithful to Scryfall, scripts that match their oracle text, tokens that resolve the set's own art, behaviourally sound — then archive its backlog. Builds the Scryfall dump and CardFieldVerificationTest, fans the per-card DSL and token…

wingedsheep/argentum-engine · 152 tokens