원클릭으로
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).