Community이미지github.com

pixel-learning-game

Use when building a single-file pixel-art learning game (HTML + canvas/DOM) with editable sprites. Covers pedagogy loop, pxl asset pipeline, offline deploy. Not school-specific SEN locks.

pixel-learning-game란 무엇인가요?

pixel-learning-game is a Claude Code agent skill that use when building a single-file pixel-art learning game (HTML + canvas/DOM) with editable sprites. Covers pedagogy loop, pxl asset pipeline, offline deploy. Not school-specific SEN locks.

지원 대상✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/ihateusingai-beep/pixel-learning-game-skill-pack/tree/HEAD/pixel-learning-game

Installed? Explore more 이미지 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

미리보기

스킬 README에서

pixel-learning-game preview

문서

Pixel Learning Game (general)

Build offline, single-file learning games with pixel-art assets.
Designed to share with friends who use Hermes / Claude / Cursor — no school names, no private paths.

When to Use

  • Friend/learner wants a pixel-art study game (match, quiz, collect, shop loop…)
  • Need a reproducible art → game pipeline (not one-shot AI photos)
  • Single HTML file for classroom / share link / GitHub Pages

Don't use for: photoreal/Ghibli scenes; complex multiplayer; pure photo→pixel (pixel-art skill).

Stack (locked simple)

LayerChoice
GameOne index.html (HTML+CSS+JS). Zero npm for runtime.
Artpxl-pixel-art → .px.js → PNG / sheet / base64
HostLocal double-click or GitHub Pages
AudioOptional WebAudio beeps / speechSynthesis

Requires: Node ≥ 22.18 only when building sprites. Players need a browser only.

Pedagogy loop (always)

Cover → Choose task → Act → Feedback → Retry / Next → Certificate(optional)
RuleWhy
One learning goal per modeSplit “math skill” vs “value/behavior” if both exist
Big hit targetsButtons ≥ ~48px; prefer tap over tiny drag
Few wordsIcons + 1 short line; TTS optional
Wrong ≠ shameNeutral teach copy; avoid red punish titles
Stars only for the real goalDon’t auto-star every click
No cross-session student dataAvoid localStorage if shared devices (or clear on cover)
Delay spoilersDon’t flash correct before the learner answers

Project layout

my-game/
  index.html          # game (ship this)
  art.px.js           # pixel source (edit this)
  out/                # pxl build output (gitignore OK)
  assets/             # optional exported PNGs
  README.md

Start from templates/ in this skill.

Workflow

1) Copy template

SKILL="$HOME/.hermes/skills/creative/pixel-learning-game"
mkdir -p ~/games/my-pixel-quiz && cd ~/games/my-pixel-quiz
cp "$SKILL/templates/index.html" .
cp "$SKILL/templates/art.px.js" .
cp "$SKILL/templates/README.md" .

2) Draw sprites (pxl)

PXL="$HOME/.hermes/skills/creative/pxl-pixel-art/bin/pxl.js"
node "$PXL" build art.px.js --out ./out
node "$PXL" ascii art.px.js slime   # geometry check; don't rely on vision

Rules of thumb:

  • Silhouette first (mx + outline), glow last
  • 1 signature feature per character so upscaled cards stay distinct
  • Rebuild with --only name while iterating; full build before ship
  • In-game: CSS image-rendering: pixelated — upscale display, keep source small

3) Wire art into HTML

A. External PNG (multi-file OK offline if same folder):

<img class="px" src="out/sprites/slime.png" alt="slime" />
.px { image-rendering: pixelated; width: 96px; height: auto; }

B. Single-file Pages (recommended for share): embed base64 after build.

python3 - <<'PY'
import base64, pathlib
p = pathlib.Path("out/sprites/slime.png")
b64 = base64.b64encode(p.read_bytes()).decode()
print(f"const SPR = {{ slime: 'data:image/png;base64,{b64}' }};")
PY

Paste into index.html. Every art change → rebuild → re-embed.

4) Implement the loop in HTML

Minimum screens:

  1. cover — title + Start
  2. play — question / pick / act
  3. result — short feedback
  4. optional cert — name + stars + print

Use a tiny state machine:

const state = { screen: "cover", score: 0, index: 0 };
function go(name) {
  state.screen = name;
  document.querySelectorAll("[data-screen]").forEach((el) => {
    el.hidden = el.dataset.screen !== name;
  });
}

5) Ship

# local
open index.html

# GitHub Pages (friend can copy)
git init -b main
echo out/ >> .gitignore
git add index.html art.px.js README.md assets 2>/dev/null
git commit -m "feat: pixel learning game v1"
# gh repo create my-pixel-quiz --public --source=. --remote=origin --push
# enable Pages: branch main / root

Done when: double-click works offline; sprites readable at game size; one full loop playable; wrong path teaches without shame.

Starter content ideas

ModeLearner doesPixel need
MatchPick same item as carditem sprites × N
Shape shopTake only listed shapesshape props + player
Quiz STGAnswer to shoot theme enemy3 enemies + FX
CollectGather N coins, avoid junkhero + coin + junk

Keep one mode working before adding a second.

Pair skills

SkillRole
pxl-pixel-artAuthor sprites as code (required)
pixel-artPhoto → retro (optional mood art only)
gamedev-feelLight juice (shake ≤4–8px, hit-stop, SFX) — never hide answers
single-file-canvas-gameIf you go full Canvas FSM / bullets

Common pitfalls

  1. AI photo as main gameplay icon — style drift + uneditable. Prefer pxl.
  2. Shame feedback — “你好蠢/錯晒” kills learning games.
  3. Star spam — stars must mean the goal behavior.
  4. localStorage on shared tablets — next student inherits progress.
  5. Updated PNG, stale base64 — always re-embed for single-file.
  6. Tiny text, tiny hitboxes — fail on touch devices.
  7. Confusing pixel-art vs pxl-pixel-art — former converts photos; latter authors .px.js.
  8. Glow before silhouette — unreadable blobs.
  9. npm runtime deps — breaks offline classroom share.

Verification checklist

  • node $PXL build art.px.js --out ./out exits 0
  • out/sprites/*.png exist; silhouette OK in ascii
  • index.html full loop: start → act → feedback → retry
  • Offline: open file:// or local static server works
  • Touch targets large; no essential hover-only UI
  • Wrong answer shows teach line, not only red X
  • If single-file: base64 matches latest build

Templates in this skill

  • templates/index.html — minimal match quiz shell + pixel CSS
  • templates/art.px.js — slime / coin / heart starter pack
  • templates/README.md — friend-facing short guide
  • references/pedagogy.md — deeper learning rules
  • references/canvas-pixel.md — canvas/DOM pixel tips

Install (friend)

See root INSTALL.md of the shared pack repo, or:

# if they use Hermes
mkdir -p ~/.hermes/skills/creative
# copy pixel-learning-game/ and pxl-pixel-art/ into that folder
# new chat session → skill_view name=pixel-learning-game

Without Hermes: open SKILL.md + templates/ and follow Workflow manually (any AI agent can read the markdown).

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

관련 스킬