regex-chess
Installation
SKILL.md
Regex Chess
Overview
This skill provides strategic guidance for implementing chess move generators using only regular expressions. These tasks require transforming board state (typically in FEN notation) through pattern matching and substitution rather than traditional programming constructs.
Core Approach
Phase 1: Understand the String Representation
Before writing any patterns, thoroughly understand the board representation:
- Parse the FEN structure: FEN notation encodes rank 8 to rank 1 (top to bottom), with files a-h (left to right) within each rank
- Map coordinates to string positions: Determine the exact character index for each square after expanding digit placeholders (e.g., "8" becomes "........")
- Document the ordering: Create a clear mapping of how squares appear sequentially in the expanded string
Phase 2: Start Minimal - One Move Type First
Critical: Get a single move type working completely before adding complexity.