ワンクリックで
rust-style
Coding conventions for all Istok crates — error handling, panic-free library code, feature gates, and style rules.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Coding conventions for all Istok crates — error handling, panic-free library code, feature gates, and style rules.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
How to write deterministic, harness-based H3 engine tests using MockHarness — no real sockets, no timers, script-driven and byte-exact.
How to scope, implement, and close milestones — vertical slices, DoD checklists, scaffold rules, and sequencing constraints.
Compatibility rules for keeping istok-core and istok-transport free of std — allowed crates, feature gates, and forbidden patterns.
| name | Rust Style |
| description | Coding conventions for all Istok crates — error handling, panic-free library code, feature gates, and style rules. |
| applies_to | ["claude","codex"] |
| triggers | ["any code edit","new module","new crate","PR review"] |
Enforces Istok's Rust coding conventions across all crates to keep the codebase
consistent, no_std-compatible where required, and free of hidden panics.
unwrap(), expect(), or panic!() in library code. Tests and examples are the only exception.anyhow or thiserror in library crates. Use explicit error enums.Box<dyn Error> in public API.// Good — explicit enum, returned from fn
pub enum FrameError {
UnexpectedFrame,
VarintOverflow,
}
// Bad — opaque, loses information at boundaries
fn parse(buf: &[u8]) -> Result<Frame, Box<dyn std::error::Error>> { … }
std feature gates any module that uses std::.alloc feature gates heap usage so no_std targets can opt in.istok-io-tokio — never bleed into istok-core or istok-transport.match over chains of if let for exhaustiveness checking.Debug on all public types; derive PartialEq when it's meaningful for tests.impl blocks ordered: pub fn → pub(crate) fn → fn.unwrap() as "this can't fail" — it can, under adversarial input.Error variants that swallow context (Io(std::io::Error) is fine; Other(String) is not).