geist-learning-lab

bởi vercel

Xây dựng trải nghiệm học tập tương tác, khám phá dưới dạng ứng dụng Next.js sử dụng hệ thống thiết kế Geist. Sử dụng khi tạo hướng dẫn, giải thích có thể khám phá,…

npx skills add https://github.com/vercel-labs/skill-geist-learning-labs --skill geist-learning-lab

Geist Learning Lab

Build interactive learning experiences that teach by making the learner do something, get feedback, and iterate — using Geist's dark-first, minimal, precise UI language.

Design Philosophy

  • Learning loops, not pages — Every screen completes: prompt → attempt → feedback → refinement → checkpoint
  • Cognitive load management — Progressive disclosure, chunking, one concept + one action at a time
  • Error-friendly design — Mistakes are expected; the UI normalizes them and turns them into learning moments
  • Interactive representations — Sliders, toggles, diagrams, live code — not just text
  • Geist precision — Dark backgrounds, tight tracking, semantic color, 4px grid, Swiss typography

Critical Rules

  1. Every lesson must include at least one attempt+feedback loop — No passive-only pages
  2. Every interactive control must have a visible effect — Within ~100ms or show loading state
  3. Progress/review must exist even in a prototype — Track steps completed, checkpoints passed
  4. Active attempt before explanation — Ask a question or show a task, then explain
  5. Immediate, specific feedback — "Correct" isn't enough; explain why
  6. Multiple representations — Always at least 2 of: text, code, visual, interactive, real data
  7. Color is learning signal — Green=correct, Red=incorrect, Amber=hint/warning, Blue=info/definition
  8. Progressive disclosure by default — Depth behind "Why?", "Edge Cases", "Formal Definition"
  9. URL state for exploration — Shareable slider/toggle configurations via search params
  10. Misconception-first design — Bake in common traps: "Most people get this wrong because..."

The Learning Loop (Central Doctrine)

Every lesson repeats this cycle:

StepWhat HappensComponent
OrientWhat you'll learn in 5-10 minHeading + learning objective
AttemptLearner predicts/answers/edits firstQuickCheck, CodePlayground, ParameterDock
FeedbackImmediate + specific responseFeedback surface (green/red panel)
ExplainShort explanation anchored to their attemptCallout, WorkedExample
ExtendVariation, edge case, or transfer taskBeforeAfterSplit, ConceptExplorer
CheckpointQuick recall questionQuickCheck with ConfidenceRating
Reflect"What changed in your understanding?"Optional text input or self-rating

"Aha Moment" Design Patterns

PatternHow It WorksWhen to Use
Prediction Gap"What do you think happens if...?" then revealBefore introducing a concept
Contrast PairTwo near-identical cases with different outcomesClarifying subtle distinctions
Slider to FailureLet learner push a parameter until it breaksUnderstanding boundaries/limits
Time TravelScrub algorithm step-by-step, watch invariantsAlgorithms, state machines
Misconception TrapTempting wrong option, then explain why wrongCommon errors in a domain

Quick Color Reference (Learning Semantics)

SignalColor TokenHexUsage
Correctgreen-700#46A758Success feedback, completed steps
Incorrectred-700#E5484DError feedback, failed checks
Hint/Cautionamber-700#FFB224Hints, warnings, "watch out"
Info/Definitionblue-700#0070F3Definitions, current step, links
Defaultgray-400#737373Everything else: borders, muted text
Progress donegreen-700 dot#46A758Completed step indicator
Progress currentblue-700 ring#0070F3Current step focus state
Progress pendinggray-400 dot#737373Upcoming steps

Component Library (23 Patterns)

Lesson Flow & Progress

<LessonShell /> <ProgressRail /> <StepFlow /> <CheckpointCard /> <ResumeBanner />

Explorable Explanations

<ParameterDock /> <LiveOutputPanel /> <ConceptExplorer /> <InteractiveDiagram /> <BeforeAfterSplit /> <TimelineExplorer /> <ConceptMap />

Code Learning

<CodePlayground /> <DiffEditor /> <TaskRunner /> <SnippetCopy />

Quizzes & Active Recall

