ClaudeMods
☰
KO
● — 명 접속 중 · 조회 — 회
후원프로젝트 제출
GitHub 저장소 · 작성자 germanfndez

cc-range

함수 후크를 사용해 Claude Code 프롬프트 위에서 실행되는 1인칭 픽셀 아트 사격장으로, 30초 라운드, 순환 배경, 칩튠 오디오를 갖추고 있습니다.

번역 완료

이 mod 소개

cc-range는 프롬프트 위에 플레이 가능한 1인칭 사격장을 배치하는 Claude Code 플러그인입니다. 함수 후크를 사용해 픽셀 아트를 렌더링하고 포인터와 키보드 입력을 캡처하며 토큰을 소비하지 않고 실행됩니다. 플레이어는 30초 라운드 동안 작아지고 더 빠르게 움직이는 표적을 조준합니다. 8개의 순환 배경과 합성 사운드 및 음악이 있습니다. README는 설치 명령, 조작법, 개발 도구를 제공하며 함수 후크와 대화형 터미널이 필요하다고 명시합니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add germanfndez/cc-range
claude plugin install cc-range@cc-range
원문 / README

cc-range

A first-person shooting gallery that lives above the Claude Code prompt. Pixel art drawn with quadrant blocks, a pistol in your hand, a bullseye on a wall: aim with the pointer, fire, and every hit moves the target somewhere else and adds a point.

It runs on function hooks, so it draws itself, takes your mouse and keyboard, and costs zero tokens. You can play it while Claude works.

cc-range running above the prompt

Thirty seconds from the first shot. Every hit makes the next target smaller, faster, and shorter-lived — 2.7 seconds on its fuse at the start, three quarters of one by the end. Let the fuse run out and the target leaves on its own, and takes your streak with it.

Needs function hooks (early access, CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1) and an interactive terminal.

Install

/plugin marketplace add germanfndez/cc-range
/plugin install cc-range@cc-range

Then /range. Click the board once to give it the keyboard; Esc hands it back to the prompt.

Working on it instead? CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir /path/to/cc-range.

| | | |---|---| | move the pointer | aim | | click, space, f | fire | | wasd or the arrows | aim without a mouse | | the green plate | starts the round — it costs no shot | | r | restart | | m | mute, sound and music both | | q | close the board | | /range stop | close it from the prompt | | /range reset | clear the record |

The clock only starts when you fire, so the board can sit open while you work. The record is on screen under the score, and it and the mute setting live in $.store, so they outlast the session. Misses leave holes in the wall.

Eight backdrops, and one takes over every five seconds

Dawn, noon, a meadow, dusk, a starlit night, rain, snow, and the desert — each with its own sky, ridges, and weather: sun, birds, clouds, stars, rainfall, snowfall, cacti. The barrier changes with it, so it is planks, then brick, then nothing but posts in open grass, then hay bales, corrugated iron, wet stone, a rope of bunting, and an adobe wall.

a brick wall at noon

a meadow on posts, with no wall at all

planks at dawn

Everything you hear is synthesised by the two scripts in tools/: the shot, the ring of the plate, the miss, and a sixteen-bar chiptune in A minor that plays under the whole thing. Nothing here is sampled from anyone.

Where it came from

anthropics/claude-code#91870 proposes function hooks — TypeScript that hooks into Claude Code the way Express middleware hooks into a request, up to and including the React tree it renders. Buried in that thread, sezaakgun posted cc-arcade: Tetris and seven other games above the prompt, playable while Claude works. That comment is why this exists.

Its write-up saved me the first day of the work.

Develop

bun tools/preview.ts 110 30 3       # one frame, in this terminal
bun tools/shot.ts out.png 110 30    # the same frame as a PNG, to judge the art
SCENE=3 bun tools/shot.ts out.png   # hold one backdrop still
MODE=ready bun tools/shot.ts out.png
node tools/make-sounds.mjs          # re-render the effects
node tools/make-music.mjs           # re-render the loop
bunx tsc --noEmit -p tsconfig.json  # run /plugin-types in Claude Code first,
                                    # which writes .claude/types

tools/shot.ts packs the canvas into quadrant cells and paints each one back out at 4×, so the PNG is exactly what the terminal shows. Judging pixel art by squinting at ANSI in a scrollback is not a thing you can do.

Layout

hooks/register.tsx      the command, the store, the sounds, the music, the AbovePrompt band
hooks/boards/range.tsx  the surface module: frame clock, keys, pointer
hooks/boards/scene.ts   one frame of the range, into a pixel canvas
hooks/boards/paint.ts   the canvas, a 5×7 face, and the quadrant packing
hooks/game/range.ts     the target, the aim, the clock, and what a shot does
tools/                  preview, PNG capture, and the two synthesisers

paint.ts is carried over from cc-flappy, an earlier plugin of mine, which is where the canvas and the quadrant packing were worked out.

MIT.

배지 받기

내 프로젝트인가요? 이 배지를 README나 웹사이트에 넣으면 이 페이지로 연결됩니다.

Featured on ClaudeMods
크기
테마
Markdown
HTML

비슷한 프로젝트