A Chrome extension that analyzes chess positions from any source using AI vision and Stockfish engine.
- 📸 Screenshot Analysis - Capture any chess board from any website, app, or even a photo
- 🤖 AI Vision - Claude Sonnet 4.5 recognizes pieces and converts to FEN notation
- ♟️ Stockfish Analysis - Get the best moves with evaluations via chess-api.com
- 📚 Educational Explanations - AI-generated explanations of why moves are best
- 🎯 Multiple Providers - Support for Anthropic (direct) or OpenRouter APIs
-
Clone this repository:
git clone https://github.com/YOUR_USERNAME/chess-study-tool.git cd chess-study-tool -
Load in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the project folder
- Open
-
Configure API key:
- Click the extension icon
- Click the ⚙️ settings gear
- Enter your Anthropic or OpenRouter API key
- Save settings
Anthropic (Recommended):
- Go to console.anthropic.com
- Create an account and add credits
- Generate an API key (starts with
sk-ant-)
OpenRouter (Alternative):
- Go to openrouter.ai/keys
- Create an account
- Generate an API key (starts with
sk-or-)
- Open any website with a chess board (chess.com, lichess.org, etc.)
- Click the Chess Study Tool extension icon - the side panel opens on the right
- Select "I am White" or "I am Black" using the toggle
- Click "📸 Capture & Analyze Screen"
- View the best moves with explanations
- Click any move to see it highlighted on the board
Side Panel Features:
- Stays open when you switch tabs
- Doesn't create multiple windows
- Click extension icon again to close
- Click "📸 Capture & Analyze"
- View the analysis:
- Detected position (FEN)
- Best moves with evaluations
- Board diagram
- Educational explanation
chess-study-tool/
├── manifest.json # Chrome extension manifest (v3)
├── src/
│ ├── background/
│ │ └── service-worker.js # Main logic, API calls
│ ├── panel/
│ │ ├── panel.html # UI
│ │ └── panel.js # Panel logic
│ └── lib/
│ └── mermaid.min.js # Diagram rendering
├── assets/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
└── docs/
└── architecture.md
| Setting | Description | Default |
|---|---|---|
| API Provider | Anthropic or OpenRouter | Anthropic |
| Model | Claude Sonnet 4.5 or Haiku 4.5 | Sonnet 4.5 |
| Number of Moves | How many alternatives to show | 5 |
| Analysis Depth | Stockfish search depth (12-18) | 18 |
- Claude Sonnet 4.5: ~$0.01-0.03 per analysis
- Claude Haiku 4.5: ~$0.001-0.005 per analysis
- Stockfish: Free (via chess-api.com)
- Chrome Extension Manifest V3
- Claude Vision API (Anthropic / OpenRouter)
- Chess-API.com (Stockfish)
- Mermaid.js for diagrams
- Vanilla JS (no framework)
The extension has built-in API status indicators:
- 🟢 Green = Connected
- 🔴 Red = Failed
- ⚪ Grey = Not tested
Click "Check Connections" in settings to test both APIs.
- Open
chrome://extensions/ - Find Chess Study Tool
- Click "Inspect views: service worker"
- Check Console for logs prefixed with
[Chess Study]
- Support for PGN export
- Move tree visualization
- Opening book integration
- Puzzle mode
- Local Stockfish (WASM)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file
- Anthropic for Claude AI
- Chess-API.com for free Stockfish API
- OpenRouter for API aggregation