sensei

sensei is an agent for Claude Code from DojoCodingLabs/code-sensei. It costs 77 tokens per session (2,668 once invoked), scanned B, original, MIT.

An AI coding mentor that teaches programming through explanations, questions, and small quizzes based on your project.

In plain words
What is it for?
Use it to explain code changes, discuss decisions, test your understanding, and track learning at a level suited to your background.
Why use it?
It helps people understand AI-generated code and build programming knowledge while they work.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions Claude Code.

Part of the code-sensei plugin — 10 skills, 10 commands, 1 agent, 3 hooks shipped together

Good fit Use it to explain code changes, discuss decisions, test your understanding, and track learning at a level suited to your background.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dojocodinglabs/code-sensei/sensei
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/DojoCodingLabs/code-sensei

Made for: Claude Code.

Or install code-sensei, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 1 agent, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sensei

README.md
[![agentmods](https://agentmods.dev/badge/agents/dojocodinglabs/code-sensei/sensei/github.svg)](https://agentmods.dev/agents/dojocodinglabs/code-sensei/sensei)
Your own site
<a href="https://agentmods.dev/agents/dojocodinglabs/code-sensei/sensei"><img src="https://agentmods.dev/badge/agents/dojocodinglabs/code-sensei/sensei/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sensei

Your own site · 80×15
<a href="https://agentmods.dev/agents/dojocodinglabs/code-sensei/sensei"><img src="https://agentmods.dev/badge/agents/dojocodinglabs/code-sensei/sensei.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,668 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.02668
Opus 5.5 $0.00031 $0.01067
Sonnet 5.5 $0.00015 $0.00534
Haiku 4.5 $0.00008 $0.00267

Measured 1mo ago against content hash d7cc48bd072c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

sensei scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

5. **Test, don't lecture** — after explaining, ask a question. Not to grade them, but to make the knowledge stick
agents/sensei.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are CodeSensei 🥋, the AI coding mentor by Dojo Coding.

You live inside Claude Code and your mission is to teach people programming while they vibecode. You explain what's happening, why decisions are made, and help people go from "I have no idea what this code means" to "I think like an engineer."

Your Personality

  • Patient like a martial arts master — you never talk down to anyone, ever
  • Genuinely encouraging — you celebrate wins because learning is hard and people deserve it
  • Analogy-first — you explain code using real-world things: restaurants, mail, filing cabinets, traffic, recipes
  • Honest — if something is complex, say "this one's tricky, let's break it down" instead of pretending it's simple
  • Concise — you teach in small bites. One concept at a time. Never walls of text
  • Fun — learning should feel like leveling up in a game, not reading a textbook

When Invoked via Delegation (Auto-Coaching)

When the main Claude instance delegates to you after a hook fires, follow this protocol:

1. Read the Pending Lessons Queue

Read JSON files from ~/.code-sensei/pending-lessons/. Each .json file is one teaching moment. Process the most recent file (highest timestamp in filename). If multiple files exist, batch-process up to 3 (newest first), then stop.

2. Parse the Trigger JSON

Each lesson file contains structured fields:

Code change trigger (from track-code-change.sh):

{"timestamp":"...","type":"micro-lesson|inline-insight","tech":"react","file":"src/App.jsx","tool":"Write","belt":"white","firstEncounter":true}

Command trigger (from track-command.sh):

{"timestamp":"...","type":"micro-lesson|inline-insight|command-hint","concept":"git","command":"git commit","belt":"white","firstEncounter":true}

3. Calibrate Your Response

Use the belt field from the trigger JSON (NOT the profile) to set your language level. Use firstEncounter to set teaching depth:

firstEncounter type What to do
true micro-lesson First-time encounter. Explain what the technology/concept IS and why it matters. Use an analogy. 2-3 sentences.
false inline-insight Seen before. Brief explanation of what THIS specific change/command does. 1-2 sentences.
false command-hint Unknown command pattern. Explain only if educational, skip if trivial. 1 sentence max.

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 219 lines · 77 tokens per session scan B d7cc48bd072c

Subscribe to this mod's changes

sensei is an agent published in the GitHub repository DojoCodingLabs/code-sensei (14 stars, last pushed 14d ago), licensed MIT. It adds 77 tokens to every session and 2,668 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

sensei

CodeSensei by Dojo Coding — AI mentor that teaches programming concepts during vibecoding sessions. Invoked automatically after code changes to explain what happened, why decisions were made, and test comprehension with micro-quizzes. Adapts to the user's belt level and background. Use this agent when the user asks to…

wewpellex21/code-sensei · 77 tokens

do-setup-assistant

Autonomous Durable Objects project scaffolder. Analyzes user requirements and automatically sets up complete DO project with proper configuration, code, and tests.

secondsky/claude-skills · 35 tokens

upload-workflow-agent

This agent should be used when the user asks to "implement user uploads", "set up direct creator upload", "configure image uploads", "build upload form", "create upload endpoint", or needs complete frontend + backend upload workflow for Cloudflare Images.

secondsky/claude-skills · 55 tokens

d1-query-optimizer

Performance analysis agent that identifies slow queries, missing indexes, and optimization opportunities in Cloudflare D1 databases using metrics, insights, and query plan analysis. Use when encountering slow queries, high latency, or performance degradation.

secondsky/claude-skills · 49 tokens

session-reviewer

Analyze conversation patterns to detect recurring frustrations, corrections, and problematic tool usage. Feeds findings into practices/inbox/ or CLAUDEERRORS.md. Use after long sessions or when /forge insights triggers analysis.

luiseiman/dotforge · 46 tokens

doc-onboard

Discovery and understanding of a codebase. Use for a new developer joining the project, to document the architecture, or to understand an open source project.

christopherlouet/claude-base · 34 tokens