---
name: chess402.vercel.app
description: chess402.vercel.app provides two Lichess-backed skills: one that retrieves the current daily chess puzzle (with PGN, FEN, solution, and themes) and one that looks up a Lichess user profile by username (ratings, title, game counts, account metadata). Both skills are read-only snapshots with no write or real-time capabilities.
host: chess402.vercel.app
---

# chess402.vercel.app

This host is a thin wrapper over public Lichess API endpoints, serving agents that need chess puzzle content or player profile data. It targets use cases like displaying the daily puzzle, assessing a player's rating across time controls, or pairing puzzle difficulty against a known player's skill level. It does not support game history retrieval, move validation, bulk lookups, or any chess engine interaction.

## When to use this host

Use this host when an agent needs today's Lichess daily puzzle or a single Lichess user's current ratings and profile metadata. Do not use it for fetching historical or arbitrary puzzles by ID, retrieving a user's game history or move lists, validating chess moves, running engine analysis, or performing bulk user lookups — those require Lichess's game-history, game-stream, or puzzle-by-ID endpoints directly. This host is not a substitute for a full Lichess API client; it covers exactly two narrow read operations.

## Capabilities

### Daily Puzzle Retrieval

Fetches today's Lichess daily puzzle, including the source game PGN, starting FEN, UCI solution moves, tactical themes, and difficulty rating.

- **`fetch-daily-chess-puzzle`** — Returns today's Lichess daily chess puzzle including the source game PGN, FEN position, solution moves in UCI notation, tactical themes, difficulty rating, and player metadata.

### Player Profile Lookup

Resolves a Lichess username to a profile snapshot containing per-time-control ratings, FIDE title, game counts, play time, and account timestamps.

- **`fetch-lichess-user-profile`** — Returns a Lichess user profile snapshot including ratings per time control, FIDE title, game counts, play time, and account timestamps for a given username.

## Workflows

### Puzzle Difficulty vs. Player Rating Check

*Use when an agent needs to assess whether today's daily puzzle is appropriately challenging for a specific Lichess user.*

1. **`fetch-daily-chess-puzzle`** — Retrieve today's puzzle to obtain its difficulty rating and tactical themes.
2. **`fetch-lichess-user-profile`** — Fetch the target user's puzzle rating from their profile to compare against the puzzle's difficulty rating.

## Skill reference

### `fetch-daily-chess-puzzle`

**Daily Chess Puzzle** — Returns today's Lichess daily chess puzzle including the source game PGN, FEN position, solution moves in UCI notation, tactical themes, difficulty rating, and player metadata.

*Use when:* Use when an agent or user needs the current daily chess puzzle to display, solve, or analyze, including the starting position, correct solution line, and puzzle difficulty rating.

*Not for:* Do not use for fetching arbitrary or historical puzzles by ID; this endpoint returns only today's daily puzzle. Not suitable for real-time game analysis or move validation.

**Inputs:**

- `body` (object, required) — No parameters required. Send an empty JSON object `{}`.

**Returns:** Returns a game object (id, PGN, players, clock) and a puzzle object (id, rating, FEN, UCI solution moves, tactical themes, initialPly) for today's Lichess daily puzzle.

**Example:** `{"url":"https://chess402.vercel.app/api/puzzle/daily","method":"POST","body":{}}`

---

### `fetch-lichess-user-profile`

**Chess User Lookup** — Returns a Lichess user profile snapshot including ratings per time control, FIDE title, game counts, play time, and account timestamps for a given username.

*Use when:* Use when an agent needs to look up a Lichess player's current ratings (bullet, blitz, rapid, classical, etc.), FIDE title, total game counts, or account metadata by username.

*Not for:* Do not use for fetching game history, move lists, or live game state; use a game-history or game-stream endpoint instead. Not suitable for bulk user lookups — this resolves one username per call.

**Inputs:**

- `username` (string, required) — Lichess username (case-insensitive). Must be 2–30 characters, alphanumeric with underscores and hyphens allowed.

**Returns:** Returns a JSON object with the user's lowercase id, display username, FIDE title, perfs map of ratings by time control, createdAt/seenAt timestamps, playTime totals, profile URL, and game count breakdown.

**Example:** `{"username": "MagnusCarlsen"}`

---
