actionbook avatar

M14 Mental Model

This is your go-to reference when Rust's ownership system feels like it's fighting you. It breaks down the core mental models you need, like treating ownership as a unique key handover and understanding why multiple readers or one writer is the rule. The visualization tables showing stack and heap relationships are genuinely helpful, and the "coming from other languages" section cuts through common misconceptions fast. Best used when you're staring at borrow checker errors and need to step back from the syntax to understand what safety guarantee you're violating. The trace up and trace down sections connect it to other m-series skills nicely, making it a hub for learning rather than just a reference card.

skills.sh installs
3.5K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/rust-skills --skill m14-mental-model --agent claude-code

Installs into .claude/skills of the current project.

Files

Mental Models

Layer 2: Design Choices

Core Question

What's the right way to think about this Rust concept?

When learning or explaining Rust:

  • What's the correct mental model?
  • What misconceptions should be avoided?
  • What analogies help understanding?

Key Mental Models

ConceptMental ModelAnalogy
OwnershipUnique keyOnly one person has the house key
MoveKey handoverGiving away your key
&TLending for readingLending a book
&mut TExclusive editingOnly you can edit the doc
Lifetime 'aValid scope"Ticket valid until..."
Box<T>Heap pointerRemote control to TV
Rc<T>Shared ownershipMultiple remotes, last turns off
Arc<T>Thread-safe RcRemotes from any room

Coming From Other Languages

FromKey Shift
Java/C#Values are owned, not references by default
C/C++Compiler enforces safety rules
Python/GoNo GC, deterministic destruction
FunctionalMutability is safe via ownership
JavaScriptNo null, use Option instead

Thinking Prompt

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Frontend Development, Documentation, Python, Rust, Java & JVM
First seen
May 16, 2026

More from actionbook/rust-skills

All 38
1avdlee avatarxcode-compilation-analyzeravdlee/xcode-build-optimization-agent-skillAnalyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optim3.5Kskills.sh installs
2bencium avatarhuman-architect-mindsetbencium/bencium-marketplaceSystematic architectural thinking for irreplaceable human capabilities - domain modeling, systems thinking, constraint navigation, and AI-aware problem decompos3.5Kskills.sh installs
3actionbook avatarunsafe-checkeractionbook/rust-skillsCRITICAL: Use for unsafe Rust code review and FFI. Triggers on: unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, std::ffi, Ma3.5Kskills.sh installs
4openai avatarchatgpt-appsopenai/skillsBuild, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, regist3.5Kskills.sh installs
5enzed avatarr3f-interactionenzed/r3f-skillsReact Three Fiber interaction - pointer events, controls, gestures, selection. Use when handling user input, implementing click detection, adding camera control3.4Kskills.sh installs
6freshtechbro avatarweb3d-integration-patternsfreshtechbro/claudedesignskillsMeta-skill for combining Three.js, GSAP ScrollTrigger, React Three Fiber, Motion, and React Spring for complex 3D web experiences. Use when building application3.4Kskills.sh installs