daily-seeded-runs

Implements deterministic daily puzzle modes using UTC date keys and seeded random number generation.

1|Updated Aug 31, 2026
One-click install
npx skills add https://github.com/gagandeepgill/puzzle-game --skill daily-seeded-runs-gagandeepgill
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: daily-seeded-runs
Source: https://github.com/gagandeepgill/puzzle-game/tree/main/.claude/skills/daily-seeded-runs
Command: npx skills add https://github.com/gagandeepgill/puzzle-game --skill daily-seeded-runs-gagandeepgill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Wordle-style daily puzzle mode without a backend requires every player worldwide to receive the identical puzzle on the same day, while streaks, records, and share strings must survive offline play, clock skew, and storage failures. ## Core Features & Use Cases - Deterministic seeding: Derives the puzzle seed from the UTC date key via FNV-1a hash into mulberry32, salted per difficulty so modes never spoil each other. - Rotating rule variants: Picks a daily rule twist from a variant table indexed by day number, keeping consecutive days distinct without new content. - Records, streaks, and share text: Enforces first-attempt-counts records, idempotent streak updates computed against the record's own date, and spoiler-free share strings. - Use Case: When adding a daily mode to a browser game, apply these patterns so a player in Tokyo and a player in New York solve the same puzzle, offline completions sync without breaking streaks, and corrupted localStorage data never crashes the run. ## Quick Start Ask the AI to add a daily seeded mode to the game following the daily-seeded-runs skill, with UTC date keys, deterministic generation, and spoiler-free share text.

Frequently Asked Questions about daily-seeded-runs

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

FAQPage Schema
How do I make a daily puzzle the same for every player without a server?▼

Use the UTC date as the seed: hash the date key with FNV-1a, feed it into mulberry32, and route every random decision through that single generator. Since the date is identical worldwide, the generated puzzle is identical too.

How to seed a random number generator from a date string in JavaScript?▼

Hash the date string with FNV-1a to get a 32-bit integer, then initialize mulberry32 with it. Salt the input with extra context like a difficulty key so different modes produce different sequences on the same day.

Why does my seeded shuffle give different results in different browsers?▼

Sorting with a random comparator like sort(() => rng() - 0.5) is not portable because comparator call counts are implementation-defined. Use Fisher-Yates with explicit rng draws instead, which consumes a fixed number of values in a fixed order.

How do I keep daily streaks correct when players finish offline?▼

Compute the streak against the record's own stored dateKey, deriving yesterday from it, never against the current time. Make the streak update idempotent per day so replays cannot inflate it and late syncs cannot break the chain.

What happens when localStorage is unavailable in a daily puzzle game?▼

Wrap every storage call in try/catch because localStorage throws in private mode and data: URLs. The game must remain fully playable with persistence silently disabled, and stored values should be validated rather than cast since they are untrusted input.