Explainer logo

Explainer

Community
Royal-lobster
explainer

Use when the user asks to explain, walk through, or understand a feature, module, or code flow in the codebase. Triggers on 'explain', 'walk me through', 'how does X work', 'what does this code do'.

Overview

PublisherRoyal-lobster
Repositorycode-explainer
Skill nameexplainer
Stars
102
Forks
13
Bundled files
33
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 33 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Royal-lobster on GitHub. Read the source before you install it.

Installation

Install the Explainer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Royal-lobster/code-explainer/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Royal-lobster/code-explainer.git \
  .claude/skills/explainer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Explainer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Explainer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Explainer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Code Explainer

Interactive code walkthrough. Scans the codebase for a feature, builds a segment plan, then walks through each segment — highlighting code in VS Code and explaining at their chosen depth.

Models

Configure your preferred models here. All docs reference these tiers by name — change them once and the whole skill updates.

TierDefaultRole
LARGEopusDeep Dive planner — narrative reasoning, transition objects
MEDIUMsonnetDeep Dive segment agents — deep code reading, dense highlights
SMALLhaikuScout, Overview plan+highlights — fast exploration and scanning

When dispatching sub-agents, look up the model for the tier and use that exact model name.

Checklist

Complete these steps in order:

  1. Parallel init — Dispatch both in a single response:

    • Sidebar check (Bash): PORT=$(cat ~/.claude-explainer-port 2>/dev/null) && TOKEN=$(cat ~/.claude-explainer-token 2>/dev/null) && curl -sf -H "Authorization: Bearer $TOKEN" "http://localhost:$PORT/api/health" — {"status":"ok"} means sidebar is active. When active, NEVER output walkthrough content as terminal text; all output goes through sidebar HTTP API only.
    • Ask preferences (AskUserQuestion): Read docs/assess.md and ask all three questions listed there (familiarity + depth level + delivery mode) in a single call. Do NOT skip any or invent new ones.
  2. Scout — Read docs/scan.md. Dispatch SMALL sub-agent to discover relevant files and map the call chain. No highlights yet — discovery only.

  3. Plan + generate — Two paths depending on depth:

    • Overview — Single SMALL sub-agent reads scout output, builds plan, generates highlights in one pass. Send set_plan when done.
    • Deep Dive — Read docs/plan.md. Dispatch LARGE planner to build narrative + transition objects. Then read docs/segments.md and dispatch parallel MEDIUM segment agents (all at once). Create a unique temp dir with mktemp -d and have each agent write its segment there. Wait for ALL agents to complete, then assemble from files with jq and send one full set_plan. Clean up the temp dir after sending. Do NOT send anything to the sidebar until everything is ready.
  4. Execute walkthrough — Read the doc for chosen mode: docs/walkthrough.md, docs/read.md, or docs/podcast.md. Walkthrough and podcast reference docs/tts.md.

  5. Wrap up — 3-5 key takeaways, how feature fits the broader architecture, offer to dive deeper or explain related features.

First-time setup? Read docs/setup.md.

Q&A on Active Walkthrough

When the user says they're in an active explainer walkthrough and asks a question (even in a new chat), skip the full checklist above and instead:

  1. Get context: Run ~/.claude/skills/explainer/scripts/explainer.sh state — the response now includes a segment field with the full current segment (file, start, end, title, explanation, highlights). Use this to understand what code the user is currently viewing.
  2. Read the code: Use the segment's file, start, and end to read the relevant source code.
  3. Answer in context: Ground your answer in the specific code and segment the user is looking at. Reference line numbers from the segment, not abstract concepts.

If state returns status: "idle" (no active walkthrough), check .walkthroughs/ for saved plans and ask the user which one they mean.

Common Mistakes

MistakeFix
Scope too largeStick to segment boundaries. Overview: max 80 lines, Deep Dive: max 40. Split if bigger
Not connecting segmentsInclude a context line linking to previous segment
Forgetting to highlightSidebar: automatic. Fallback: write to ~/.claude-highlight.json
Reading entire fileUse offset+limit on Read for just the segment
Not waiting for userPause after each segment for questions
ttsText missing or has markdownInclude plain ttsText in every segment — strip backticks, bold, line refs from spoken text
Explaining obvious code, missing the "why"Skip standard patterns (loops, imports, null checks). Always explain intent before mechanism
Ignoring complexity tags[core] = thorough, [wiring] = breeze through, [supporting] = brief
Sidebar check not parallelizedDispatch Bash health check + AskUserQuestion in one response, not sequentially
Text output when sidebar activeIf health check returned ok, send plan JSON only — no terminal text
Sub-highlights too many or too granularDeep Dive: 6-12 highlights per segment, 1-4 lines each. Highlights are a moving pointer over one continuous voice stream — ttsText across highlights is concatenated and spoken as one TTS call, so write it as flowing narration, not self-contained slides. Overview: 1-8 lines, 3-6 per segment
Wrong field names in sidebar JSONUse start/end/title/ttsText/highlights — NOT startLine/endLine/label/subHighlights. See docs/plan.md for exact schema
Skipping set_plan before gotoSidebar needs the full plan loaded first. Always send set_plan via explainer.sh plan before any goto messages
Sending plan before agents finishWait for ALL parallel segment agents to complete. Each writes to a unique temp dir (created via mktemp -d). Assemble from files with jq, then send one set_plan. Clean up temp dir after. Never send stubs or partial plans
Scout generating highlightsScout only maps files and call chain. Highlights are generated in step 2 (Overview: single agent, Deep Dive: parallel agents)
Running planner + parallel agents for OverviewOverview uses one fast SMALL agent for plan + highlights. Planner and segment agents are Deep Dive only
Using tier names as literal model namesLARGE, MEDIUM, SMALL are placeholders — always resolve to the actual model name from the Models table in SKILL.md before dispatching

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Explainer AI skill do?

Use when the user asks to explain, walk through, or understand a feature, module, or code flow in the codebase. Triggers on 'explain', 'walk me through', 'how does X work', 'what does this code do'.

Why use Explainer on TypingMind?

Because you install it once and use it with any model. Explainer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Explainer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Royal-lobster/code-explainer/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Explainer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Explainer?

As many as you like. As long as a model supports skills, you can use Explainer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Explainer AI skill free?

Yes. It is published on GitHub by Royal-lobster under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