OpenAI Codex Rust coding patterns distilled from the codex-rs workspace. Use this skill whenever writing, reviewing, or refactoring Rust code — especially for async agents, CLI tools, sandboxing, secret handling, Ratatui TUIs, JSON-RPC protocols, tokio-based services, or any codebase that needs defensive panic discipline. Trigger even when the user does not explicitly mention Codex, because the patterns generalize to any production Rust workspace. Covers async cancellation, error enum design, process sandboxing, DNS-rebinding defense, credential hardening (zeroize/mlock/ctor), Cargo workspace architecture, wiremock-based fakes, insta snapshot testing, OpenTelemetry tracing, and Ratatui rendering.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
OpenAI Codex Rust coding patterns distilled from the codex-rs workspace. Use this skill whenever writing, reviewing, or refactoring Rust code — especially for async agents, CLI tools, sandboxing, secret handling, Ratatui TUIs, JSON-RPC protocols, tokio-based services, or any codebase that needs defensive panic discipline. Trigger even when the user does not explicitly mention Codex, because the patterns generalize to any production Rust workspace. Covers async cancellation, error enum design, process sandboxing, DNS-rebinding defense, credential hardening (zeroize/mlock/ctor), Cargo workspace architecture, wiremock-based fakes, insta snapshot testing, OpenTelemetry tracing, and Ratatui rendering.
OpenAI Codex Rust Best Practices
Distilled from openai/codexcodex-rs/ — a 119-crate, 2,008-file Rust workspace that ships the Codex CLI coding agent. Contains 63 rules across 11 categories, each citing the exact file in codex-rs where the pattern lives, so you can write Rust the way its top contributors (Michael Bolin, jif-oai, Ahmed Ibrahim, Eric Traut, Pavel Krymets) actually ship it. Citations were refreshed against main at commit 8a94430 (2026-05-25).
When to Apply
Reference these guidelines when:
Writing or reviewing async Rust code that spawns tokio tasks, owns cancellation tokens, or manages long-lived background workers.
Designing error enums, Result flows, retry loops, or layer boundaries in a library or service.
Building a CLI tool that spawns subprocesses, enforces sandboxing, or runs LLM-generated code safely.
Architecting a Cargo workspace with more than ~5 crates, deciding what to split out, and how to manage shared dependencies.
Adding tests to a Rust codebase where existing tests are inline mod tests { ... } blocks and scaling is becoming painful.
Implementing a JSON-RPC or custom wire protocol with serde — especially one that must evolve without breaking clients.
Reading API keys or other secrets into memory, or hardening a binary that handles credentials against core dumps, debugger attach, and LD_PRELOAD.
Enforcing a network egress allowlist that must survive DNS rebinding, or loading untrusted plugins/extensions.
Wiring OpenTelemetry traces, logs, or metrics into a service that has privacy constraints around PII.
Building a Ratatui-based TUI that streams LLM output, handles paste bursts, or manages raw-mode terminal state.
Any time you find yourself reaching for .unwrap(), .lock().unwrap(), anyhow::Result<()>, or #[cfg(feature = "test")] — this skill explains what codex does instead.