The repository root is a valid skill: SKILL.md tells an agent
when to use expert-mentor and how to run it. That makes the whole thing
usable inside Claude Code and opencode, not just as a CLI.
mentor skillWorks whether mentor came from a git checkout or from pip install/pipx install. From a checkout it symlinks the whole repo into the standard
locations (so it stays live as you edit the repo):
~/.claude/skills/expert-mentor -> <repo>
~/.config/opencode/skills/expert-mentor -> <repo>
From a pip/pipx install (no repo to point at) it copies the bundled
SKILL.md, templates/, and references/ into the same locations instead.
Add --dir PATH to install elsewhere, or --force to replace a directory
that already exists there for another reason. ./install.sh still does the
same thing as part of its full one-shot setup (launcher + PATH + skill).
Restart the host (opencode loads skills at startup) so it picks up the new skill.
The skill's description front-loads the trigger keywords, so an agent loads it
when the user wants to learn, be taught, or be mentored in a field — or wants to
turn a provider or local LLM into a teacher. Examples:
- "teach me quantum computing"
- "be my Rust mentor"
- "explain macroeconomics like a professor"
- "make Claude act as an expert tutor for contract law"
- Collects the essentials — field (required), plus level, goal, context, language, provider (inferred if absent).
- Chooses a delivery mode — teach now inline, produce a reusable prompt, configure a provider/local model, or design a curriculum.
- Generates with the CLI — e.g.
mentor --field "Rust" --provider claude --emit json. - Runs the session following the teaching contract, or hands the prompt off.
Instead of symlinks you can register the skill path in your opencode config:
{
"$schema": "https://opencode.ai/config.json",
"skills": {
"paths": ["~/projects"]
}
}The loader scans for **/SKILL.md inside configured paths, so
~/projects/expert-mentor/SKILL.md is found as the expert-mentor skill.
| File | Role |
|---|---|
SKILL.md |
trigger + workflow |
templates/mentor_system_prompt.md |
the master prompt |
templates/compact_prompt.md |
small-model variant |
references/pedagogy.md |
teaching methods |
references/fields.md |
field profiles |
references/providers.md |
provider recipes |