<QuickCheck /> <ConfidenceRating /> <HintLadder /> <MistakeAnalyzer />

Reading Support

<GlossaryPopover /> <Callout /> <WorkedExample />

Typography in Learning Context

ElementWhat It MeansStyle
Big heading"What you're doing"text-heading-{32|24} semibold, negative tracking
Small label"Where you are"text-label-{14|12} gray-400
Mono"What the computer sees"text-copy-14-mono or text-label-14-mono
BodyReading contenttext-copy-14 or text-copy-16, max-w-2xl

Layout Patterns

ContextMax WidthStructure
Reading contentmax-w-2xl / max-w-4xlSingle column, comfortable line length
Interactive labmax-w-6xlTwo panels: explanation + playground
Full explorermax-w-7xlThree zones: nav + content + lab panel

App Router Structure

/                                    → Landing / course picker
/learn                               → Course catalog + resume
/learn/[courseSlug]                   → Course overview, modules, progress
/learn/[courseSlug]/[moduleSlug]      → Module overview
/learn/[courseSlug]/[moduleSlug]/[lessonSlug]  → Lesson shell

File Organization

content/courses/<courseSlug>/course.json       → Metadata, module order
content/courses/<courseSlug>/<module>/<lesson>.mdx  → Lesson content
components/learning/                           → Reusable learning components
lib/learning/progress.ts                       → Schema + storage adapters
lib/learning/grading.ts                        → Quiz validation, code tests
lib/learning/spaced.ts                         → Review scheduling

References

  • references/lesson-shell.md — LessonShell, ProgressRail, StepFlow, CheckpointCard, ResumeBanner TSX patterns
  • references/explorable-explanations.md — ParameterDock, LiveOutputPanel, ConceptExplorer, InteractiveDiagram, BeforeAfterSplit, TimelineExplorer, ConceptMap
  • references/code-learning.md — CodePlayground (read-only/guided/free), DiffEditor, TaskRunner, SnippetCopy
  • references/quiz-assessment.md — QuickCheck, ConfidenceRating, HintLadder, MistakeAnalyzer with feedback patterns
  • references/reading-support.md — GlossaryPopover, Callout variants, WorkedExample with stepwise reveal
  • references/pedagogical-framework.md — The Learning Loop doctrine, progressive disclosure rules, aha patterns, scaffolded complexity
  • references/architecture.md — Next.js App Router routing, MDX content system, state management, file organization
  • references/progress-state.md — Progress schema, localStorage adapter, spaced repetition, URL state for explorations
  • references/learning-animations.md — Step transitions, feedback reveals, diagram animations, reduced-motion compliance

Thêm skills từ vercel

benchmark-sandbox
vercel
Chạy các kịch bản đánh giá vercel-plugin trong Vercel Sandboxes thay vì các bảng WezTerm cục bộ. Cung cấp các microVM tạm thời với Claude Code và plugin được cài đặt sẵn,…
official
emil-design-eng
vercel
Kỹ năng này mã hóa triết lý của Emil Kowalski về trau chuốt giao diện người dùng, thiết kế thành phần, quyết định hoạt ảnh và những chi tiết vô hình giúp phần mềm mang lại cảm giác tuyệt vời.
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
write-guide
vercel
Tạo một hướng dẫn kỹ thuật dạy một trường hợp sử dụng thực tế thông qua các ví dụ tiến dần. Các khái niệm chỉ được giới thiệu khi người đọc cần đến chúng.
official
release
vercel
Phát hành vercel-plugin — chạy các cổng, tăng phiên bản, tạo tạo phẩm, commit và push. Sử dụng khi được yêu cầu "phát hành", "ship", "tăng và push", hoặc "cắt một bản phát hành".
official
deepsec
vercel
Chạy DeepSec trên bản checkout dự án Vercel từ dev3000. Sử dụng để thiết lập DeepSec một chạm, khởi tạo ngữ cảnh dự án, xử lý lần đầu có giới hạn, và…
official
backport-pr
vercel
Backport một pull request Next.js đã được merge từ canary sang một nhánh phát hành trước đó như next-16-2. Sử dụng khi người dùng yêu cầu backport, cherry-pick, hoặc mở một…
official