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, and the plugin follows its main branch, like most plugins. teachback setup --pin pins it to the release tag of the teachback you installed instead.
  • 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.

To update, run uv tool upgrade teachback, then teachback setup. It updates the Claude Code and Codex plugins when they're older than the CLI, and replaces OpenCode's copies. You can also update the plugin with your agent's own commands:

claude plugin marketplace update teachback
claude plugin update teachback@teachback

codex plugin marketplace upgrade teachback
codex plugin add teachback@teachback

A pinned plugin stays on its tag: after an upgrade, run teachback setup --pin again to move it to the new one. To follow main again, run teachback uninstall, then teachback setup.

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"

The setting survives updates, but teachback uninstall removes it along with the plugin.

Changelog · Contributing

Metadata

Release files for teachback 0.1.2

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.2
File Size Uploaded Provenance Actions
teachback-0.1.2.tar.gz 108.0 kB Without provenance Details for teachback-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 131.4 kB

Release files / teachback-0.1.2.tar.gz

Download URL teachback-0.1.2.tar.gz
Size 108.0 kB
Tags Source
SHA-256 checksum
How to use checksums
98dfe091e717c341eb6fa9163bc512a8cb1b3a2f445573b0a10c3168f41afe4d
BLAKE2b-256 checksum
How to use checksums
e1983440645587a66450733baff90dd8bc36a03bf80f418d89ad070b826e2d85
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.2-py3-none-any.whl

Download URL teachback-0.1.2-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
885745c80f14fa1d61955ba14da4579e526ff6f8ab6e21b7e00c1cf614dd9cc0
BLAKE2b-256 checksum
How to use checksums
49da2f7e6ee9d7b3d2f106db1383df6bdbf23a223560540ef512c1b39dce942d
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.2

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