메뉴
HN
Hacker News • 58일 전

Claude Code로 체스 게임을 분석하는 스킬 공개

IMP
5/10
핵심 요약

한 개발자가 Claude Code 스킬을 만들어 자신의 체스 게임을 Stockfish 엔진 검증을 거친 쉬운 말 설명과 내레이션 영상으로 변환하는 포스트모템 도구를 공개했습니다. 게임 중 사고 과정을 녹음하면 whisper.cpp로 전사하고 PGN 시계 정보로 각 수와 매칭해, AI가 실제 플레이어의 사고를 반박하거나 확인해줍니다. 전체 처리에 약 1시간이 걸리지만 빠른 게임이 아닌 래피드·통신 체스 복기에 유용합니다.

번역된 본문

Claude Code용 체스 포스트모템 스킬

Claude Code 스킬로, 자신의 체스 게임 하나를 실제로 읽을 수 있는 포스트모템으로 변환합니다. 실수에 대한 평이한 언어의 설명(Stockfish로 검증됨)과 게임 전체의 내레이션 영상이 포함됩니다.

영상 out-010.mp4 플레이어가 로드되지 않으면(GitHub 로그인 필요) mp4를 직접 보세요(10MB). 6분 49초, 영어 내레이션, 자막 포함. 이건 실제 제 게임입니다: lichess에서 15+10 래피드(5KmlrdyT), 백으로 오픈 시실리안 대 나ydorf, 레이팅 약 1700. 게임 중 보드 옆에서 단순 녹음기로 프랑스어로 생각을 소리 내어 말하며 녹음했습니다. 게임 후 Claude에게 lichess 링크와 mp3를 주었습니다. Claude는 whisper.cpp로 로컬에서 오디오를 전사하고, PGN의 시계 시간을 이용해 각 문장을 그 순간 결정 중이던 수와 매칭했습니다. 그래서 영상에서 "8수째에 비숍을 c4에 둘지 e2에 둘지 스스로 물었죠"라고 말할 때, 그건 제 실제 질문이며 엔진으로 답해준 것입니다. 영상이 보여주는 모든 것(전사본, Stockfish 스윕, 주석 달린 PGN, 스토리보드)은 examples/game-010/에 있습니다.

왜 만들었나 Stockfish 분석은 숫자와 변형을 줍니다. 읽기 재미없고, 이유를 말해주지 않는 경우가 많죠: "수 이후 -1.8, 그리고 실전에서 절대 못 찾을 12수 변화". 저는 Claude가 Stockfish를 직접 구동할 수 있다는 걸 깨달았습니다. 사람이 물을 법한 질문을 엔진에 던지고("내가 둔 수는 왜 안 되지?", "흑이 그냥 잡으면?"), 답이 이해될 때까지 계속 물어보고, 사람의 언어로 정리합니다. 그리고 대국 중 제 생각을 알기 때문에 추측이 아닌 실제 추론을 반박할 수 있습니다. 분석 후에도 어떤 포지션이든 계속 질문할 수 있고, 답하기 전에 엔진으로 검증합니다.

당신에게 맞나요? 아마도 그렇다: 느린 게임이나 래피드를 두고 평가 그래프가 떨어진 지점만 보는 게 아니라 배우고 싶을 때; 내 컴퓨터에서 Claude Code를 실행하는 데 괜찮을 때; 대국 중 메모를 남기거나 말할 의향이 있을 때(선택사항이지만, 이게 결과를 흥미롭게 만듭니다). 아마도 아니다: 블리츠 게임을 빠르게 확인하고 싶을 때. Lichess나 chess.com 분석이 몇 초 만에 해줍니다.

시간이 걸립니다. 전체 실행(스윕, 조사, 주석, 영상)에 약 1시간의 처리 시간이 듭니다. 모든 게임이 아니라 시간을 들여 생각한 게임에 사용하세요.

