fixter-dev/flappy-code
flappy
Flappy Code: jump the Claude mascot through diff hunks in a pane while Claude works
About this mod
Flappy Code 是一款給 Claude Code 的模組,當 Claude 正在思考時,可透過 /flappy 指令在終端機面板中遊玩。玩家操控 Claude 吉祥物穿越紅色刪除行與綠色新增行之間的縫隙,撞到 diff 區塊會顯示 MERGE CONFLICT,落地則顯示 CORE DUMPED。支援 Space/Enter 跳躍、點擊畫面跳躍、Esc 結束,會記住最高分,並可依終端機寬度自動調整版面。
Installation
Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.
claude plugin marketplace add fixter-dev/flappy-code claude plugin install flappy
Original text / README
Get it
claude plugin marketplace add fixter-dev/flappy-code
claude plugin install flappy@flappy-code
Then type /flappy and start jumping.
Just want a quick look? Run it straight from a clone instead:
git clone https://github.com/fixter-dev/flappy-code.git
claude --plugin-dir ./flappy-code
Flappy Code is a Claude Code mod. Mods are still early access, so you need a build of Claude Code that has them switched on.
How to play
- Space jumps. So do Enter and any letter key.
- Click the game to jump too. A click also hands the game your keyboard directly, which makes it feel noticeably snappier.
- Esc quits. Press it twice if you clicked the game first.
Slip through the gap between the red removed lines and the green added lines. Clip a hunk and you
get a MERGE CONFLICT. Hit the floor and it's CORE DUMPED.
Why you'll like it
- It doesn't wait for Claude.
/flappyopens right away, even in the middle of a turn. - It knows when you're bored. After a minute of thinking, a small line above the prompt asks
if you fancy a round. Press
1to play or2to wave it off. Prefer it to just open by itself, or to stay quiet? Set When Claude thinks for a minute toopenoroffin/config. - It remembers your best score between sessions.
/flappy resetstarts you over. - It fits your terminal. Wide terminals get a tall side pane; drag its edge for a wider playfield. Narrow ones get a shorter game above the prompt, with the gap and the jump scaled to match.
- It has a plan B outside the terminal. Where the game's drawing code can't run, such as the desktop app, it draws every frame as a picture instead. That mode is experimental and a little slower, but it is the same game.
Under the hood
The game is split into small files:
hooks/physics.tsis the game itself: gravity, jumps, hunks, collisions and scoring, written as pure functions.hooks/scene.tspaints a game state: two pixels into every character cell, using half blocks.hooks/game.tsxruns the game on Claude Code's drawing thread in the terminal.hooks/picture.tsturns the same scene into an SVG for surfaces that can't run the drawing code.hooks/register.tsxwires it into Claude Code: the/flappycommand, the pane, the nudge above the prompt and the saved best score.
Hacking on it
claude plugin validate . # check the manifest and the hooks
claude plugin test . # run the tests
If the game doesn't show up somewhere, /flappy debug reports, for each surface, how big the pane is
and whether the drawing code is running there.
Pull requests and silly ideas are welcome.
License
MIT. Flappy Code is a fan project and is not affiliated with or endorsed by Anthropic.


