spritecook-use-dual-grid-tilesets

spritecook-use-dual-grid-tilesets is a skill for Claude Code from SpriteCook/claude-plugin. It costs 61 tokens per session (1,107 once invoked), scanned A, a copy of spritecook-use-dual-grid-tilesets, MIT.

A guide for rendering SpriteCook's 15-piece top-down terrain tilesets in a game. A tileset is an image containing reusable map pieces; the guide explains how neighboring terrain cells select the correct piece.

In plain words
What is it for?
Implementing terrain edges and transitions with SpriteCook tilesets in a game engine or custom renderer.
Why use it?
It removes the guesswork from converting the tileset's four-cell patterns into the atlas frames used by the renderer.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the spritecook plugin — 9 skills, 1 MCP server shipped together

Good fit Implementing terrain edges and transitions with SpriteCook tilesets in a game engine or custom renderer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets
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 SpriteCook/claude-plugin --skill spritecook-use-dual-grid-tilesets
Clone the repo
git clone --depth 1 https://github.com/SpriteCook/claude-plugin

Made for: Claude Code.

Or install spritecook, the plugin that ships this one along with the rest of its 9 skills, 1 MCP server.

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 spritecook-use-dual-grid-tilesets

README.md
[![agentmods](https://agentmods.dev/badge/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets/github.svg)](https://agentmods.dev/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets)
Your own site
<a href="https://agentmods.dev/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets"><img src="https://agentmods.dev/badge/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets/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 spritecook-use-dual-grid-tilesets

Your own site · 80×15
<a href="https://agentmods.dev/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets"><img src="https://agentmods.dev/badge/skills/spritecook/claude-plugin/spritecook-use-dual-grid-tilesets.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 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.
Origin 100% copy Near-identical to another mod 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.00061 $0.01107
Opus 5 $0.00030 $0.00553
Sonnet 5 $0.00012 $0.00221
Haiku 4.5 $0.00006 $0.00111

Measured 11d ago against content hash 7364a1b91538, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

spritecook-use-dual-grid-tilesets 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 11d 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

This is a copy

100% identical to spritecook-use-dual-grid-tilesets — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/spritecook-use-dual-grid-tilesets/SKILL.md · 128 lines

How it starts

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

SpriteCook Dual-Grid 15-Piece Tilesets

Use this skill when implementing a top-down 15-piece SpriteCook tileset in a game engine or custom renderer.

This skill is about using a generated tileset. For generation, use spritecook-generate-tilesets.

Concept

A dual-grid tileset stores terrain as logical painted cells, then renders visible tiles between those cells. Each rendered tile is chosen from the four logical cells around it.

For each rendered tile, sample:

  • top-left logical cell
  • top-right logical cell
  • bottom-left logical cell
  • bottom-right logical cell

That four-cell pattern becomes a 4-bit mask. The mask chooses one frame from the 4x4 15-piece atlas.

Mask Order

Use SpriteCook's current mask bit order:

let mask = 0
if (filled(x - 1, y - 1)) mask |= 1 // top-left
if (filled(x,     y - 1)) mask |= 2 // top-right
if (filled(x - 1, y    )) mask |= 4 // bottom-left
if (filled(x,     y    )) mask |= 8 // bottom-right

Mask 0 renders nothing. Other masks map into the 4x4 atlas through this lookup:

const frameByMask = [
  -1,
  15,
  8,
  9,
  0,
  11,
  14,
  7,
  13,
  4,
  1,
  10,
  3,
  2,
  5,
  6,
]

The atlas cell is:

const frame = frameByMask[mask]
if (frame < 0) return null
const atlasColumn = frame % 4
const atlasRow = Math.floor(frame / 4)

Renderer Pseudocode

type CellMap = boolean[] // width * height logical terrain cells

function cellIndex(x: number, y: number, columns: number) {
  return y * columns + x
}

function isFilled(cells: CellMap, x: number, y: number, columns: number, rows: number) {
  return x >= 0 && y >= 0 && x < columns && y < rows && cells[cellIndex(x, y, columns)] === true
}

function dualGridMask(cells: CellMap, x: number, y: number, columns: number, rows: number) {
  let mask = 0
  if (isFilled(cells, x - 1, y - 1, columns, rows)) mask |= 1
  if (isFilled(cells, x,     y - 1, columns, rows)) mask |= 2
  if (isFilled(cells, x - 1, y,     columns, rows)) mask |= 4
  if (isFilled(cells, x,     y,     columns, rows)) mask |= 8
  return mask
}

function atlasCellForMask(mask: number) {
  const frameByMask = [-1, 15, 8, 9, 0, 11, 14, 7, 13, 4, 1, 10, 3, 2, 5, 6]
  const frame = frameByMask[Math.max(0, Math.min(15, Math.floor(mask)))]
  if (frame < 0) return null
  return { column: frame % 4, row: Math.floor(frame / 4) }
}

function renderDualGrid(ctx, atlasImage, cells: CellMap, columns: number, rows: number, tileSize: number) {
  for (let y = 0; y <= rows; y += 1) {
    for (let x = 0; x <= columns; x += 1) {
      const mask = dualGridMask(cells, x, y, columns, rows)
      const atlasCell = atlasCellForMask(mask)
      if (!atlasCell) continue

      ctx.drawImage(
        atlasImage,
        atlasCell.column * tileSize,
        atlasCell.row * tileSize,
        tileSize,
        tileSize,
        x * tileSize,
        y * tileSize,
        tileSize,
        tileSize,
      )
    }
  }
}

Read the full file on GitHub · 128 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. 11d ago First seen · 128 lines · 61 tokens per session scan A 7364a1b91538

Subscribe to this mod's changes

spritecook-use-dual-grid-tilesets is a skill published in the GitHub repository SpriteCook/claude-plugin (17 stars, last pushed 24d ago), licensed MIT. It adds 61 tokens to every session and 1,107 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to spritecook-use-dual-grid-tilesets, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories