Skip to content

nessielabs/codequiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CodeQuiz

Duolingo for your codebase. An interactive Claude Code skill that quizzes you on your own code — with XP, levels, streaks, badges, and spaced repetition.

╔══════════════════════════════════════════════════╗
║              🧠 CODEQUIZ                         ║
║                                                  ║
║  Level 5 • 500 XP • 🔥 7 day streak             ║
║  4 badges • 62% mastered                         ║
╚══════════════════════════════════════════════════╝

Why?

Teams that rely on AI without understanding their code are worse at using AI. You can't prompt effectively, debug AI output, or catch hallucinations if you don't know how the system works.

CodeQuiz fixes this. It scans your repo, finds the complex parts, and quizzes you on them. You build real understanding — and that makes you 10x better at using AI.

Install

git clone git@github.com:nessielabs/codequiz.git ~/.claude/skills/codequiz

That's it. No dependencies, no build step.

Usage

Open Claude Code in any git repo and run:

/codequiz

Or just type "quiz me", "test my knowledge", or "codebase quiz" in the Claude Code chat.

In action

Here's what a question looks like:

Question 1/7 — Explain This (State/UI — Novice)

📂 NavigationStore.swift — Part of the navigation state management system

  func push(_ destination: AppDestination) {
      // Trim forward history when pushing a new destination
      if currentIndex < stack.count - 1 {
          stack.removeSubrange((currentIndex + 1)...)
      }
      stack.append(destination)
      direction = .forward
      currentIndex = stack.count - 1
  }

What does push(_:) do, and why does it trim forward history
before appending?

Type your answer, or say skip if you know this, or idk if you
want to see the explanation.

And here's the end of a session:

╔══════════════════════════════════════════════════════╗
║                SESSION COMPLETE                       ║
╠══════════════════════════════════════════════════════╣
║                                                       ║
║  Questions:  7/7 answered                             ║
║  Correct:    7/7 (100%)                               ║
║  XP Earned:  +130 XP                                  ║
║  New Level:  1 → 3  (Warming Up)                      ║
║  Streak:     🔥 1 day                                 ║
║                                                       ║
║  Total XP:   155                                      ║
║  Overall:    Level 3 — Warming Up                     ║
╚══════════════════════════════════════════════════════╝

KNOWLEDGE RISK MAP

  State/UI               ███████░░░░░░░░░░░░░  Familiar   (0.35)
  State/Services         ██████░░░░░░░░░░░░░░  Familiar   (0.30)
  Logic/Operations       ███░░░░░░░░░░░░░░░░░  Novice     (0.15)
  Providers              ███░░░░░░░░░░░░░░░░░  Novice     (0.15)
  Views/Markdown         ███░░░░░░░░░░░░░░░░░  Novice     (0.15)
  Views/ContextChat      ███░░░░░░░░░░░░░░░░░  Novice     (0.15)
  Views/ContextEditor    ███░░░░░░░░░░░░░░░░░  Novice     (0.15)

  Overall Mastery: 29% (2/7 modules at Familiar+)
  Suggested Focus: Providers, Views/Markdown, Views/ContextEditor

How it works

  1. Discovery — Claude scans your codebase and identifies technically challenging components
  2. Quiz — You get short-answer questions grounded in real code
  3. Learn — Wrong answers get thorough explanations. Discuss further or move on.
  4. Track — XP, mastery levels, and spaced repetition ensure you actually retain it

Three question types

Type Difficulty What it tests
Explain This Easy Show code, ask what it does and why
What Happens When Medium Show code, ask about edge case behavior
Connect the Dots Hard Ask how two modules interact

Session modes

Pick your pace:

  • Quick — 3 questions, ~2 min
  • Standard — 7 questions, ~5 min
  • Deep Dive — 15 questions, ~10 min
  • Boss Fight — Multi-part deep dive on one complex subsystem

Gamification

XP & Levels

Earn XP for every correct answer. Level up from Beginner to Codebase Wizard (Level 10).

Mastery per module

Each module in your codebase gets its own mastery rating:

KNOWLEDGE RISK MAP
══════════════════════════════════════════════

  src/auth/              ████████████████░░░░  Expert    (0.92)
  src/api/routes/        ████████████░░░░░░░░  Proficient (0.68)
  src/database/          ████████░░░░░░░░░░░░  Familiar  (0.45)
  src/utils/             ████░░░░░░░░░░░░░░░░  Novice    (0.22)
  src/workers/           ░░░░░░░░░░░░░░░░░░░░  Unknown   (0.00)

  Overall Mastery: 38%
  Suggested Focus: src/utils/, src/workers/

Badges

Unlock achievements as you learn:

Badge How to earn
First Blood First correct answer
Edge Lord 5 edge-case questions correct
Architect 5 architectural questions correct
Streak Master 7-day streak
Deep Diver Master any module to Expert
Boss Slayer Ace a Boss Fight
Perfectionist 10 correct in a row

Spaced repetition

Topics you got wrong come back sooner. Topics you've mastered fade out. Like Anki, but for code.

Spot-checks

Say "I know this, skip"? There's a 25% chance you'll get a quick verification question. Pass it for bonus XP. Fail it and the topic goes back into rotation.

Learning-first design

This isn't a test — it's a learning tool:

  • Wrong answers get full explanations of what the code does and why
  • Every question shows the file path and which component of the software it belongs to
  • "I don't know" is always an option — no penalty, just learning
  • Discuss further if the explanation isn't clear
  • Dispute grading if you think you were marked wrong

State

Your progress is saved at ~/.codequiz/{repo-name}/mastery.json. Per-repo, persistent across sessions, survives after every single question (so quitting mid-session doesn't lose progress).

License

MIT

About

Duolingo for your codebase — a Claude Code skill that quizzes you on your own code with XP, spaced repetition, and mastery tracking

Resources

License

Stars

Watchers

Forks

Packages