Skip to content
Back to skills

Exec Rust

ASecurity

Rust execution idioms to embed into Codex prompts when the target project is Rust — ownership discipline, error handling with Result, and idiomatic API design.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
ai-agentsrustgoapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 20, 2026

npx -y skills add anhnguyen0905/codex-mcp --skill exec-rust --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Exec Rust?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Exec Rust
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anhnguyen0905-exec-rust/badge)](https://www.skillsdirectory.com/skills/anhnguyen0905-exec-rust)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: exec-rust
description: Rust execution idioms to embed into Codex prompts when the target project is Rust — ownership discipline, error handling with Result, and idiomatic API design.
---

# Rust Idioms (embed when project is Rust)

```
Rust standards:
- Errors: return Result<T, E> for fallible functions; no unwrap()/expect()/panic! in library code
  (reserve panic for truly unrecoverable invariants). Propagate with ?; model domain errors with
  an enum (thiserror if present), wrap sources with context (anyhow only at bin/top level).
- Ownership: borrow (&T/&mut T) over cloning; clone only when a clear owner is needed. No needless
  .to_owned()/.clone() to appease the borrow checker — restructure instead.
- Prefer iterators/combinators (map/filter/collect) over index loops; use ? and Option combinators
  (map/and_then/ok_or) instead of manual match when clearer.
- Types: newtypes over primitive obsession; derive(Debug, Clone, PartialEq) where sensible; make
  illegal states unrepresentable with enums. Accept impl Trait / generics, expose concrete types.
- Concurrency: prefer message passing or the project's async runtime (tokio/async-std) consistently;
  Send/Sync only where needed; no blocking calls inside async without spawn_blocking.
- No unsafe unless unavoidable — if used, isolate it, document the invariant it upholds, and justify.
- Follow rustfmt (non-negotiable) and clippy if configured; match the repo's module layout.
- Tests: #[cfg(test)] mod tests with #[test]; table cases via loops or rstest if present; assert
  behavior, not internals; use the repo's assertion style.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.