agentleFS
talayashtalayash/agentrium/.claude/skills/rust-patterns/SKILL.md

rust-patterns

Skill42 starsChanged 3 months agoMITView on GitHub

Rust/Tauri patterns and best practices for Agentrium backend

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use kotlin-testing, carrier-relationship-management and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • tpavanipradeepSkill

    kotlin-testing

    Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

    Also in 4 projects that use this

  • InfopibeSkill

    carrier-relationship-management

    Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.

    Also in 5 projects that use this

  • InfopibeSkill

    ralphinho-rfc-pipeline

    RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.

    Also in 5 projects that use this

  • mryeastcodeSkill

    santa-method

    Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.

    Also in 4 projects that use this

  • tpavanipradeepSkill

    bun-runtime

    Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

    Also in 5 projects that use this

  • saxon-ySkill

    configure-ecc

    Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

    Also in 5 projects that use this

  • +1 more from Infopibe
  • +1 more from tpavanipradeep

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never .unwrap() in production - use ?

    line 10
  2. Very specific:

    Use anyhow for internal errors, convert to String at IPC boundary

    line 11
  3. Very specific:

    Never hold a Mutex lock across .await points

    line 15
  4. Very specific:

    All commands are async with #[tauri::command]

    line 19
  5. Very specific:

    Use CREATE_NO_WINDOW flag on process spawns

    line 25
  6. Distinctive:

    Test path handling with backslashes

    line 26
  7. Distinctive:

    Always clean up resources even on error paths

    line 31

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.