David Volz

How I Built The Daily

I built a scratch pad for Connections, then made it load each day’s board by itself. This is how it works, where the AI code lives, and the prompt it sends.

Try The Daily Sort

How I play

Before I make a guess in Connections, I like to sort all sixteen words into groups. I usually do this in my head and at least try to identify a group or two. But beyond that I struggle to remember everything.

My wife plays a different way. She takes a screenshot of the board and marks up each group before she makes a guess. That way she can solve purple first and get it on top, which is a harder way to play.

My wife’s screenshot of a board, marked up before her first guess.
A Connections board screenshot with each word marked in yellow, green, blue or purple

I have always wanted a tool that allows me to sort the words into groups myself. Having a visual way to do this would help me think through the puzzle better.

In order for the tool to be helpful, it would have to have a way to get the day’s words from the daily puzzle. With AI, I figured I could build that pretty easily.

So I asked Claude Code for a scratch pad. The Daily Sort loads the day’s board and lets you paint each word a color. It doesn’t have the answers, only the sixteen words.

Before any of the daily-board code, I asked Claude for a write-up of how it would work. The write-up caught the hard parts early: where the API key lives, how to make sure the lookup only happens once, and what to do when two people click at the same time.

How a board gets here

Finding a board takes a web search, which costs money and a few seconds, so Claude only does it once a day. Just after midnight Eastern, a scheduled job asks Claude for the new board and the site will save it. Every visit after that loads the saved copy from the cache in about a second, with no AI.

Connections changes at midnight in each player’s own time zone, so now and then someone opens the page before the job has run, and their visit starts the lookup instead. The site sets a lock so only one lookup runs even if two people open the page at once, and their browser will poll, asking again every 3 seconds, until the board is saved.

Figure 1. The two ways a board gets here. Claude runs once a day, on the left. Every visit after that takes the right.

First lookup of the day

  1. ASKovernight job asks for today
  2. LOCKone lookup per day
  3. CLAUDEweb search, a few seconds
  4. CHECK16 clean words
  5. SAVEfor everyone

If a visitor gets there before the job, their visit starts the lookup and the browser asks again every 3 seconds until the board is saved.

Every visit after that

  1. ASKbrowser asks for today
  2. CACHEsaved copy found
  3. DONEabout a second, no AI

Each answer from the server lists the steps it took, and you can click the request below to see today’s.

Figure 2. What the server answers while a board loads. A sample, with the middle checks trimmed.

GET /api/connections-today?date=2026-10-21

GET /api/connections-today?date=2026-10-21

 

Open in a new tab

  1. 0 s 202

    • date 2026-10-21 accepted
    • cache miss: no saved copy yet
    • lock free: started the background lookup

    First visitor today. The lookup runs as a separate task, which can take longer than a normal page request is allowed to.

  2. 3 s 202

    • date 2026-10-21 accepted
    • cache miss: no saved copy yet
    • lock held: a background lookup is already running

    Still searching. Asking again every 3 seconds.

  3. 6 s 200

    • date 2026-10-21 accepted
    • cache hit: saved copy found (looked up 0 s ago)

    The background lookup finished and saved the board. Everyone after you gets this copy for free.

claude-haiku-5-5 · 1 turn · 2 searches · 24,655 tokens read · 223 written · 2.4 s

Asking Claude

All the code that talks to Claude lives in one file: netlify/connections/claude-source.mjs. No other file talks to Claude, and the rest of the code only decides when to ask and what to do with the answer.

It’s the same habit as keeping every Shark Thief setting in one config file. When I want to change how the lookup works, I know where to look, and so does Claude.

Figure 3. Where the code lives. The highlighted file is the only one that talks to Claude.
  • netlify/connections/claude-source.mjsThe prompt, the models and the Claude API call. The only file that talks to Claude.
  • netlify/connections/words.mjsChecks Claude’s answer before anything is saved.
  • netlify/connections/fetch.mjsThe background lookup: takes the lock, applies the limits, asks, checks, saves.
  • netlify/connections/today.mjsThe fast endpoint the page calls. Never calls Claude.
  • netlify/connections/prefetch.mjsThe overnight job that does the first lookup of the day.
  • netlify/connections/internal-auth.mjsSigns requests so only the site can start a lookup.
  • src/components/connections/The page itself: tiles, inkwells, wire report. No AI.

The prompt

It names the exact date, asks for the sixteen words in a fixed data format (JSON) and nothing else, and says what to send back when the board isn’t online yet. The last line is there so Claude sends an empty list instead of guessing.

The prompt netlify/connections/claude-source.mjs

Find the 16 words on the New York Times Connections puzzle for date. Search for that exact date and make sure the board you report is for date, not a neighbouring day. Spell each word exactly as it appears on the board. Reply with only this JSON and nothing else: {"words": ["WORD1", "WORD2", "..."]} If you can't find the board for date, reply with {"words": []}.

The model

This job is just finding sixteen words, so the cheapest model, Haiku, goes first, and if Claude’s service turns the request away the next model in the list runs.

The search

The call is capped at three web searches and set to think less than usual.

Claude’s web search can be limited to a list of sites. My first version listed a few, but two of them block Anthropic’s search bot, and that made the whole request fail, so now the search can use any site.

The parse

Claude’s answer comes back as text mixed in with search results, so the code pulls the JSON out. If it isn’t JSON, the first 300 characters go into the error so the logs show what Claude actually said.

Safe and cheap

Once it worked, I asked Claude for a security audit. The biggest problem it found: the lookup runs at a public URL, and anyone could call it directly for a date with no board yet. Every call would start a new lookup and spend money.

Now the page’s own server has to sign every request with a key only it has, and the lookup refuses anything unsigned.

The page’s server and the lookup both enforce a cap: a 10-minute wait after any lookup that didn’t save a board, and at most six lookups per date, so a flood of calls can’t run up the bill.

It also flagged that Claude reads whatever pages the search turns up, and a page could try to steer it. So a filter checks the answer before anything is saved: sixteen unique words, each short and in plain characters, with no web addresses and no bad words.

I also checked the cost. The first real lookup ran on Opus, which this job doesn’t need. It runs on Haiku now, with Sonnet as the backup.

Figure 4. What one daily lookup costs. Search is $10 per thousand searches on any model, so the model only changes the cost of the text Claude reads and writes.

tokenssearches3 characters = 1¢

Opus 5.5
tokens
$0.17
searches
$0.02
total
≈ $0.19
Oct 21 lookup: 38,359 tokens read, 645 written, 2 searches
Haiku 5.5
tokens
< $0.01
searches
$0.02
total
≈ $0.02
Nov 28 lookup: 24,655 tokens read, 223 written, 2 searches

I really enjoyed building this and solving a problem, even a small one. It’s an example of using AI lightly: one lookup a day, and the rest is a plain web page.

Try today’s board on The Daily Sort

The Daily Sort is a sorting aid. It isn’t affiliated with The New York Times, and it never stores or shows the groups. Play the real game at nytimes.com/games/connections.

People, product & the details

Good work is
a team effort.

I'm an engineering leader with a background in design, development, and UI/UX. I work closely with Product and Design, help engineers grow, and stay curious about better ways to build.

These projects are another part of that curiosity. They're a place to try things, learn, and share what I find.