Code Tutor

Paste code in any language — get the walkthrough, the diagram, the concepts and the pitfalls.

Back to SkillSafe
Or pick files: any source file is read locally, nothing uploads until you run.
Focus — what confuses you, or what to concentrate on
How it works

Nothing to hand? Load the — an async fetch wrapper with exponential backoff, explained for a developer new to the code — the , a bit-twiddling routine for an experienced developer, or the , a monthly CSV total explained for someone who does not write code.

1

Paste the code

Any language: JavaScript, TypeScript, Python, Java, Go, Rust, C, C++, C#, Ruby, PHP, Swift, Kotlin, SQL, shell, HTML or CSS. One file, several files with file-name comment headers, a single function, or a grab-bag of snippets. The instant prescan reads it for free while you type: it guesses the language, lists the functions, methods and classes declared, and flags the mechanical complexity hotspots — deep nesting, functions running past eighty lines, empty catch or except blocks, TODO and FIXME markers left in, and lines running past two hundred characters.

2

Pick who it is for

Same facts, different depth. For a developer new to this code the jargon gets defined on first use and every step stays small; for an experienced developer the syntax basics are skipped and the architecture, invariants and tricky control flow take over; for a non-programmer there is no jargon at all, ideas arrive by analogy, and the focus moves to what the code accomplishes and where it could surprise you. Add a focus note and the walkthrough visits that spot explicitly.

3

Read, then check yourself

A reading-level verdict, an overview, a walkthrough ordered by execution flow with each step naming the function or lines it covers, an ASCII diagram drawn with your own names, the concepts a reader at that level must know, the pitfalls ranked by severity, and three comprehension questions with the answers hidden until you click. Every line reference is clickable: it opens the numbered lines it names, taken from the exact text that was sent. Every prescan hit is covered or explicitly set aside. Take it away as your own source file with every step and pitfall annotated onto the lines it names, or as Markdown, JSON, a pitfalls CSV, a quiz TSV or a comment block in your language’s own comment syntax; re-explain the same code for a different reader and the two runs are compared for free; print it, or restore it later from your saved explanations.

Derived from the @sickn33/code-documentation-code-explain skill (MIT).

Questions people ask

Does my code get uploaded?

Not until you press Explain it. The prescan — the language guess, the list of functions and classes, and the complexity hotspots — runs entirely in your browser with no network call, and files you drop or pick are read locally by the browser’s FileReader. Only when you run an explanation is the code sent, over HTTPS, to the model that writes the explanation. Nothing is stored on the server beyond the run itself, and your saved explanations are kept in your own per-user storage on your SkillSafe account.

Which programming languages does it work with?

Any language. The explanation itself is written by a model that is not restricted to a list. The free prescan recognises seventeen it can pattern-match mechanically — JavaScript, TypeScript, Python, Java, Go, Rust, C, C++, C#, Ruby, PHP, Swift, Kotlin, SQL, shell, HTML and CSS — and if it guesses wrong the explanation says what the language actually is and explains it accordingly. A paste can also span several files if you keep the file-name comment headers.

What do I actually get back?

A reading-level verdict (approachable, moderate or dense for the audience you picked), an overview, a walkthrough of four to ten steps ordered by execution flow with each step naming the function or lines it covers, an ASCII flow diagram drawn with your own names, the concepts a reader at that level must know, the pitfalls ranked high, medium and low, a reconciliation of every prescan fact, three comprehension questions with the answers folded away, ordered next steps, and a summary written to be pasted into onboarding notes. You can also download your own source file back with every step and pitfall annotated onto the lines it names.

What does it cost?

The prescan is free and needs no account. The three bundled examples replay a saved run in full, also free — that is a complete result you can read before spending anything. A real explanation runs on the gpt-terra model tier and reserves credits from your balance before it starts; the reserve prices the full output cap, so you are almost always charged less than the amount held. The app shows the reserve before you run and the actual charge afterwards, and it disables the run button rather than letting you hit a payment error mid-run.

How is this different from pasting the file into a chatbot?

The coverage contract. Before anything is sent, the prescan mechanically lists every function and class declared and every complexity hotspot — deep nesting, functions past eighty lines, empty catch blocks, TODO markers, runaway lines — and gives each one an id. The explanation is required to account for every one of those ids: either it says which walkthrough step or pitfall covers it, or it sets it aside with a reason. The browser then cross-checks the answer against the list it sent and tells you, in the Prescan coverage line, exactly how many facts were covered, how many were set aside and which were silently skipped. A chat window can quietly not mention the empty catch block; here that shows up as a finding.

Can I run it from a script instead of the page?

Yes. The same app is reachable over the SkillSafe app API, and the API tutorial walks the whole path — getting a token, checking your balance, estimating a run, submitting one and streaming the result — with working samples in cURL, Python, JavaScript, Go, Java, Ruby, PHP and C#. It documents the exact input fields this app sends and the exact JSON contract it parses back, so a script gets the same structured object the page renders.