This one walks you through C++ and Rust memory models when you're writing lock-free code or trying to pick the right ordering for atomic operations. It covers the spectrum from relaxed to seq_cst, explains acquire-release semantics with concrete examples, and includes practical patterns like spinlocks and reference counting. The ordering decision tree is useful: it tells you when relaxed is enough versus when you need stronger guarantees. If you've ever stared at std::atomic documentation wondering whether you need acquire or release, or debugged a race that only shows up under load, this gives you the mental model to reason about it. The common mistakes section alone will save you from the volatile trap.

skills.sh installs
693
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill memory-model --agent claude-code

Installs into .claude/skills of the current project.

Files

Memory Model

Purpose

Guide agents through C++ and Rust memory models: memory orderings, the happens-before relation, atomic operations, fences, and practical patterns for lock-free data structures.

Triggers

  • "What is the C++ memory model?"
  • "What memory order should I use for my atomic operation?"
  • "What is the difference between acquire-release and seq_cst?"
  • "How do I use std::atomic in C++?"
  • "What is acquire/release in Rust atomics?"
  • "How do I implement a lock-free queue?"

Workflow

1. Memory ordering overview

Modern CPUs and compilers reorder operations for performance. The memory model specifies what reorderings are allowed and how synchronisation is achieved.

Ordering strength (weakest to strongest):
Relaxed < Release/Acquire < AcqRel < SeqCst

Stronger ordering = more synchronization = more correct, but slower
Weaker ordering  = fewer barriers = faster, but needs careful analysis

2. Memory orderings

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Categories
Documentation, Release Management, Rust
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54
1syncfusion avatarsyncfusion-react-dropdownssyncfusion/react-ui-components-skillsComprehensive guide for implementing Syncfusion React dropdown components including AutoComplete, ComboBox, DropDownList, ListBox, Mention, MultiSelect, and Mul693skills.sh installs
2rstackjs avatarrspack-best-practicesrstackjs/agent-skillsRspack best practices for config, CLI workflow, type checking, CSS, bundle optimization, assets and profiling. Use when writing, reviewing, or troubleshooting R689skills.sh installs
3jezweb avatarux-extractjezweb/claude-skillsExhaustively extract UX patterns from a reference web app. Walks every screen, captures screenshots of every state, records interaction patterns, copy verbatim,687skills.sh installs
4cloudinary-devs avatarcloudinary-reactcloudinary-devs/skillsProvides opinionated React SDK patterns for configuration, common integration scenarios, and troubleshooting for frequent errors and TypeScript pitfalls. Use wh685skills.sh installs
5joellewis avatarclient-disclosuresjoellewis/finance_skillsGuide which client disclosure documents must exist, what each must contain, and when and how they must be delivered to clients of investment advisers and broker685skills.sh installs
6onewave-ai avatarknowledge-base-builderonewave-ai/claude-skillsFAQ identification from support tickets, step-by-step tutorial creation, screenshot/video script guidance, search optimization, and self-service deflection trac684skills.sh installs