Skip to main content

teachback

A coding agent can write code you couldn't explain, and you forget what you looked up along the way. teachback makes you learn while you work with coding agents.

  • Pairing mode: the agent writes no non-trivial code until you explain why it has to be shaped that way, and debugging stays with you.
  • Reviews: concepts you haven't fixed yet are kept in one file. Your agent asks about one when it's due, on an FSRS schedule, until it sticks.

Install

uv tool install teachback
teachback setup

setup finds Claude Code, Codex and OpenCode on your PATH, shows what it will change in each, and asks before applying. --agent NAME limits it to one agent and --yes skips the question. teachback uninstall takes the same flags and removes everything setup added.

  • Claude Code and Codex get the teachback plugin through their own plugin commands: the pairing mode skill, a SessionStart hook and the MCP server. This repository is the plugin's marketplace.
  • OpenCode gets the skill copied to ~/.config/opencode/skills/, a plugin that does the hook's job copied to ~/.config/opencode/plugins/ (OpenCode 2 or later), and the MCP server registered with opencode mcp add.

Your instruction files (AGENTS.md, CLAUDE.md) are never edited.

Without Python, you can still get pairing mode alone: copy plugin/skills/teachback into your agent's skills folder.

Pairing mode

Turn it on with /teachback in Claude Code, $teachback in Codex or @teachback in OpenCode. Turn it off by saying "stop teachback", or with /teachback off in Claude Code.

Reviews

  • Adding a concept: when you show a gap in a concept, the agent offers to add it to your reviews, and adds it only if you agree. You can also ask it to add one. Pairing mode makes the same offer after you pass an explanation you got stuck on.
  • Being asked: at session start, the agent gets the one concept that's due, if any. It asks you one question, grades your answer Again, Hard, Good or Easy, and saves the grade. That's at most one question per session, and the first comes a day after the concept is added.
  • Leaving: once a concept's next review would be more than 180 days away, it moves to the file's archive section.
  • Your data: ~/.teachback/concepts.json, written only by teachback. TEACHBACK_HOME changes the folder. The file is indented JSON, so cat shows what's in it.
  • No session-start hook? Run the review prompt to review now: /plugin:teachback:teachback:review in Claude Code, /teachback:review in OpenCode.

Agent support

Agent Pairing mode Review at session start Review tools
Claude Code /teachback hook yes
Codex $teachback hook, once you trust it in /hooks yes, and it asks before adding or grading
OpenCode 2+ @teachback plugin yes
OpenCode 1 @teachback no, use /teachback:review yes

Codex runs the hook only after you trust it, when it asks at start or in /hooks, and again after each teachback update.

To stop Codex asking before each add or grade, add this to ~/.codex/config.toml:

[plugins."teachback@teachback".mcp_servers.teachback]
default_tools_approval_mode = "approve"

Changelog · Contributing

Metadata

Release files for teachback 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for teachback 0.1.1
File Size Uploaded Provenance Actions
teachback-0.1.1.tar.gz 105.6 kB Without provenance Details for teachback-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for teachback 0.1.1
File Interpreter ABI Platform Actions
teachback-0.1.1-py3-none-any.whl Python 3 none any Details for teachback-0.1.1-py3-none-any.whl

Total release size: 128.0 kB

Release files / teachback-0.1.1.tar.gz

Download URL teachback-0.1.1.tar.gz
Size 105.6 kB
Tags Source
SHA-256 checksum
How to use checksums
946f19a7b6d61f9d967468dd376f4727bacc40763f2531a14857b9f5f0c93d90
BLAKE2b-256 checksum
How to use checksums
401136179be6309bee5e336820b0f522adc88d2567f9d9dda8d43b2dd9022c3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / teachback-0.1.1-py3-none-any.whl

Download URL teachback-0.1.1-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
055b49910f6e863feeb8ad3fccf2aed33bfb4a83ef9e242eeb8cfb789ce19c43
BLAKE2b-256 checksum
How to use checksums
b0b28deb2dabbdf89b1a19927716bd96af96321a04d2ee0550e40ffe5c002c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for teachback 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page