sensei-cc
v0.1.0
Published
Makes Claude Code refuse to help until you can explain the code it wrote for you yesterday.
Maintainers
Readme
Sensei 🥋
Makes Claude Code refuse to help until you can explain the code it wrote for you yesterday.
AI writes the code. You ship it. Six months later you can't explain your own repo. Sensei is a tiny gate: the first time you open Claude Code each day, it pulls the most significant diff Claude wrote for you yesterday and makes you explain it before you can keep going.
It quizzes you on your own real work — not LeetCode, not flashcards.
Install
npm install -g sensei-cc
sensei installThe CLI command is sensei (the npm package is sensei-cc because sensei was
taken). sensei install registers a SessionStart hook in
~/.claude/settings.json and a /sensei-stats slash command in
~/.claude/commands/. Uninstall both any time with sensei uninstall.
Tip: prefer the global install above over
npx sensei-cc install. Both work — the hook resolves the package by name so it survives cache cleanup — but a global install keeps things simplest.
From a clone (dev)
git clone https://github.com/anshaneja5/sensei && cd sensei
node bin/sensei.js installHow it works
- You open Claude Code in the morning.
- The
SessionStarthook runssensei check. - If you've already passed today → nothing happens, you work normally.
- If not → it mines
~/.claude/projects/**/*.jsonlfor the biggest non-trivial diff from your most recent prior day, and tells Claude to quiz you on it before doing anything else. - Explain it well → Claude runs
sensei pass(streak +1) and you continue.
Commands
| Command | What it does |
|---|---|
| sensei install | Register the SessionStart hook |
| sensei uninstall | Remove it |
| sensei status | Show your streak + what the next recap would quiz |
| sensei stats | Contribution-style heatmap of your recap streak |
| sensei pass | Mark today's recap passed (Claude runs this for you) |
| sensei check | (internal) emit the gate — run by the hook |
Streak heatmap
sensei stats (or the /sensei-stats slash command inside Claude Code) renders
a GitHub-style contribution graph of the days you did your recap, plus
current/longest streak and total recaps — the retention hook once the gate gets
you in the door.
sensei — comprehension recaps 🧠
Jan Feb Mar Apr May Jun
Mon · · ▪ ▪ · ▪ ▪ ▪ · ▪ ▪ ·
Wed · ▪ ▪ · ▪ ▪ · ▪ ▪ · ▪ ▪
Fri ▪ ▪ · ▪ ▪ ▪ · · ▪ ▪ · ▪
Current streak: 5 🔥 Longest streak: 11
Recaps done: 35 Last recap: 2026-06-14What does it cost in tokens?
Basically nothing. The gate injects ~800 tokens once at session start, and the whole recap conversation runs ~2,000–4,000 tokens — once a day, max. For reference, a typical coding session burns ~45k+ tokens, so this is a few percent of one session, charged daily. Over a year of regular use it adds up to roughly the cost of a single long session. Don't think about it.
Honest caveats
It's gameable — you can argue your way past Claude, or just uninstall it.
That's fine. It's a nudge and a streak, not DRM. The point is to make you pause
and actually read what shipped under your name.
Tests
npm testStatus
MVP. Roadmap: gentle (non-blocking) mode, comprehension score, streaks
leaderboard. See docs/design.md.
