/turbo:route-lessonsfrom Turbo
Routes candidate lessons to the appropriate knowledge layer: project CLAUDE.md, auto memory, skills, backlog, or Turbo handoff. Activated by phrases like 'route lessons' or 'where should this lesson go'.
Ships in Turbo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Route each candidate lesson to the knowledge layer it belongs in.
Take the candidates passed in, or the lessons the user names. Each carries the lesson, the evidence behind it, its origin (the current session, a past session, or a file such as a memory note), the skill it arose from when there is one, and any reason the user did not state. When none were passed in and the user names none, say so and continue with Step 7.
Use TaskCreate to create a task for each step:
Available destinations:
.claude/CLAUDE.md (may be a symlink to ../AGENTS.md — resolve it), plus any nested CLAUDE.md / AGENTS.md files in subdirectories.autoMemoryDirectory setting overrides its location; otherwise it normally lives at <Claude config home>/projects/<encoded project root>/memory/, where the config home is CLAUDE_CONFIG_DIR when set and ~/.claude otherwise. The key replaces every character outside A-Za-z0-9 with -, and long keys may be truncated and hashed, so prefer the exact harness-provided path over recomputing it. List the directory and read MEMORY.md if it exists.skills/ or .claude/skills/ (resolve symlinks)Discover the project CLAUDE.md/AGENTS.md files (the root file and any nested ones in subdirectories) and read them, then read MEMORY.md. When those files point at a knowledge base the repo maintains, read its index too; it is a documentation source for Step 3, and a routing destination only when the CLAUDE.md/AGENTS.md files name it one. Also read any document of rules for one area that those files tell agents to read before working in that area; Step 4 routes lessons to it. Note each other destination the CLAUDE.md/AGENTS.md files name for a kind of knowledge, outside skills and instruction files, with the process they give for writing to it and the subtree of the file that names it; Step 4 routes lessons to it too. List all skill directories with the description frontmatter of each SKILL.md, but leave the bodies unread until Step 2.
Read the top-level checkout key from ~/.turbo/config.json when the file exists. When it names a directory holding claude/skills/, that directory is the user's Turbo clone or fork. Treat any other value as unset, and say so in the Step 5 routing plan.
When ${CLAUDE_SKILL_DIR}/../../.claude-plugin/plugin.json exists and names the plugin turbo, the Turbo plugin's skills folder is ${CLAUDE_SKILL_DIR}/... Otherwise this skill runs from an override or a leftover copy, no folder is known to be Turbo's, and only a turbo: invocation marks a turbo skill. Scan the conversation for Skill tool invocations, turbo:-prefixed ones included, the base directory each skill load reported, and SKILL.md reads from ~/.claude/skills/ or the Turbo plugin's skills folder. Classify every skill a candidate lesson could touch, meaning the skill it arose from and any skill whose description covers its domain, by where it was loaded from, never by its name alone:
turbo:<name>, or when the base directory its load reported, or the path its SKILL.md was read from, lies in the Turbo plugin's skills folder. A same-named skill loaded from ~/.claude/skills/ or the project overrides the Turbo skill, and its lessons go to that override. A skill this session did not load is a turbo skill when <Turbo plugin's skills folder>/<name>/SKILL.md exists and no skill of that name exists in ~/.claude/skills/ or the project~/.claude/skills/ not classified as turbo, overrides included, read references/package-managed-skills.md once and apply its Classify the Skill section to eachException: If the current project IS the turbo repo (i.e., the working directory contains this skill collection), route turbo skill lessons through the Existing user/project skill destination in Step 4 — edits go directly to claude/skills/<name>/ in the project, with no handoff and no contribution flow.
Verification rule (mandatory before routing in Step 4): For every candidate skill that is about to be routed as turbo and ran in this session, find the load that ran it in this session's record: a turbo: Skill tool invocation, the base directory a load reported, or a SKILL.md read. Confirm that the load came from the Turbo plugin's skills folder. For a candidate that did not run, confirm that <Turbo plugin's skills folder>/<name>/SKILL.md exists and that no skill of that name exists in ~/.claude/skills/ or the project. Do not rely on a name match, remembered listings from earlier in the session, or filename hits in grep output: a personal or project skill of the same name is an override, not the turbo skill. Classify a candidate that fails this rule again by the bullets above. The rule applies under the exception above too.
Read the SKILL.md of every skill Step 1 classified.
Keep only lessons that are:
references/ and other supporting files of the skills read in Step 2, or in the project's own knowledge stores already covers it, even as a special case. The lesson's own origin counts as no coverage. Search those sources for each candidate's keywords, then judge coverage by meaning rather than by shared wording:
Discard anything session-specific, speculative, one-off, or already resolved (but not successful workflows — see exception above). When no lessons survive filtering, say so and continue with Step 7.
Assign each surviving lesson to exactly one destination. Apply the routing rules in this order. The first that applies to a lesson decides its destination:
A lesson whose destination holds its origin needs no write: leave it out of Steps 5 and 6, and report it in Step 7 as kept where it is.
Package-managed skills (mandatory): A lesson for a skill Step 1 classified as package-managed or ownership-unresolved routes by the Route Its Lessons section of references/package-managed-skills.md.
Mechanical rules (mandatory): Classify each lesson that states a rule for the project's code as mechanical or judgment. A mechanical rule is one a tool can decide from the code alone: a fixed pattern, a banned call, an import shape, a file-location rule. Route it to Deterministic check alone, writing it to no instruction file, memory, or skill. A rule that takes judgment to apply routes by the remaining rules like any other lesson.
Revisions: A lesson Step 3 kept as a revision routes to the destination that holds the rule it revises, as an update-in-place. When the rule lives in a source that is not a routing destination, route the lesson by the remaining rules like any other. When the rule lives in a turbo skill, its destination is Existing turbo skill, or Existing user/project skill under Step 1's turbo repo exception: the revision goes where any other lesson for that skill goes, never into the plugin's copy.
Skill-first rule (mandatory): Check whether the lesson corrects, refines, or adds a guardrail to any existing skill's behavior — turbo or user/project. This includes lessons about skipping steps, wrong defaults, missing edge cases, or any "don't do X when running /skill-name" correction. If yes, route to that skill. Do not route skill corrections to auto memory or CLAUDE.md.
Project routing: A lesson of a kind Step 1 noted a destination for, within the subtree of the file that names it, routes to Project-named destination.
| Destination | Criteria |
|---|---|
| Project backlog | Actionable improvement to existing code: refactoring, performance, reliability, readability, testing, or DX. Not for documentation fixes — factual errors in CLAUDE.md belong in the Project CLAUDE.md / AGENTS.md row. Route to .turbo/backlog.md via the /backlog skill. |
| Deterministic check | A mechanical rule for the project's code, or an existing check that nothing runs. The work is building the check or wiring it in: a rule in the linter the project already uses, a git hook, or a CI job, whichever its existing tooling makes cheapest. The work also clears the existing violations and makes the check block new occurrences, and a new check gets an error message that names the fix the lesson calls for. Route to .turbo/backlog.md via the /backlog skill. |
| Auto memory | Discovered knowledge with no skill home: API quirks, debugging workarounds, compiler gotchas, tool pitfalls, user preferences. Must not overlap with any existing skill's domain — if it does, route to the skill instead (see skill-first rule above). A lesson the package-managed skills rule sends here stays here, whatever domain it overlaps, as does a turbo skill lesson the user declines to propose upstream in Step 6. |
| Project CLAUDE.md / AGENTS.md | Intentional project decisions: conventions, architecture, stack choices, build setup, module boundaries. Also factual corrections to CLAUDE.md content (wrong commands, outdated paths, incorrect conventions) — fix these directly, do not defer to Project backlog. When the lesson applies only to one subtree, route it to the nearest enclosing CLAUDE.md/AGENTS.md; reserve the root file for project-wide decisions. When those files tell agents to read a document of rules for the lesson's area, write the lesson there under its matching section. |
| Project-named destination | A destination Step 1 noted for the lesson's kind of knowledge, such as a knowledge base. Write to it by the process the project's instruction files give. |
| Existing user/project skill | Lesson would improve a skill's instructions, supporting files, or reference materials, add a missing edge case, correct its workflow, or refine its trigger conditions. Route to any skill whose domain covers the lesson — not just the skill the lesson arose from. Changes go to the skill file directly. No contribution flow. |
| New skill | A cohesive body of knowledge emerged that deserves its own on-demand context. The test: would this knowledge be too large for a CLAUDE.md section, and should it only be loaded when relevant? |
| Existing turbo skill | Same criteria as Existing user/project skill above, but for turbo skills. Before routing here, apply Step 1's verification rule; a skill it classifies as other than turbo routes to the Existing user/project skill destination instead, subject to the package-managed skills rule above. Changes are not applied in this session: they go into a handoff in the Turbo checkout when checkout is set, and are offered upstream otherwise (see Step 6). |
| No destination | Does not clearly fit any destination. Drop it. |
Splitting heuristic: When a lesson establishes new scripts or a new multi-step procedure, split it: a brief pointer goes to CLAUDE.md (script names, purpose), and the full workflow goes to a skill. Don't collapse them into a single CLAUDE.md entry.
Tiebreakers (in priority order):
Skip when no lesson needs a write, and continue with Step 7.
Output a table as text before making any changes:
| # | Lesson | Destination | Action |
|---|--------|-------------|--------|
| 1 | Always use X for... | Project AGENTS.md | Append to ## Conventions |
| 2 | The /pr skill should... | ~/.claude/skills/pr | Update references/create.md Phase 2 |
| 3 | Multi-step deploy workflow | New project skill | Create new skill |
| 4 | User prefers short commit msgs | Auto memory | Update <resolved memory target> |
| 5 | /finalize should skip step 3 when... | Turbo skill: finalize | Handoff to Turbo checkout |
For each lesson, show: concise summary, exact target file/skill, and whether it's an append, update-in-place, or new creation. When a lesson's origin is a file, start its action with move from <file> when Step 7 would mark the lesson moved once its write lands, and with from <file> otherwise. When a lesson carries a reason the user did not state, show that reason in its row, marked inferred, so the approval covers it. For Auto memory, name the resolved project-memory target so the approval covers the durable write at that path. Turbo skill lessons show Handoff to Turbo checkout as the action when checkout is set, and Propose upstream otherwise, naming the Auto memory target that receives the lesson if the user declines to propose it.
Then use AskUserQuestion with these options: Approve or Reject.
Skip when Step 5 was skipped or the user rejected the plan.
Apply approved changes in order:
/backlog skill with the summary, location, and rationale for each, and for a deterministic check the mechanism it goes into, the existing violations it must clear to block new occurrences, and for a new check the fix its error message names./write-skill skill to apply changes to any file inside the skill directory (SKILL.md, references, scripts, assets)./write-skill skill for each new skill. Provide the trigger conditions and the evidence behind each lesson.Output each candidate lesson in the words it was passed, with its origin and its outcome: written (naming each file it landed in and its destination), handed off to the Turbo checkout, filed upstream (with the issue URL), not filed upstream, kept where it is, rejected, failed (with the error), dropped in Step 4 (with the reason), or discarded in Step 3 (with the reason). Mark as moved each lesson whose origin is a file and that was written to a destination other than Auto memory or the backlog, handed off, or filed upstream.
Then use the TaskList tool and proceed to any remaining task.
What SKILL.md sets; muted values are Claude Code's defaults
74 skills in this plugin
/apply-findingsApply accepted review findings as code changes, escalating ambiguous ones to the user. Use when the user asks to "apply findings", "apply fixes", or "apply the review results"./assess-technical-debtAssess project-wide technical debt (hotspots, deprecated APIs, duplication, low-value tests) into a ranked report. Use when the user asks to "assess technical debt" or "what should we refactor"./backlogCapture an out-of-scope improvement or accepted simplification in .turbo/backlog.md. Use proactively mid-task, or when the user asks to "backlog this", "note this idea", or "track this for later"./changelog-rulesShared changelog conventions and formatting rules. Not typically invoked directly./code-styleEnforce existence, reuse, mirror, and symmetry principles so new code stays minimal and consistent. Use when writing, changing, or refactoring code in an existing codebase./codex-execRun autonomous task execution using the codex CLI. Use when the user asks to "codex exec", "run codex exec", "execute a task with codex", or "delegate to codex".npx claudepluginhub tobihagemann/turbo --plugin turboOther plugins' skills for the same job