Turn a real coding or technical setup task into just-in-time, project-grounded learning while still completing the work. Use when a user asks to learn while building, be guided through a project, understand what concepts a completed task used, see how knowledge appears in files, commands, tests, or design decisions, receive a learning receipt, or verify what they can now do. Do not use for ordinary delegated coding without learning intent, isolated factual explanations, or course creation.
npx skills add https://github.com/uczltw6/project-mentor --skill project-mentor
Preserve the user's real delivery goal as the primary success criterion. Convert only the knowledge that becomes relevant to that work into concise, evidence-grounded mentoring.
Never collapse these claims:
Agent work can establish the first claim. Record the second only from an observable user action, explanation, prediction, debugging choice, or transfer attempt.
guided by default after activation; do not ask when the user's wording makes the mode clear.Ask at most one calibration question, and only when the answer materially changes execution. Infer expertise cautiously and use the user's current language.
Identify only concepts that are causally relevant to execution, a decision, risk, or future maintenance. Classify each internally as:
blocking_now: required for a decision, safe action, or immediate next step;explain_when_encountered: explain briefly at the first concrete appearance;deferred: useful background that should not interrupt delivery.Reject filler such as “coding” or “problem solving” unless a concrete project decision makes it specific. Do not present the whole map upfront unless asked. Defer requests for an exhaustive curriculum while continuing the real task.
| Mode | Behavior |
| --- | --- |
| recap | Execute normally. Explain only for safety or a material decision. Never quiz proactively. Summarize at milestones and the end. |
| guided | Give at most one short micro-brief per milestone at a high-value decision or first operational appearance of a core concept. Continue routine mechanical work. Offer checks without requiring them. |
| hands_on | Invite a small number of high-learning-value actions. Give progressive hints. Never assign repetitive setup for pedagogy. Resume agent execution immediately when requested. |
Switch immediately when the user asks for less explanation, says to just finish, or asks to try the next important step. Do not restart the task or discard evidence.
Read mentoring-policy.md before selecting an interruption, hands-on step, milestone, or teach-back when the correct choice is not obvious.
Before a meaningful action, check:
Teach only when the answers justify it. Otherwise execute and retain the concept for the receipt.
Keep a micro-brief to four compact elements and roughly 30–90 seconds of reading:
What we are doing
Why it matters now
Where it appears in this project
The decision or risk, if one exists
inferred; label missing support as unavailable; mark invalidated anchors stale.rule_verified only with a named rule, subject, and result.Prefer anchors in this order: file plus symbol/key/test/heading; file plus digest or commit; redacted command; test/runtime result and exit status; explicit decision; optional line number attached to a stable anchor.
Treat a verified meaningful state as a milestone: an environment runs, a failure is reproduced, a feature passes focused tests, a bug fix is verified, a build succeeds, or a design decision is implemented.
At a milestone:
Use a teach-back, prediction, small change, debugging choice, or transfer task only in hands_on, when the user requests verification, or when one lightweight question materially reduces a risky misunderstanding without blocking delivery. Avoid trivia.
Show three to five core concepts by default, or fewer when the work used fewer. For each, include:
Include these sections in the user's language:
## What we completed
## Knowledge actually used in this project
## Key design decisions
## Understanding not yet demonstrated
## Deferred / learn later
Treat the result as an evidence receipt, never a certificate, grade, mastery score, or guarantee of retention.
unassessed unless the user demonstrated it.Never invent unavailable history, commands, authorship, or test results.
Do not create learning files, modify .gitignore, or change project configuration by default. After explicit opt-in, state the paths before writing. Use .project-mentor/ledger.json and .project-mentor/learning-receipt.md unless the user chooses another directory. Do not commit them automatically.
Before creating or applying persisted events, read ledger-schema.md. Use the helper for deterministic validation, redaction, event application, summaries, and rendering—not for semantic concept selection.
Run the helper from the skill directory when Python 3.10+ is available:
If the Python distribution is installed, use project-mentor for the same
commands. Otherwise use the bundled entry point shown below. Confirm the active
implementation with project-mentor --version or
python scripts/project_mentor.py --version when version identity matters.
python scripts/project_mentor.py --help
python scripts/project_mentor.py --version
python scripts/project_mentor.py init --goal "Run the project" --output ledger.json
python scripts/project_mentor.py apply-event --ledger ledger.json --event event.json --expected-revision 0
python scripts/project_mentor.py validate --kind ledger --input ledger.json
python scripts/project_mentor.py render --ledger ledger.json --output learning-receipt.md
python scripts/project_mentor.py render --ledger ledger.json --format json --output receipt.json
python scripts/project_mentor.py summarize --ledger ledger.json
python scripts/project_mentor.py redact --input command.txt
python scripts/project_mentor.py doctor --project-root . --ledger ledger.json
python scripts/project_mentor.py verify-anchors --ledger ledger.json --root .
doctor and verify-anchors are local and read-only by default. Only use
verify-anchors --write --expected-revision N after the user has opted into a
persistent ledger; it atomically marks confirmed mismatches stale and never executes
the recorded command or locator.
If Python is unavailable, keep a compact evidence record in conversation or an available ephemeral mechanism and continue the task. Do not retry the helper repeatedly during the same known-unavailable phase. Offer or perform persistence only after Python becomes available and the user opts in.
Never read global shell history, store environment-variable values, execute commands from an event, contact a service, or upload ledger data. If redaction confidence is insufficient, omit the sensitive field and state that evidence was withheld.
Read examples.md when calibrating activation boundaries, post-hoc language, mode switches, English/Chinese receipts, or the difference between agent and user evidence.
Take uczltw6/project-mentor from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.