atlas-crop

atlas-crop is a skill for Claude Code, Codex from zhuanggenhua/BoardGame. It costs 36 tokens per session (1,127 once invoked), scanned A, original, MIT.

A reusable workflow for cutting individual images from a sprite atlas, which is one image containing many game frames or tiles. It supports regular and irregular layouts and sample checks of the exported pieces.

In plain words
What is it for?
Use it to export atlas frames, adjust small cutting offsets, handle custom row and column sizes, and inspect sample outputs.
Why use it?
It helps ensure each exported image matches how the game will display it and that important content is not cut off or shifted.

Skill for Claude CodeCodex

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

Good fit Use it to export atlas frames, adjust small cutting offsets, handle custom row and column sizes, and inspect sample outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhuanggenhua/boardgame/atlas-crop
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 zhuanggenhua/BoardGame --skill atlas-crop
Clone the repo
git clone --depth 1 https://github.com/zhuanggenhua/BoardGame

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 atlas-crop

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/atlas-crop/github.svg)](https://agentmods.dev/skills/zhuanggenhua/boardgame/atlas-crop)
Your own site
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/atlas-crop"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/atlas-crop/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 atlas-crop

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/atlas-crop"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/atlas-crop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 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.00036 $0.01127
Opus 5 $0.00018 $0.00563
Sonnet 5 $0.00007 $0.00225
Haiku 4.5 $0.00004 $0.00113

Measured 13d ago against content hash 6447c6375b01, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

atlas-crop 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 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/extract-atlas-crops.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.spec/skills/atlas-crop/SKILL.md · 67 lines

How it starts

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

通用图集裁切(可复用)

用于从任意图集裁出单元图块,并做抽样检查(关键内容是否被裁掉、是否偏移)。
目标:裁切结果与运行时渲染一致,关键内容不被裁掉。

规范来源与职责边界

  • 本 skill 是 workflow:只承载图集裁切脚本、参数和抽样验收步骤。
  • 正式素材主源、压缩产物、manifest、运行时资源链和图集语义门禁,以 .spec/knowledge/standards/asset-pipeline.mdcanonical-source
  • 数据录入核对合同以 .spec/knowledge/standards/data-entry.mdcanonical-source
  • 本 skill 不把资源规范或录入规范复制成第二份正文;若冲突,先改规范主源。

适用场景

  • 新图集出现轻微左/右偏,需要微调裁切偏移
  • 需要批量导出 slot-xx.webp/png 做目检
  • 使用不规则网格(colStarts/rowStarts/colWidths/rowHeights)裁切

先决条件

  • Python 3
  • Pillow(若缺失:pip install pillow
  • 裁切输入必须是原始图集、原始单图或同等清晰度源文件;contact-*all-by-size-*、截图总览、缩略索引页只允许用于定位和索引,禁止作为运行时主素材裁切源。
  • 如果目标产物会进入 public/assets/** 并被正式页面引用,必须先在资源映射里记录原始 atlas 文件、裁剪坐标、导出尺寸和验收截图;从低清索引图导出的产物只能标记为临时占位,不能标为正式 runtime。

脚本

./.spec/skills/atlas-crop/scripts/extract-atlas-crops.py

快速流程

  1. 锁定源图真相
    • 先确认 --image 指向原始 atlas / 原始单图,而不是联系表、索引总览或截图缩略图。
    • 如果只有低清索引图,先停止正式裁切;只能生成临时目检产物或明确标注为 temporary-runtime-placeholder
  2. 准备配置 JSON(或规则网格参数)
    • SpriteAtlasConfig(网格)imageW/imageH/cols/rows/colStarts/colWidths/rowStarts/rowHeights
    • SpriteAtlasConfig(frames 列表)imageW/imageH + frames: [{x,y,width,height}]
    • TexturePacker(frames map)meta.size.w/h + frames: { key: { frame: {x,y,w,h}} }
    • 规则网格(无 JSON):使用 --grid-rows/--grid-cols + 可选 --cell-w/--cell-h/--gap-x/--gap-y/--start-x/--start-y
  3. 执行裁切脚本(在仓库根目录运行)
    python ./.spec/skills/atlas-crop/scripts/extract-atlas-crops.py \
      --image "public/assets/i18n/<locale>/<gameId>/<category>/compressed/<atlas>.webp" \
      --config "public/assets/atlas-configs/<gameId>/<atlas>.atlas.json" \
      --out "temp/<gameId>/atlas-crops-YYYYMMDD-HHMMSS/<batch>" \
      --shift-x -0.5 \
      --max-index 31
    
  4. 抽样验收(必须)
    • 先看整图理解结构,再看单卡是否偏移/被裁
    • 如仍偏移:微调 shift-x/shift-y(0.5~1px 级别)后重跑

验收要点(必看)

  • 关键内容完整可见(如角标、角标数字、右侧符号等)
  • 边界不过裁、不留异常大空白
  • 若图集本身有“空白/占位”区域,需先确认结构再判定是否异常

注意事项

  • 不要提交 temp/ 产物,仅用于目检与交付。
  • 运行时偏移与脚本偏移必须一致,否则裁切结果与实际渲染不一致。
  • 输出目录建议包含时间戳,避免残留旧 slot 误判。

Read the full file on GitHub · 67 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago First seen · 67 lines · 36 tokens per session scan A 6447c6375b01

Subscribe to this mod's changes

atlas-crop is a skill published in the GitHub repository zhuanggenhua/BoardGame (23 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 1,127 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.

Related

Other skills, from other repositories

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens