Skip to main content

expert-mentor

Turn any LLM — Claude, ChatGPT, Gemini, or a local Ollama / llama.cpp model — into a professional teacher for any field.

expert-mentor generates a calibrated expert-mentor system prompt for a field and level, runs the tutoring session directly, remembers what you've mastered across sessions, and reviews your progress from the transcript.

Generating a Rust mentor prompt

More screenshots and diagrams

How a field becomes a mentor session Curated field profiles Supported providers mentor doctor

More in docs/diagrams.md.

MIT licensed · Python 3.8+ · zero runtime dependencies


Why

Most "tutor" prompts are a persona and a vibe. This one is a system: a teaching contract grounded in learning science (retrieval practice, spacing, scaffolding), provider-native request handling, and a persistent learner model. The mentor teaches to the standard a real senior practitioner would recognise — one concept at a time, checking understanding, and never fabricating sources.

Highlights

  • Provider-native prompts — XML-shaped, prompt-cached system blocks for Claude; developer role, max_completion_tokens, and reasoning_effort for ChatGPT reasoning models; correct handling for Gemini, Ollama, and llama.cpp.
  • Live tutoring sessions over Anthropic, OpenAI, Ollama, and llama.cpp — standard library only, no runtime dependencies.
  • Persistent learner memory — mastered / shaky / misconceptions / open questions, injected into every future session.
  • Model-assisted review — turn a session transcript into an updated profile.
  • Spaced repetition — generate flashcards from a session and review them with an SM-2-lite scheduler (mentor cards / mentor quiz).
  • Curriculum design — a structured, sequenced multi-week plan for any field.
  • Usable as an agent skill — ships with SKILL.md for Claude Code / opencode.

Install

No install needed — run it in place from this folder:

python3 scripts/expert_mentor.py --field "quantum computing" --level beginner

Want a mentor command on your PATH and the skill linked into Claude Code / opencode? Run the installer once from inside this folder:

./install.sh

Quick start

# Generate a system prompt for a field
mentor --field "quantum computing" --level beginner

# Run a live tutoring session (local model)
mentor run --field "Rust" --provider ollama --model qwen2.5:7b

# Run with Claude, remembering progress between sessions
mentor run --field "Rust" --provider claude --remember

# Build a curriculum
mentor curriculum --field "Rust" --duration "6 weeks, 5h/week"

Live sessions

# Claude — system prompt is cached and XML-shaped; optional extended thinking
mentor run --field "contract law" --provider claude --model claude-sonnet-5 --thinking

# ChatGPT — reasoning effort, developer role, usage reported per turn
mentor run --field "Rust" --provider chatgpt --model gpt-5.6 --reasoning-effort high

# Local — Ollama or a llama.cpp / LM Studio server
mentor run --field "music theory" --provider ollama --host http://localhost:11434

Credentials come from the environment or a .env file (ANTHROPIC_API_KEY, OPENAI_API_KEY). See docs/providers.md.

Remembering a learner

# Persist progress automatically (named from the field)
mentor run --field "Rust" --provider claude --remember

# Inspect or curate the profile
mentor learners
mentor progress rust --add-mastered ownership --add-shaky lifetimes --goal "ship idiomatic Rust"

# Assess the last session and update the profile
mentor review rust --apply

# Turn the session into flashcards and review them over time
mentor cards rust --generate
mentor quiz rust

Profiles, transcripts, prompts, and cards live under ~/.config/expert-mentor/ as plain JSON/markdown you can read and edit.

Commands

Command Purpose
mentor --field F [...] generate a teaching prompt
mentor run [NAME] live tutoring session (cloud or local)
mentor save/show/saved store and reuse mentor prompts
mentor curriculum sequenced multi-week curriculum prompt
mentor models list / discover Claude & ChatGPT models
mentor fields / providers curated field profiles / providers
mentor learners / progress / sessions / transcript / review learner memory & assessment
mentor cards / quiz spaced-repetition flashcards
mentor config saved defaults
mentor doctor health check
mentor skill install the Claude Code / opencode skill
mentor interactive build a profile by answering prompts

Full reference: docs/commands.md.

Documentation

Requirements

Python 3.8+. No third-party runtime dependencies. A local Ollama or llama.cpp server is optional (for offline use).

Contributing

See CONTRIBUTING.md. Run make test before opening a PR.

License

MIT © expert-mentor contributors.

Metadata

Release files for expert-mentor 0.6.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 expert-mentor 0.6.2
File Size Uploaded Provenance Actions
expert_mentor-0.6.2.tar.gz 77.0 kB Without provenance Details for expert_mentor-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for expert-mentor 0.6.2
File Interpreter ABI Platform Actions
expert_mentor-0.6.2-py3-none-any.whl Python 3 none any Details for expert_mentor-0.6.2-py3-none-any.whl

Total release size: 134.8 kB

Release files / expert_mentor-0.6.2.tar.gz

Download URL expert_mentor-0.6.2.tar.gz
Size 77.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dda8991a2e1c5ef91db0995c9a1061ca0a9686fbed894a22c8bb093aea7d422f
BLAKE2b-256 checksum
How to use checksums
92d88c7fd4bd628ac3bdf322b94b4374c86d8bb826cdddb8414c10171fcacbc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / expert_mentor-0.6.2-py3-none-any.whl

Download URL expert_mentor-0.6.2-py3-none-any.whl
Size 57.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd567375711afd113981c3c9cfae918580f7321d32da248c4e5581e2a6ccf5fe
BLAKE2b-256 checksum
How to use checksums
8c426df5e5fccb6ed226d6597f9291dafbbc575933b0a5764a38f45a37c705e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for expert-mentor 0.6.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.

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files No provenance

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