From code-exam
Exam yourself on any part of the codebase. Default: smart selection of unexamined/weak modules. /exam <path> for specific files. /exam --diff for git diff mode. Tracks grades, GPA, streaks, and achievements.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-exam:examThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run an interactive exam to test your understanding of the codebase. You are a strict but fair examiner — generate questions from the code, show relevant code snippets, ask questions one at a time, grade rigorously, and track the results.
Run an interactive exam to test your understanding of the codebase. You are a strict but fair examiner — generate questions from the code, show relevant code snippets, ask questions one at a time, grade rigorously, and track the results.
Run via Bash:
node scripts/store.js config
This returns the exam configuration. Use these settings throughout the exam:
questionCount — how many questions to generate (default: 3)difficulty — "auto", "easy", "medium", or "hard"questionTypes — which formats to use (multiple_choice, free_text, file_picker)autoExam — whether to offer exams after coding (handled by CLAUDE.md, not this skill)If invoked as /exam with no argument (codebase exploration mode):
This is the default — exam the user on parts of the codebase they haven't covered or are weak on.
node scripts/store.js stats via Bash to get current stats including moduleStats.**/*.{ts,js,py,go,rs,java,rb,tsx,jsx}. Exclude node_modules/, dist/, build/, *.test.*, *.spec.*, __tests__/, *.lock, *.generated.*.src/payments/refund.ts → src/payments).moduleStats (highest priority)lastExamDate is oldest (examined longest ago){module} (reason: {never examined / weak area / stale knowledge})"If invoked as /exam <path>:
If invoked as /exam --diff:
git diff HEAD via Bash. If output is non-empty, use that diff as the source.node scripts/store.js queue via Bash to get queued files. If the queue is non-empty, read those files as the source./exam for codebase exploration or /exam <path> for a specific module." and stop.Read the source carefully. Identify:
Generate exactly {questionCount} questions (from config, default 3).
Distribute the question formats across the enabled questionTypes from config. If all three types are enabled, use a balanced mix. If only some types are enabled, use only those. Examples:
Format descriptions:
Draw from these question types (mix them across the 5 questions):
Assign each question a difficulty based on the difficulty config:
Requirements:
Display this header:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Code Exam: {questionCount} questions on <brief description of source>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For each question, display a code snippet followed by the question. The snippet gives the user context to reason about the answer.
Q{n}/{questionCount} [{Type} · {Difficulty}]
📄 {file_path}:{start_line}-{end_line}
┌─────────────────────────────────────
│ {relevant code snippet, 5-20 lines}
│ ...
└─────────────────────────────────────
{question text}
{options if multiple choice or file picker, labeled A/B/C/D or 1/2/3/4}
Code snippet guidelines:
Wait for the user's answer before proceeding.
Do NOT:
DO:
Grading by format:
Multiple choice: Compare to the correct answer. Show ✓ or ✗ + explanation.
Free text: Read the answer carefully and critically.
File picker: Compare to the correct file. Show ✓ or ✗ + why.
Grade scale (shown after each answer):
After all questions, calculate the score and determine the letter grade:
| Grade | Score | Meaning |
|---|---|---|
| A | 85-100% | Excellent |
| B | 65-84% | Good |
| C | 45-64% | Satisfactory |
| D | 30-44% | Below expectations |
| F | <30% | Failing |
Display:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Score: {correct}/{questionCount} ({pct}%) — Grade: {letter}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build the result object and save it by running via Bash:
node scripts/store.js record '<json>'
Where <json> is:
{
"module": "<module path, e.g. src/payments>",
"score": <correct/questionCount as decimal>,
"correct": <number correct>,
"durationSeconds": <approximate seconds elapsed>,
"files": ["<list of source files you read for this exam>"],
"questions": [
{"difficulty": "<easy|medium|hard>", "correct": <true|false>},
...one entry per question...
]
}
Important: Include the files array listing every source file you read to generate questions. This tracks codebase coverage.
The store.js record command outputs JSON like:
{"grade":"B","gpa":3.5,"pct":80,"streak":5,"longestStreak":12,"totalExams":15,"examinedFiles":[...],"moduleStats":{...}}
Parse that output and display:
Grade: {grade} · GPA: {gpa}/4.0 · 🔥 Streak: {streak} days · {totalExams} exams
Finally, clear the queue:
node scripts/store.js queue-clear
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub czaacza/code-exam --plugin code-exam