chess-best-move

Detect chess pieces from board images and verify optimal legal moves.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill chess-best-move-bianhaifeng789-hue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chess-best-move
Source: https://github.com/bianhaifeng789-hue/openclaw-config/tree/main/skills/tb2/chess-best-move
Command: npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill chess-best-move-bianhaifeng789-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-chess, stockfish, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill converts noisy board photos or screenshots into a validated chess position and identifies the optimal legal move or forced mate sequence, avoiding guesswork when detection is uncertain.

Core Features & Use Cases

  • Image Calibration: Sample exact board square and piece RGB signatures to reliably distinguish pieces from squares across varied lighting and board styles.
  • Piece Detection & Validation: Detect occupancy square-by-square, enforce piece count rules, ensure exactly one king per side, and flag invalid detections before analysis.
  • Engine-backed Move Analysis: Load validated positions into a chess library and verify candidate moves with Stockfish (or similar) to confirm legality and mate sequences.
  • Use Case: Given a phone photo of a tournament board, calibrate colors, detect pieces, validate the FEN, and produce a verified best move in algebraic or UCI notation.

Quick Start

Analyze the attached board image, calibrate colors, validate the detected position, and return the best legal move with engine verification.

Frequently Asked Questions about chess-best-move

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the best chess move from a board image?

The Skill analyzes chess board images by calibrating colors, detecting pieces square-by-square, validating the legal position, and using Stockfish to verify the optimal move or forced mate sequence.

Can I use a phone photo of a physical tournament chessboard for move analysis?

Yes, the Skill handles phone photos of physical tournament boards by performing image calibration to sample RGB signatures, reliably distinguishing pieces from squares across varied lighting and board styles.

How does chess image analysis validate a detected board position?

The Skill validates detected positions by enforcing piece count rules, ensuring exactly one king per side, flagging invalid detections, and loading the validated FEN into a chess library before engine analysis.

Do I need Stockfish and python-chess to analyze chess images?

Yes, Stockfish and python-chess are required dependencies. They load validated positions, verify candidate move legality, and confirm mate sequences during engine-backed move analysis.

What happens when piece detection finds an invalid chess position?

The Skill flags invalid detections before analysis by enforcing piece count rules and ensuring exactly one king per side, preventing guesswork when detection is uncertain.

Does this approach work with digital chessboard screenshots for tactical puzzles?

Yes, the Skill works with digital chessboard screenshots for tactical puzzles by detecting occupancy square-by-square, validating the position, and returning the best legal move in algebraic or UCI notation with engine verification.