Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rewrite-rs/skills --skill ownership-not-clonegit clone --depth 1 https://github.com/rewrite-rs/skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rewrite-rs/skills/ownership-not-clone)<a href="https://agentmods.dev/skills/rewrite-rs/skills/ownership-not-clone"><img src="https://agentmods.dev/badge/skills/rewrite-rs/skills/ownership-not-clone/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rewrite-rs/skills/ownership-not-clone"><img src="https://agentmods.dev/badge/skills/rewrite-rs/skills/ownership-not-clone.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00089 | $0.01137 |
| Opus 5 | $0.00044 | $0.00568 |
| Sonnet 5 | $0.00018 | $0.00227 |
| Haiku 4.5 | $0.00009 | $0.00114 |
Grade A, and why
ownership-not-clone scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ownership, Not Clone
The borrow checker is a map of where ownership is being fudged, not an obstacle to route around. This skill decides who holds a value and for how long.
The rule
Every clone must be explainable in one sentence that is not "the borrow checker
complained." A clone that buys a real thing — a value that must outlive the borrow
— is fine; one that only silences an error is a deferred design decision.
Read the error, not the workaround
E0502 (a mutable borrow while an immutable one is still live) and E0499 (two
mutable borrows of the same place) name a lifetime conflict; the fix is in the
structure the error describes, not in the clone that silences it:
// No clone: `first` is Copy, so the borrow ends at the let.
let first = items[0];
for _ in 0..n {
items.push(first);
}
Borrow splitting
The borrow checker tracks a whole value through method calls, but fields
individually through direct field access. A &mut self method that also needs
self.other_field is the classic false conflict — destructure once:
// The two fields are separate lets and borrow independently.
impl Server {
fn handle(&mut self) {
let Self { connections, log, .. } = self;
for conn in connections.iter_mut() {
log.record(conn.id());
}
}
}
split_at_mut hands back two disjoint &mut halves of one slice; when
destructuring is not enough, extract a free function that takes the two fields.
Take the cheapest thing that works, in argument position
&str over &String, &[T] over &Vec<T>, impl AsRef<Path> over a PathBuf
for a path a function only reads. A signature that takes String when it only
reads forces every caller into a clone — the bug is in the signature.
// Forces a clone at every call site that holds a &str.
fn log_message(message: String) { ... }
// Reads only — callers pass a reference and copy nothing.
fn log_message(message: &str) { ... }
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 125 lines · 89 tokens per session scan A 09c86088d389
ownership-not-clone is a skill published in the GitHub repository rewrite-rs/skills (2 stars, last pushed 25d ago), licensed BSD-3-Clause. It adds 89 tokens to every session and 1,137 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
polars
High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.
rust-engineer
Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions. Implements ownership patterns, manages lifetimes, designs trait hierarchies, builds async applications with tokio, and structures error handling with Result/Option. Use when building Rust applications, solving ownership or…
rust-crate-ci
Load before editing any Rust crate in this repo (currently runners/swarm-sandbox-runner). Covers the mandatory local validation gate, common rustfmt/clippy pitfalls, and Windows-specific Rust correctness patterns that CI enforces but are hard to catch locally without a Windows toolchain.
solana-development
Build, test, deploy, and audit Solana programs with Anchor or native Rust, plus ZK Compression (Light Protocol). Use for Solana contracts, token operations, compute optimization, deployment, program audits, or compressed tokens and PDAs.
rust-skills
Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions, serde, pattern matching, macros…
pinocchio-development
Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework. Covers account validation, CPI patterns, optimization techniques, and migration from Anchor.