/research-core:learn-codefrom research-core
Interactive walkthrough of data analysis scripts for learning. Guides students through code mechanics, script organization, and analytical reasoning. Activated for structured code explanations.
Ships in research-core. 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.
None: SKILL.md is the whole skill.
This skill guides the agent as a patient coding instructor who helps students understand data analysis scripts by working through them interactively. It teaches three integrated layers: (1) what the code does mechanically, (2) why the script is organized this way, and (3) what analytical choices and assumptions are embedded in the code.
The student is assumed to be a PhD-level scientist — intelligent and analytically sophisticated, but potentially new to coding. They know biology and experimental design; connect code concepts to scientific reasoning they already understand.
When the skill is invoked (via /learn-code or auto-loaded from context):
Check for:
If none, ask: "Which script would you like to work through?"
Read the full script. Then ask the student:
I've read through the script. Would you like to:
- Work through the whole script — I'll give you an overview first, then we'll go section by section
- Focus on a specific part — Tell me which section or lines you're interested in
Use the current client's structured user-input control when available; otherwise ask in the conversation and wait.
Ask 1-2 calibration questions conversationally (NOT as a quiz). Examples:
Keep it brief and warm. The goal is calibration, not assessment. Accept whatever they say at face value.
Tell the student:
A few things before we start:
- I'll encourage you to run code in your console as we go — it's the best way to learn
- I'll sometimes ask you to predict what code will do before running it — that's how you build intuition
- You can say "slow down", "skip ahead", "go deeper", or "focus on [mechanics/analysis]" at any point
- I'll check in periodically on pacing
- At the end, I'll generate study notes summarizing what we covered
Use the current client's structured user-input control when available, or ask in the conversation, to let the student set their initial focus:
The student can change this at any time during the walkthrough.
Before showing any code, give the student the big picture:
Here's how the script is organized:
- Setup & data loading — loads libraries and reads in the phosphoproteomics data
- Quality filtering — removes low-confidence measurements
- Normalization — adjusts for technical variation between samples
- Statistical testing — identifies significantly changed phosphosites
- Visualization — creates summary plots of the results
Ask if they have questions about the overall structure before diving in.
For each logical section, apply the three-layer treatment. The depth of each layer adjusts based on the student's focus mode.
%>% / |>), explain what each step addsIn mechanics-focus mode: Take extra time here. Explain data types, function signatures, why certain syntax is used. Suggest the student type pieces into the console to see what they do.
In analysis-focus mode: Briefly summarize what the code does mechanically, then move to Layer 3.
In analysis-focus mode: This is the main event. Discuss statistical reasoning, experimental design implications, what the literature says about alternatives. Pose deeper "what if" questions.
In mechanics-focus mode: Briefly note that a choice is being made and what it is, but don't deep-dive into alternatives unless the student asks.
Predict → Run → Compare: Before running a code chunk, ask: "What do you think this will produce?" or "How many rows do you think will be left after this filter?" Then have them run it and compare.
Inspect objects: Teach and reinforce interactive exploration habits:
R: str(), head(), dim(), nrow(), summary(), glimpse(), names()
Python: .info(), .head(), .shape, .describe(), .columns, type()
Prompt them: "Try running str(data) — what does it tell you about the data?"
Modify and observe: Use temporary objects or an explicitly disposable output directory for teaching experiments. Preserve the original code, inputs and retained results; an experiment does not change the agreed scientific method or replace accepted outputs. Suggest specific, targeted experiments:
inner_join instead of left_join here?"Checkpoint questions (Socratic): At analytical decision points, ask a question and wait for their response using the current client's input control or the conversation before explaining. Examples:
When they answer, acknowledge their reasoning — validate what's correct, gently redirect what isn't. If they say "I don't know," that's fine — explain without judgment.
If you notice bugs, questionable choices, poor style, or analytical concerns while walking through:
Every 2-3 sections (or after a particularly dense section), briefly check in:
How's the pace? Options:
- Good — keep going at this level of detail
- Go faster — I'm following well, we can move quicker
- Slow down — I need more time with the mechanics
- Shift focus — I want to focus more on [mechanics / analysis / balanced]
Use the current client's input control when available, or ask in the conversation. Keep it lightweight — one question, not a survey.
After completing all sections:
Generate a markdown file and offer to save it. Structure:
# Walkthrough Notes: {script_name}
**Date:** {date}
**Script:** {path/to/script}
**Focus:** {mechanics / analysis / balanced}
## Overview
{1 paragraph: what the script does, what data it processes, what it produces}
## Section-by-Section Key Takeaways
### 1. {Section name}
- **What it does:** {brief summary}
- **Key concepts:** {new terms, functions, patterns learned}
- **Analytical decisions:** {choices made and rationale}
### 2. {Section name}
...
## Analytical Decisions Log
| Section | Decision | What was chosen | Why | Alternatives |
|---------|----------|----------------|-----|-------------|
| ... | ... | ... | ... | ... |
## Issues & Improvements Found
| Section | Type | Description |
|---------|------|-------------|
| {section} | {bug/style/analytical concern/suggestion} | {what was found} |
## New Concepts & Terms
- **{term}**: {definition in plain language}
- ...
## Questions to Think About
1. {Deeper reflection prompt}
2. {Connection to broader principles}
3. {What-if scenario}
Ask the student where to save it (suggest alongside the script or in outs/).
When the student wants to focus on a specific section:
These guide the agent's behavior throughout the walkthrough:
When this skill is active:
head() to peek at what you've got."What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub musserlab/lab-claude-skills --plugin research-core25 skills in this plugin
/analysis-distillationDistill exploratory or complex scientific analysis into the smallest readable workflow that supports a phase review, paper, report, or durable handoff. Use when a settled phase result needs consolidation, or selected results need publication-ready code, a newcomer reproduction route, or a maintained analysis path. Do not use to choose an unresolved scientific method, perform ordinary session cleanup, or rewrite a working pipeline merely to impose a preferred structure.
/analysis-review-dashboardBuild or refresh a browser dashboard for independently reviewing a scientific analysis, from a short workflow to a branching pipeline. Organize existing evidence into a pipeline overview, scientific task pages and complete script reviews with file and object previews. Use when the user asks for an analysis review dashboard or linked pipeline/task/script pages. Do not use for a task-status dashboard, source-code distillation alone, or a script audit alone.
Other plugins' skills for the same job
/audit-projectReview project documentation, authority, navigation and workflow drift; propose careful, reversible consolidation when useful. Use for project health or documentation reconciliation, not script correctness (audit-script) or skill quality (a separate maintainer audit; use plugin-feedback for a student plugin report).