M02 Resource
This skill retrieves and manages resources (like files & links) for your project, streamlining workflow and ensuring easy access to necessary assets.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add actionbook-m02-resource npx -- -y @trustedskills/actionbook-m02-resource
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"actionbook-m02-resource": {
"command": "npx",
"args": [
"-y",
"@trustedskills/actionbook-m02-resource"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The M02 Resource skill assists with managing resources, specifically focusing on choosing appropriate smart pointers in Rust code. It guides users through a decision-making process to determine the correct ownership pattern and thread safety requirements for data structures, helping prevent common errors like memory leaks or runtime panics. This skill doesn't directly manage files or links; it helps developers select the right tools (smart pointers) for managing those resources within their code.
When to use it
- When deciding between
Box,Rc,Arc, andWeaksmart pointers in Rust. - To troubleshoot memory management issues like potential reference cycles or unexpected panics.
- When needing to determine if shared ownership is required, and whether multi-threading needs to be supported.
- For understanding the implications of interior mutability using
CellorRefCell.
Key capabilities
- Provides guidance on choosing smart pointers based on ownership (single vs. shared) and thread safety requirements.
- Offers a decision flowchart for selecting appropriate pointer types (
Box,Rc,Arc,Weak,Cell,RefCell). - Suggests solutions to common errors related to memory management and interior mutability.
- References other skills (m07-concurrency, m03-mutability, m12-lifecycle) for deeper dives into specific areas.
Example prompts
- "I need a single owner heap data structure – what should I use?"
- "How do I avoid memory leaks when using shared ownership?"
- "What's the difference between
RcandArc, and when should I use each?"
Tips & gotchas
- This skill focuses on smart pointer selection in Rust, not general resource management.
- Understanding Rust’s ownership model is crucial for effectively using this skill.
- Consider the concurrency model (single-threaded vs. multi-threaded) as it significantly impacts the choice of smart pointers.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.