# M01 ownership

> M01 ownership is an open-source agent skill for developer tools. Guides the agent through Rust ownership, borrow and lifetime compiler errors. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/k1-c/linear-tui/tree/main/.claude/skills/m01-ownership
- **Repository:** https://github.com/k1-c/linear-tui
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** m01-ownership
- **Collection:** https://github.com/k1-c/linear-tui
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an AI coding agent diagnose and resolve Rust ownership, borrowing and lifetime problems. It maps common compiler error codes such as E0382, E0597, E0506, E0507, E0515, E0716 and E0106 to the underlying design question, so the agent weighs whether data should be owned, shared or borrowed before reaching for a clone or an extra annotation.

The workflow starts by asking what role the data plays and whether its ownership is intentional. If a fix fails repeatedly, the skill points the agent toward related design areas such as smart pointers, interior mutability or domain modelling. It also includes a quick reference of ownership patterns with their costs, plus anti-patterns such as cloning everywhere or overusing 'static.

The skill is written as reference guidance rather than executable tooling; it includes no scripts. It is intended for Rust projects, and it is not user-invocable directly, so the agent loads it when a matching error or term appears.

## When your agent uses it

> CRITICAL: Use for ownership/borrow/lifetime issues. Triggers: E0382, E0597, E0506, E0507, E0515, E0716, E0106, value moved, borrowed value does not live long enough, cannot move out of, use of moved value, ownership, borrow, lifetime, 'a, 'static, move, clone, Copy, 所有权, 借用, 生命周期

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/m01-ownership)
- [License: MIT](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/m01-ownership)

## Features

- **Error code mapping:** Links Rust borrow checker error codes to the design question behind each one.
- **Ownership design prompts:** Asks whether data is an entity, value object or temporary before choosing a fix.
- **Pattern cost reference:** Compares move, borrow, clone, Rc, Arc and Cow by ownership model and cost.
- **Escalation paths:** Suggests related skills to consult when the same error keeps recurring.
- **Anti-pattern warnings:** Flags habits such as blanket cloning, Box::leak and overusing 'static.

## Good for

- Fix a 'value moved' error in a Rust function
- Resolve 'borrowed value does not live long enough' in a struct
- Add correct lifetime annotations to a function returning a reference
- Decide whether to share data with Rc or Arc
- Work out why a value cannot be moved out of a borrow

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/m01-ownership` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/m01-ownership &&
cp -R "$tmp/.claude/skills/m01-ownership" ~/.claude/skills/m01-ownership &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/m01-ownership` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/m01-ownership` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/m01-ownership &&
cp -R "$tmp/.claude/skills/m01-ownership" ~/.agents/skills/m01-ownership &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/m01-ownership` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/m01-ownership` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/m01-ownership &&
cp -R "$tmp/.claude/skills/m01-ownership" ~/.cursor/skills/m01-ownership &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/m01-ownership` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/m01-ownership
```

Or copy the folder to `~/.gemini/skills/m01-ownership` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/m01-ownership`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/m01-ownership &&
cp -R "$tmp/.claude/skills/m01-ownership" ~/.copilot/skills/m01-ownership &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/m01-ownership` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/k1-c/linear-tui.git
```

Then copy `linear-tui/.claude/skills/m01-ownership` into your agent's skills folder as `m01-ownership`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does M01 ownership trigger?

It is meant for ownership, borrow and lifetime issues, and triggers on the listed error codes and phrases such as value moved, use of moved value, lifetime and clone.

### Does M01 ownership run any scripts or need extra tools?

No scripts are included and no allowed tools are set in the skill.

### Which languages does M01 ownership cover?

It targets Rust ownership and borrow checker errors.

### Can I invoke M01 ownership directly?

No, the skill is marked as not user-invocable, so the agent loads it automatically when a task matches.

### How do I install M01 ownership in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/m01-ownership to use it in all your projects, or to .claude/skills/m01-ownership in one project.

### Does M01 ownership 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 M01 ownership?

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 M01 ownership?

The closest alternatives to M01 ownership are M14 mental model, M03 mutability, M09 domain, M02 resource and M15 anti pattern.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [M14 mental model](https://ai-powered.com/skills/m14-mental-model): M14 mental model is an open-source agent skill for knowledge and memory.
- [M03 mutability](https://ai-powered.com/skills/m03-mutability): M03 mutability is an open-source agent skill for developer tools.
- [M09 domain](https://ai-powered.com/skills/m09-domain): M09 domain is an open-source agent skill for developer tools.
- [M02 resource](https://ai-powered.com/skills/m02-resource): M02 resource is an open-source agent skill for developer tools.
- [M15 anti pattern](https://ai-powered.com/skills/m15-anti-pattern): M15 anti pattern is an open-source agent skill for developer tools.
- [M11 ecosystem](https://ai-powered.com/skills/m11-ecosystem): M11 ecosystem is an open-source agent skill for developer tools.
- [M06 error handling](https://ai-powered.com/skills/m06-error-handling): M06 error handling is an open-source agent skill for developer tools.
- [M04 zero cost](https://ai-powered.com/skills/m04-zero-cost): M04 zero cost is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/m01-ownership
