Codesprint
CodeSprint is a typing practice environment for software engineers that uses real LeetCode-style code snippets instead of lorem ipsum, tracking WPM, accuracy, and errors in real time inside a minimal, keyboard‑first Next.js/React UI.
Install / Use
/learn @cwklurks/CodesprintREADME
<strong>A code typing trainer that builds real syntax muscle memory.</strong> <br> Practice 1,800+ real LeetCode snippets across Python, JavaScript, Java, and C++<br>with syntax-aware scoring, spaced repetition, and adaptive difficulty.
<p> <a href="#features">Features</a> · <a href="#how-it-works">How It Works</a> · <a href="#data-pipeline">Data Pipeline</a> · <a href="#running-locally">Running Locally</a> </p> </div>Why?
Most typing tests measure how fast you can type English. That doesn't translate when you're writing code full of brackets, operators, and indentation.
CodeSprint exists because syntax fluency matters — in interviews and in daily work. It lets you drill patterns like "Depth First Search in Python" or "Ring Buffer in C++" until your fingers know the shape of the code.
[!NOTE] CodeSprint runs entirely client-side. No account, no backend, no data leaves your browser.
Features
<details open> <summary><strong>Syntax-Aware Scoring</strong></summary> <br>CodeSprint tokenizes each snippet by language and weights different constructs differently:
- Keywords and operators — weighted 1.5×
- Delimiters (brackets, parens) — weighted 1.2×
- Whitespace — weighted 0.5×
You get three metrics per session: raw WPM, adjusted WPM (only perfect words), and a pattern score that reflects how well you nailed the actual code constructs.
</details> <details open> <summary><strong>Spaced Repetition</strong></summary> <br>Built on the SM-2 algorithm (the same one behind Anki). CodeSprint tracks per-snippet mastery and schedules reviews based on your performance. Snippets you struggle with come back sooner; ones you've nailed fade into longer intervals.
</details> <details open> <summary><strong>Adaptive Difficulty</strong></summary> <br>Tracks your proficiency per language and recommends what to practice next. Adjusts difficulty based on your recent accuracy and speed so you're always working at the edge of your ability.
</details> <details> <summary><strong>Achievements & Progression</strong></summary> <br>30+ achievements across speed, accuracy, consistency, and exploration categories with rarity tiers from common to legendary. An XP system with leveling tracks overall progress, and streak tracking keeps you coming back daily.
</details> <details> <summary><strong>Customizable Editor</strong></summary> <br>- 18+ color themes
- Vim mode support
- Configurable font size, caret width, and syntax highlighting level
- Panel mode or immersive/terminal mode for distraction-free practice
- Optional countdown timer before sessions
1,800+ real snippets sourced from LeetCode problems across four languages (JavaScript, Python, Java, C++) and three difficulty tiers (easy, medium, hard), categorized by length.
</details>How It Works
The Editor
CodeSprint runs a heavily customized Monaco Editor instance. It uses deltaDecorations to paint correct/incorrect keystrokes directly onto the editor model without breaking syntax highlighting, and overlays a custom caret that animates smoother than the native DOM cursor.
The Typing Engine
React's render cycle is too slow for a 100+ WPM feedback loop. The typing engine (hooks/useTypingEngine.ts) isolates keystroke logic from the React render tree, only triggering re-renders for specific UI updates like the WPM gauge. Metrics are recalculated on a throttled interval rather than every keystroke.
Storage
Everything runs client-side. Session history, achievements, mastery records, and XP live in IndexedDB with localStorage as a fallback for preferences. Data export is available in CSV and JSON formats.
Data Pipeline
Snippets are sourced from LeetCode via a custom GraphQL scraper that reverse-engineers their API. To sync fresh snippets:
# Requires Bun (https://bun.sh)
npm run sync:leetcode -- --limit 50 --difficulties medium,hard
This queries the LeetCode questionData endpoint, extracts code snippets for all four languages, strips docstrings and excessive comments, normalizes indentation, and outputs a categorized JSON catalog.
After syncing, build the processed snippet files with tokenization metadata:
npm run build:snippets
Running Locally
# Install dependencies
npm install
# Start the dev server (Next.js 15 + Turbopack)
npm run dev
Open http://localhost:3000.
<details> <summary><strong>Testing</strong></summary> <br>npm run test # Unit tests (Vitest)
npm run test:watch # Watch mode
npm run test:e2e # E2E tests (Playwright)
</details>
<details>
<summary><strong>Production Build</strong></summary>
<br>
npm run build
npm start
</details>
Roadmap
- Custom Renderer — Migrating from Monaco to a WebGL/Canvas text renderer for zero DOM overhead (Gap Buffer implementation in progress).
- Tree-sitter Integration — Semantic typing that lets you skip whitespace and formatting irrelevant to code logic.
- Advanced Analytics — Pattern weakness identification across sessions.
License
MIT.
Related Skills
bluebubbles
346.8kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
slack
346.8kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
107.6kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