생각을 전달하세요. 게임 전체를 담은 필기 메모나 음성 녹음을 넘기는 것을 강력히 권합니다. 없어도 좋은 엔진 설명은 얻지만, 있으면 추론에 대한 리뷰를 얻습니다: 어떤 우려가 타당했는지, 어떤 계획이 올랐는지, 어떤 질문을 스스로 했고 답이 무엇이었는지.

환각. AI는 여전히 틀릴 수 있습니다. 모든 주장은 Stockfish로 검증되고 검증 패스가 결과를 다시 읽으므로, 경험상 오류는 드뭅니다. 이상해 보이면 Claude에게 그 포지션을 엔진으로 확인하라고 하세요.

나의 작업 흐름

  1. 생각할 시간이 있는 게임을 둔다(15+10 래피드 또는 통신 체스).
  2. 대국 중 소리 내어 생각하기를 녹음한다(아무 폰이나 웹 녹음기).
  3. 통신 체스는 대신 수마다 메모를 쓴다.
  4. 게임 후 Claude Code를 열고 "이 게임 분석해줘: <링크>, 사고 녹음 여기 있어: "라고 말한다.
  5. 약 한 시간 기다린다. 주석 달린 PGN과 독립 실행형 HTML 분석 보드를 받는다.
  6. 영상을 요청한다: "이 게임 영상 만들어줘".
  7. 읽고, 보고, 아직 이해 안 되는 포지션에 대해 질문한다.

스킬 구성

  • chess-analysis: 모든 수의 Stockfish 스윕 후, 병렬 "조사관" 서브에이전트가 순진한 질문으로 엔진을 조회해 모든 실수가 설명될 때까지 진행. 산출물: 계층적 주석 PGN, 독립 실행형 HTML 분석 보드, 게임당 한 번의 양측 계획을 엔진에서 도출하는 "계획 휴식". 사고 녹음 처리: whisper.cpp 전사, PGN 시계로 수와 정렬.
  • chess-video: 내레이션 영상(원문 잘림)
