{"slug": "claude-code-now-turns-lichess-games-into-commented-videos", "title": "Claude Code now turns Lichess games into commented videos", "summary": "A developer built a Claude Code workflow that combines Claude's visual processing with a local Stockfish engine to generate fully commented videos of Lichess games from board screenshots and audio notes, bypassing standard PGN injection. Analyzing a single 40-move game took roughly an hour and consumed about $15 in tokens at current API rates, and the developer notes vision recognition can occasionally misread piece orientation on cluttered screenshots. The workflow fetches the last game ID and PGN via the Lichess API, runs Stockfish evaluations, merges engine output with user audio transcripts, and renders video with ffmpeg overlay text.", "body_md": "# Claude Code now turns Lichess games into commented videos\n\nI used to think feeding PGN files into an LLM was the only way to get decent chess analysis. It’s dry, mechanical, and misses the context of why you played a move. I decided to test a different approach: forcing [Claude Code](https://promptcube3.com/en/tags/claude%20code/) to rely on vision and natural language instead of raw data streams.\n\nThe experiment worked better than expected. By combining [Claude](https://promptcube3.com/en/tags/claude/)’s visual processing with Stockfish’s engine evaluation, I built a workflow that takes my live audio notes (or simple text prompts) and generates a fully commented video of my recent Lichess games. It’s not instant, but it captures the actual decision-making process rather than just highlighting tactical blunders.\n\n### How the workflow operates\n\nThe core idea is to bypass standard PGN injection. Instead, I provide Claude with screenshots or visual representations of the board state alongside my voice notes describing my thought process. The prompt is intentionally vague, like “analyze my last lichess game.” Claude handles the heavy lifting by orchestrating a local Stockfish instance to evaluate positions while interpreting my commentary.\n\nHere is the basic logic flow I used in the `skill.md` file:\n\n```\n# Step 1: Fetch the last game ID and PGN via Lichess API\ncurl -s \"https://lichess.org/api/game/user/$USER\" | jq -r '.games[0].id'\n\n# Step 2: Run Stockfish analysis on specific moves\nstockfish << EOF\nuci\nisready\nsetoption name Hash value 64\nposition fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\neval\nEOF\n\n# Step 3: Combine engine evals with user audio transcript\n# Step 4: Generate video using ffmpeg with overlay text\n```\n\nThe system doesn’t just spit out evaluations. It reflects on my own thinking during the game. If I hesitated on a knight fork because I was tired, the analysis notes that fatigue pattern. That makes it a teaching tool rather than just a calculator.\n\n### The cost and time trade-off\n\nThis isn’t a lightweight script. Running a full game analysis burns through tokens quickly because the model processes multiple visual states and cross-references engine lines. In my last session, analyzing a single 40-move game took roughly an hour to complete. The token usage added up to about $15 at current API rates.\n\nThat price tag is steep for casual play. However, the output is a memorable video file where every key moment is annotated with both engine stats and my original intent. It’s far more pleasant than clicking through endless Stockfish branches in a browser tab.\n\n### Why this matters for learning\n\nMost players ignore the psychological aspect of their games. We look at the board, but we don’t capture the mental state. By integrating audio notes, this Claude Code skill preserves the “why” behind the moves. It’s imperfect—the vision recognition can occasionally misread a piece orientation if the screenshot is cluttered—and the latency is high. But for serious study, connecting engine precision with human narrative creates a richer learning loop.\n\nIf you want to try it yourself, ensure your API quota can handle the load. The token burn is real, but the resulting annotated video is something you can revisit without needing the board state open. It turns a static replay into a documented case study of your own improvement.\n\n[Next Claude Code skill turns chess audio into commented video →](https://promptcube3.com/en/threads/9651/)\n\n## All Replies （5）\n\nWant a live back-and-forth? [Join the global AI chat room](https://promptcube3.com/en/chat/) — login to talk.\n\nChess.com does engine analysis, but using Claude Code's vision on the board instead of PGN data is a different beast.\n\nSkipping the mechanical PGN input for vision is a bold move, but integrating Stockfish keeps the chess analysis grounded.\n\nForcing Claude Code to use vision instead of raw PGN is the interesting part; Stockfish-backed commentary feels much more useful.", "url": "https://wpnews.pro/news/claude-code-now-turns-lichess-games-into-commented-videos", "canonical_source": "https://promptcube3.com/en/threads/9652/", "published_at": "2026-09-28 16:04:42+00:00", "updated_at": "2026-09-28 16:20:08.628325+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "large-language-models", "generative-ai"], "entities": ["Claude Code", "Claude", "Stockfish", "Lichess", "ffmpeg"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/claude-code-now-turns-lichess-games-into-commented-videos", "markdown": "https://wpnews.pro/news/claude-code-now-turns-lichess-games-into-commented-videos.md", "text": "https://wpnews.pro/news/claude-code-now-turns-lichess-games-into-commented-videos.txt", "jsonld": "https://wpnews.pro/news/claude-code-now-turns-lichess-games-into-commented-videos.jsonld"}}