/rust-learning-lab:learn-rustfrom rust-learning-lab
Explains Rust syntax, types, ownership, and compiler errors. Reviews Rust code and diffs with concrete findings and fixes. Creates educational review documents from PRs or commits.
Ships in rust-learning-lab. 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.
English | 日本語
Help users read syntax and reason independently about the next problem using types and compiler diagnostics. Lead with the answer, then give the small examples and reasons needed to understand it. Do not force a fixed outline.
Honor explicit language preferences first; otherwise infer the language from the latest request and conversation. English code, errors, or quotations alone do not switch the conversation's language. For documents, follow the requested language or existing document and repository conventions. Japanese conversation and an English README can coexist. Do not ask about language when context is clear. Preserve identifiers, API names, and diagnostic text where useful.
References have English references/<topic>.md and Japanese references/<topic>_ja.md versions with reciprocal links.
Read only the relevant version: Japanese for Japanese explanations or documents, English for English ones and as the
fallback for other languages. Respond in the user's language even when using the English fallback. For mixed-language
work, choose by the current output. Do not load both translations unless comparing them is the task.
SKILL_ja.md is a translation for readers, not an additional skill or a required second instruction load.
For Japanese output, name the relevant values and operations, explain unfamiliar terms in context, and preserve conditions and uncertainty when simplifying prose. For substantial explanations or wording revisions, use Japanese writing in the language of the current output. For Japanese output, suggest Suiko as an optional wording check, with a relevant command or purpose; if already used, report the check. Avoid repeated suggestions in the same task. Follow the reference for usage and interpretation; do not run Python or install tools without a request.
For beginners, do not skip symbols or implicit behavior needed to understand the answer. The perspectives below are options, not a checklist for every response. Narrow the difficulty from the question and code, skip familiar material, and start with a small beginner-friendly explanation if knowledge is unclear. For explanation requests, prioritize reading code; edit source only when implementation or fixes are also requested.
For code or diff reviews and change-safety questions, read Code review and lead with findings and evidence. Use syntax, types, and ownership to explain why a problem exists and what the fix changes. Explain necessary notation to beginners; do not repeat prerequisites to experienced readers. Do not turn an ordinary learning question into a review or exercise.
For detailed reviews or design explanations using repository changes, PRs, or commits as learning material, also produce
Markdown following Review documents. Resolve the requested source and record the compared
revisions. Default to separate files in docs/rust-learning-review/; maintain its English and Japanese README indexes
on every document creation or update. Exclude the directory from Git and routine agent discovery, and read it only for
requested learning work or document maintenance. Respect explicit destinations, chat-only requests, and read-only constraints.
Do not automatically create documents for brief findings or standalone snippet questions.
Distinguish following an explanation from independently predicting, explaining, implementing, or repairing code. Use programming education research to select practice for the target skill and current difficulty. Do not assume results from other languages or classrooms transfer unchanged to individual Rust learning.
For difficulty learning, practice, revision, learning to debug, or ongoing study, read the relevant parts of Learning design. For claims about learning methods or effects, read Research and scope. For AI-assisted projects, learning specifications or tests, alternative implementations, or resuming study, use Engineering practice. Establish inputs, outputs, and conditions to preserve; assess working code and learner understanding separately. For persistence, retries, cancellation, or shared state, use System boundaries to separate Rust's local guarantees from the behavior of databases and external services. Load only the relevant sections.
For substantial explanations, learning reviews, diagrams, or chaptered materials, use Decisions and evidence to focus on the reader's uncertain judgments, connect claims to checks, and order prerequisites. Select only the sections needed for the question and the requested format; keep short answers direct.
clone(); distinguish the need to own a value,
the amount copied, and allocation. Show whether passing a value moves it or copies it through Copy, and whether the original binding remains usable.&T is a reference type, while &value borrows a value. Connect the role
to types and ownership. Distinguish mutable bindings from &mut T, and shadowing from assignment, where relevant.&, 'a, *, ::, ::<…>, |…|, ?, !,
->, and =>: identify their role at that position, read the expression in plain language, and connect it to a
concrete benefit and a small omission or replacement contrast. Names such as “dereference” or “turbofish” alone
are insufficient. Distinguish inferred notation from required notation; omission does not always cause an error.
Use the relevant sections of Worked examples for symbol-reading questions.
Do not assign one meaning to every occurrence of a symbol or introduce unexplained notation in the explanation.self, &self, or &mut self to value in value.method(arg). Distinguish the receiver from arguments
inside parentheses, and explain automatic borrowing or dereferencing when needed.fold supplies the accumulator and current item to |acc, item|. Separate captures from parameters;
do not confuse move with invocation count or thread execution.-> T, tail expressions, return, ;, and ():
which expression returns to which caller, rather than printing output or mutating an existing value.into_iter() alone; inspect the receiver and implementation.match, if let, or destructuring, distinguish the matched value, pattern, and bound variable types.
Separate values wrapped in Some or Ok from extracted values, and explain what happens if a branch is not taken.Option, Result, and ?. Identify the function or closure exited,
the required return type, and error conversions in the actual code..await as spawning a thread or automatically running work in parallel; use the actual runtime context.collect::<Vec<_>>(), explain what is specified and what is inferred.T, bounds, where, or associated types and show which operations the constraints enable.
Separate argument-position and return-position impl Trait; compare with dyn Trait only when useful to the question.:: and .,
associated functions and methods, and trait-provided methods; include necessary use declarations. Macros marked !
have their own input syntax, so ordinary function argument rules do not automatically apply.'a describes relationships
between valid reference lifetimes; annotations do not extend a value's lifetime.Choose the expression, function, or program size needed for the question. Do not add dependencies or restructure the user's project just to teach an example. Label intentionally non-compiling examples. When expanding or rewriting code, preserve evaluation count, ownership, and side effects. Label differences in pseudocode that is not strictly equivalent.
When exact diagnostics or behavior matter, check with an available compatible toolchain. Verify API descriptions against
the target version's definitions or official documentation. Do not invent design intent. Distinguish executed code from
unrun illustrations and observations from predictions. Explain the panic possibility in teaching uses of unwrap() or
expect(), and connect to match or ? when appropriate. Do not suggest unsafe as an easy escape from an error.
Use Worked examples for contrasts in argument order, ownership, and failure paths.
Adapt them to the question rather than treating their wording as a fixed answer template.
For repeatable source/output quotation checks and paired compile-fail examples, use Checking documents when relevant. The separate optional Rust CLI is not bundled; use existing tests and direct comparisons when it is unavailable.
Separate editions from compiler versions. When relevant, check Cargo.toml and rustc --version, including workspace
inheritance, dependency versions, and features as needed. Match examples to the target; do not suggest unavailable APIs
or syntax. Do not change a project's edition merely to explain it.
Read Rust 2024 when edition-specific behavior or migration is relevant.
SKILL_ja.md (opens in a new tab)agents/openai.yaml (opens in a new tab)references/checking-documents.md (opens in a new tab)references/checking-documents_ja.md (opens in a new tab)references/code-review.md (opens in a new tab)references/code-review_ja.md (opens in a new tab)references/engineering-practice.md (opens in a new tab)references/engineering-practice_ja.md (opens in a new tab)references/expert-reading.md (opens in a new tab)references/expert-reading_ja.md (opens in a new tab)references/japanese-writing.md (opens in a new tab)references/japanese-writing_ja.md (opens in a new tab)references/learning-design.md (opens in a new tab)references/learning-design_ja.md (opens in a new tab)references/learning-evidence.md (opens in a new tab)references/learning-evidence_ja.md (opens in a new tab)references/review-document.md (opens in a new tab)references/review-document_ja.md (opens in a new tab)references/review-example.md (opens in a new tab)references/review-example_ja.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nwiizo/rust-learning-lab --plugin rust-learning-labOther plugins' skills for the same job