원문 보기
원문 보기 (영어)
Chess post-mortem skills for Claude Code Claude Code skills that turn one of your chess games into a post-mortem you can actually read: plain-language explanations of your mistakes, checked against Stockfish, and a narrated video of the whole game. The video out-010.mp4 If the player above does not load (it needs a GitHub login), watch the mp4 directly (10 MB) . 6:49, English narration, subtitles. This is a real game of mine: a 15+10 rapid on lichess ( 5KmlrdyT ), White, Open Sicilian against a Najdorf, around 1700. During the game I recorded myself thinking aloud, in French, with a plain voice recorder running next to the board. After the game I gave Claude two things: the lichess link and the mp3. Claude transcribed the audio locally with whisper.cpp, then used the clock times in the PGN to match each sentence to the move I was deciding at that moment. So when the video says "at move eight you asked yourself whether the bishop belongs on c4 or e2", that is my own question, answered with the engine. Everything the video shows (the transcript, the Stockfish sweep, the annotated PGN, the storyboard) is in examples/game-010/ . Why this exists A Stockfish analysis gives you numbers and lines. It is not fun to read, and often it does not tell you why : -1.8 after your move, and a 12-move variation you would never find at the board. I realized Claude can drive Stockfish itself. It asks the engine the questions a human would ask ("why not the move I played?", "what if Black simply takes?"), keeps asking until the answer makes sense, and writes it down in human terms. And since it knows what I was thinking during the game, it can refute my actual reasoning instead of a guessed one. After the analysis I can keep asking my own questions about any position, and it checks them with the engine before answering. Is it for you? Probably yes if: you play slow or rapid games and want to learn from them, not just see where the eval bar dropped; you are fine running Claude Code on your machine; you are willing to take notes or talk during the game (optional, but this is what makes the result interesting). Probably not if you want a quick check of a blitz game. Lichess or chess.com analysis does that in seconds. It takes time. A full run (sweep, investigations, annotations, video) takes around one hour of processing. Use it on games where you took the time to think, not on every game you play. Give it your thoughts. I strongly recommend passing your written notes or an audio recording covering the whole game. Without them you get a good engine explanation. With them you get a review of your reasoning: which fears were justified, which plans were sound, which questions you asked yourself and what the answer was. Hallucinations. The AI can still get something wrong. Every claim is checked against Stockfish and a verifier pass re-reads the result, so in my experience errors are rare. If something looks off, ask Claude to check that position with the engine. My workflow Play a game with some time to think (15+10 rapid, or correspondence). Record myself thinking aloud during the game (any phone or web voice recorder). For correspondence games, I write notes per move instead. After the game, open Claude Code and say something like: "analyze this game: , here is my think-aloud recording: ". Wait about an hour. I get an annotated PGN and a standalone HTML analysis board. Ask for the video: "make a video of this game". Read, watch, then ask questions about the positions I still do not understand. The skills skill what it does chess-analysis Stockfish sweep of every move, then parallel "investigator" subagents that interrogate the engine with naive questions until every mistake is explained. Output: a layered annotated PGN, a standalone HTML analysis board, and one "plan pause" per game where both sides' plans are derived from the engine. Handles the think-aloud recording: whisper.cpp transcription, alignment to moves via the PGN clocks. chess-video A narrated video of the whole game (board, arrows, eval gauge, piper TTS, burned-in subtitles) built from a storyboard, plus an interactive HTML viewer. chess-play Play a game against Claude over PGN files, with the board rendered to PNG for vision and adversarial blunder-check subagents. No engine. The skills are written for Claude to read, so the SKILL.md files double as the documentation. Start with skills/chess-analysis/SKILL.md . Install Copy (or symlink) the skill folders into .claude/skills/ of your project, or into ~/.claude/skills/ for all projects: git clone https://github.com/brumar/chess-postmortem-skills cp -r chess-postmortem-skills/skills/ * ~ /.claude/skills/ Then ask Claude something like "analyze this game: " or "make a video of game 010". Requirements You do not need to set these up by hand. Claude Code can most likely install them for you: ask it to "install the dependencies for the chess skills" and it will read the list below and the SKILL.md files. Python venv with python-chess , cairosvg (analysis), plus pillow , piper-tts for the video. The skills assume a .venv-chess at the repo root and create it if missing. Stockfish. scripts/get_stockfish.sh uses $STOCKFISH or the one on PATH, else downloads the official Linux binary. For video: ffmpeg , and a piper voice (download command in chess-video/SKILL.md ). Optional: whisper.cpp for think-aloud transcription. Game files live in a chess-games/ folder at the root of the project you run Claude in ( games/ , boards/ , video/ ). Tell Claude your level Every comment is pitched at a reader level ( audience.level in annotations.json ). For your own games, tell Claude your level once and make it stick, for example in your CLAUDE.md : My lichess handle is <handle>. Write chess analysis for a 1800 player. Without it, the skill uses the PGN's Elo for the reviewed side and asks when that is missing or provisional. Example files: game 010 file stage games/010-...pgn input, as exported from lichess games/010-transcript-fr.md think-aloud transcript, whisper.cpp, clock-aligned per ply games/010-...-sweep.json per-ply Stockfish evals (depth 22) games/010-frag-*.json annotation fragments returned by each investigator / the plan pause / the brief-comment pass games/010-analysis-*.json engine lines each investigator discovered ( query.py --log sidecars) games/010-assemble.py , 010-annotations.json fragments merged into the build spec games/010-...-annotated.pgn the deliverable of stage 2 games/010-...-viewer.html standalone analysis board, open it in a browser video/storyboard-010.json storyboard for stage 3 video/out-010.mp4 , .srt , .html the narrated video (6:49), subtitles, and annotation viewer To regenerate the video, download the piper voice into examples/game-010/video/voices/ and run make_video.py on the storyboard. License MIT, except the vendored chess.js (BSD 2-Clause) and the cburnett piece set (CC BY-SA / GFDL). See LICENSE .
관련 소식