agentrium: Skill for Claude Code

.claude/skills/rust-patterns/SKILL.md

rust-patterns is a skill for Claude Code from talayash/agentrium. It costs 15 tokens per session (274 once invoked), scanned A, original, MIT.

A set of recommended Rust and Tauri coding patterns for ClaudeTerminal. Tauri is a framework for desktop apps with web-based screens and a Rust backend.

In plain words
What is it for?
Use it when building or reviewing Tauri commands, Rust error handling, shared application state, Windows support, and pseudo-terminal lifecycles.
Why use it?
It helps avoid common problems with errors, shared data, asynchronous tasks, Windows commands, and terminal-process cleanup.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is talayash/agentrium's own configuration. It tells Claude Code how to work on agentrium itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentrium configures →

Reuse

Borrowing it

Nothing to install: this file belongs to talayash/agentrium. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/talayash/agentrium/master/.claude/skills/rust-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

Made for: Claude Code.

Wrote 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.

agentmods badge for rust-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/talayash/agentrium/rust-patterns/github.svg)](https://agentmods.dev/skills/talayash/agentrium/rust-patterns)
Your own site
<a href="https://agentmods.dev/skills/talayash/agentrium/rust-patterns"><img src="https://agentmods.dev/badge/skills/talayash/agentrium/rust-patterns/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.

agentmods 80×15 button for rust-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/talayash/agentrium/rust-patterns"><img src="https://agentmods.dev/badge/skills/talayash/agentrium/rust-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 274 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00274
Opus 5.5 $0.00006 $0.00110
Sonnet 5.5 $0.00003 $0.00055
Haiku 4.5 $0.00002 $0.00027

Measured 1mo ago against content hash c1159336c747, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-patterns 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 1mo 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.

.claude/skills/rust-patterns/SKILL.md · 32 lines

What it actually says

Rust Patterns for Agentrium

Error Handling

  • Commands return Result<T, String> - use .map_err(|e| e.to_string())
  • Never .unwrap() in production - use ? operator
  • Use anyhow for internal errors, convert to String at IPC boundary

Thread Safety

  • AppState uses Arc<Mutex<T>> - lock, use, drop quickly
  • Never hold a Mutex lock across .await points
  • PTY reader threads use mpsc::channel to communicate with Tokio tasks

Tauri Commands

  • All commands are async with #[tauri::command]
  • Access state via tauri::State<'_, AppState>
  • Register every command in main.rs invoke_handler

Windows Specifics

  • Wrap shell commands with cmd /C
  • Use CREATE_NO_WINDOW flag on process spawns
  • Test path handling with backslashes

PTY Lifecycle

  • Spawn → reader thread → mpsc channel → Tokio task → emit events
  • On close: signal reader thread, join, close channel, emit terminal-finished
  • Always clean up resources even on error paths
Changes

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.

  1. 1mo ago Changed c1159336c747
  2. 1mo ago First seen · 32 lines · 15 tokens per session scan A 4c469d715072

Subscribe to this mod's changes

rust-patterns is a skill published in the GitHub repository talayash/agentrium (46 stars, last pushed 2d ago), licensed MIT. It adds 15 tokens to every session and 274 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

python-project

Modern Python project architecture guide for 2025. Use when creating Python projects (APIs, CLI, data pipelines). Covers uv, Ruff, Pydantic, FastAPI, and async patterns.

majiayu000/spellbook · 43 tokens

agent-creator

Create custom AI subagents with proper plugin structure, persona generation, and companion routing skills.

ranbot-ai/awesome-skills · 22 tokens

nette-configuration

Invoke before configuring Nette DI – services, .neon files, autowiring. Provides service registration, autowiring, auto-discovery, factory and setup methods, parameter usage, decorator section, and framework configuration. Also trigger for resolving autowiring issues or organizing config files.

nette/claude-code · 63 tokens

nette-schema

Provides Nette Schema for data validation and normalization. Use when validating configuration, API inputs, or any data structures with Expect class. Covers Expect::structure(), Expect::from(), anyOf, arrayOf, listOf, assert, transform, castTo, otherItems, and Processor. This is about nette/schema – not Nette Forms…

nette/claude-code · 89 tokens

dynamo-analyzer

Analyze Dynamo (.dyn) graphs to extract workflow, Python/DesignScript code, Revit API patterns, and generate comprehensive reports for C# developers.

sonomirco/agents-and-commands · 34 tokens

alembic-migrations

Production-safe Alembic migration workflows for SQLAlchemy 2.x projects. Use this skill when adding Alembic, generating migrations, reviewing autogenerate diffs, fixing broken migrations, or establishing a safe schema evolution workflow in a Python backend.

robhowley/py-pit-skills · 56 tokens