
M03 mutability
Guides a Rust agent through E0596/E0499/E0502 borrow errors and interior mutability
M03 mutability is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 21
- Last commit
- License
- MIT
- Listing updated
Similar skills
About M03 mutability
This skill is a reference for Rust mutability problems. When a task involves a borrow-checker error or a choice between exclusive borrows and interior mutability, it steers the agent to first ask whether the mutation is needed at all, who should control it, and whether the code runs on one thread or several.
The guidance is organized as a decision flow. It maps common compiler errors to design questions instead of quick fixes, offers a table for picking between Cell, RefCell, Mutex, RwLock and atomics, and lists anti-patterns such as overusing RefCell or locking inside hot loops. It also points to related skills for smart pointers, concurrency and domain modeling when a conflict persists.
The skill is a single markdown file with no scripts. It assumes a Rust codebase and is written with Chinese trigger terms as well as English ones.
When your agent uses it
CRITICAL: Use for mutability issues. Triggers: E0596, E0499, E0502, cannot borrow as mutable, already borrowed as immutable, mut, &mut, interior mutability, Cell, RefCell, Mutex, RwLock, 可变性, 内部可变性, 借用冲突
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (4 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/m03-mutability to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/m03-mutability &&
cp -R "$tmp/.claude/skills/m03-mutability" ~/.claude/skills/m03-mutability &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/m03-mutability inside it instead.
Copy the skill folder to ~/.agents/skills/m03-mutability to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/m03-mutability &&
cp -R "$tmp/.claude/skills/m03-mutability" ~/.agents/skills/m03-mutability &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/m03-mutability inside it instead.
Copy the skill folder to ~/.cursor/skills/m03-mutability to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/m03-mutability &&
cp -R "$tmp/.claude/skills/m03-mutability" ~/.cursor/skills/m03-mutability &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/m03-mutability inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/m03-mutabilityOr copy the folder to ~/.gemini/skills/m03-mutability yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/m03-mutability:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/m03-mutability &&
cp -R "$tmp/.claude/skills/m03-mutability" ~/.copilot/skills/m03-mutability &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/m03-mutability inside it instead.
Get the folder:
git clone --depth 1 https://github.com/k1-c/linear-tui.gitThen copy linear-tui/.claude/skills/m03-mutability into your agent's skills folder as m03-mutability. Agents that support SKILL.md read one folder per skill.
What it does
- Borrow error triage
- Maps E0596, E0499 and E0502 to the design questions worth asking before changing code.
- Interior mutability selection
- Chooses among Cell, RefCell, Mutex, RwLock and atomic types based on Copy-ness and thread context.
- Single versus multi-thread guidance
- Separates single-threaded shared state from synchronized mutation across threads.
- Anti-pattern checklist
- Flags habits such as RefCell everywhere, unnecessary Mutex use and locks inside hot loops.
- Escalation pointers
- Directs persistent conflicts to data structure, concurrency or smart pointer guidance.
Good for
- Fix an E0502 error where a mutable borrow overlaps an immutable one
- Decide whether a struct field should use Cell, RefCell or Mutex
- Review Rust code for unnecessary interior mutability
- Resolve a RefCell already-borrowed runtime panic
- Add shared mutable state to a multi-threaded Rust program
M03 mutability FAQ
When does M03 mutability trigger?
It is meant for mutability issues and is triggered by terms such as E0596, E0499, E0502, borrow conflicts, mut, &mut, interior mutability, Cell, RefCell, Mutex and RwLock.
Does M03 mutability run any scripts or need extra tools?
No scripts are included and no allowed tools are set. It is a single SKILL.md file.
Does M03 mutability change the code automatically?
It provides guidance for the agent to follow. It does not include code that edits files on its own.
How do I install M03 mutability in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/m03-mutability to use it in all your projects, or to .claude/skills/m03-mutability in one project.
Does M03 mutability run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use M03 mutability?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to M03 mutability?
The closest alternatives to M03 mutability are M01 ownership, M06 error handling, M02 resource, M04 zero cost and M07 concurrency.
Where this comes from
- Description: from the skill's own SKILL.md.
More from k1-c/linear-tui

Gives the agent a quick reference of Rust-specific naming, error handling and async rules
- Open source
- 21 GitHub stars
- Developer tools

Guides the agent to write Conventional Commits, splitting mixed changes into several
- Open source
- 21 GitHub stars
- Developer tools

Guides an agent through building Rust command-line tools with clap, config layers
- Open source
- 21 GitHub stars
- Developer tools

Guides the agent through Rust ownership, borrow and lifetime compiler errors
- Open source
- 21 GitHub stars
- Developer tools

Guides an agent in choosing Rust smart pointers like Box, Rc, Arc, Weak and RefCell
- Open source
- 21 GitHub stars
- Developer tools

Guides Claude through generics, traits, static vs dynamic dispatch and related Rust
- Open source
- 21 GitHub stars
- Developer tools

