m01-ownership — Claude Code skill: what it does, how to install
Guides AI agents through Rust ownership and lifetime errors without spraying .clone() calls across the codebase.
npx skills add actionbook/rust-skills --skill m01-ownership -a claude-codeWhat m01-ownership does
The skill instructs coding agents on handling Rust borrow checker failures such as E0382, E0597, or E0506. Rather than slapping .clone() on every moved variable or pinning 'static everywhere, the agent investigates who should hold the data. It analyzes scope boundaries and reference lifetimes first.
Its internal prompt framework maps compiler diagnostic codes directly to architectural questions. It distinguishes between data entities with dedicated identities, interchangeable value objects, and temporary values. If three consecutive fixes fail, the skill directs the agent to rethink data ownership instead of repeating compiler workarounds.
Scattering .clone() across functions masks architectural flaws and adds heap allocations. This skill forces the assistant to respect Rust borrow semantics before touching memory buffers.
What it helps with
- resolve
E0382moved value errors without wasteful heap cloning - fix lifetime scope mismatches like
E0597andE0515 - determine when to switch from references to
ArcorRc - redesign structs and function signatures instead of fighting the borrow checker
Example prompts for the agent
- I got error E0382 on this line, help me fix ownership without cloning
- Why does this reference fail with E0597 here?
- Review this function signature to resolve borrowed value does not live long enough
How to install m01-ownership
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m01-ownership -a claude-code2Manually: put the files in place
~/.claude/skills/m01-ownership/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/m01-ownership/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m01-ownership -a codex2Manually: put the files in place
.agents/skills/m01-ownership/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m01-ownership -a cursor2Manually: put the files in place
.cursor/skills/m01-ownership/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills m01-ownership2Manually: put the files in place
.github/skills/m01-ownership/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m01-ownership -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/m01-ownershipManually: put the files in place
.devin/skills/m01-ownership/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m01-ownership -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about m01-ownership
How to install m01-ownership in Claude Code?
Run npx skills add actionbook/rust-skills --skill m01-ownership -a claude-code. The rule file will be placed in ~/.claude/skills/m01-ownership/SKILL.md.
What does m01-ownership do?
It guides AI assistants in diagnosing Rust ownership, borrow checker, and lifetime errors systematically. The assistant focuses on data responsibilities rather than inserting temporary hacks.
Can m01-ownership be invoked manually?
The skill marks user-invocable: false, meaning it activates automatically whenever error codes like E0382 or lifetime terms appear in the conversation.