AGENT SKILL

rust-protocol

Engineer and review binary protocols, wire formats, builders, encoders, parsers, framing, stateful messages, bit ordering, integrity, correction, malformed input, and conformance. Use for protocol or serializer code. Do not apply protocol rules to unrelated in-memory models.

License 许可
Apache-2.0
所属仓库
RawSocketLabs/rsl
最近更新
2026-11-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
rust-protocol
description
Engineer and review binary protocols, wire formats, builders, encoders, parsers, framing, stateful messages, bit ordering, integrity, correction, malformed input, and conformance. Use for protocol or serializer code. Do not apply protocol rules to unrelated in-memory models.

02 资源文件 3

03 SKILL.md 正文

Engineer Rust Protocols

Establish authority and vocabulary

  1. Read $rust-core, the exact specification revision and errata, repository glossary, adopted codec conventions, existing vectors, and interoperability targets.
  2. State bit numbering, byte order, wire order, host representation, field widths, reserved behavior, and the meanings of bit, symbol, dibit, octet, field, frame, and message.
  3. Read protocol invariants for validation, evidence, partial input, correction, and resource budgets. Read wire and conformance for representation, framing, state machines, encoding, and test obligations.

Implement in layers

Keep transport buffering, frame detection, raw wire types, structural parsing, integrity, correction, semantic types, and application trust distinguishable. Start with a readable specification-shaped reference implementation. Add zero-copy, buffer reuse, SIMD, or unsafe optimization only through $rust-performance and $rust-unsafe-ffi with preserved reference evidence.

Route API design to $rust-api-design, testing/property/fuzz work to $rust-testing, signal-processing stages to $rust-dsp, and concurrency around stream delivery to $rust-async-concurrency.

Verify

Use specification-derived known-answer vectors, individual-bit and cross-byte tests, malformed and truncated cases, reserved and unknown values, resource boundaries, state transitions, independent encoder and decoder evidence, properties, fuzzing, and cross-implementation tests where available. Encode/decode round trips alone are insufficient because paired inverse defects can cancel.

Output

Record authority, vocabulary, representation, validation and resource policy, malformed-input behavior, evidence, deviations, and measured optimizations.

04 同仓库更多 Skills

RawSocketLabs
RawSocketLabs/rsl

rust-unsafe-ffi

Design and review unsafe Rust, safe wrappers, manual Send or Sync, ABI boundaries, foreign ownership, callbacks, and FFI build integration. Use whenever unsafe code or a foreign interface is introduced, changed, or relied upon. Do not use unsafe merely to bypass borrow checking or for unmeasured optimization.

★ 2
RawSocketLabs
RawSocketLabs/rsl

rust-testing

Select, implement, and assess Rust unit, integration, documentation, property, fuzz, snapshot, concurrency, unsafe, protocol, benchmark, and verification evidence. Use whenever behavior changes or claims need proof. Do not run every tool mechanically when the repository or risk makes it inapplicable.

★ 2
RawSocketLabs
RawSocketLabs/rsl

rust-skill-maintenance

Maintain this modular Rust skills system, including canonical content, manifests, references, profiles, generated adapters, migrations, examples, evaluations, releases, and compatibility. Use when changing the skills repository itself. Do not hand-edit generated adapters.

★ 2
RawSocketLabs
RawSocketLabs/rsl

rust-review

Review Rust diffs, commits, branches, and designs for actionable correctness, soundness, security, compatibility, concurrency, protocol, performance, testing, and maintainability risks. Use for review or pre-merge assessment. Do not modify code unless separately requested.

★ 2
RawSocketLabs
RawSocketLabs/rsl

rust-repository-onboarding

Inspect, interview, profile, configure, and install the modular Rust engineering skills into a repository. Use when adopting or refreshing these skills, generating repository-specific Rust rules, or creating validation workflows. Never finalize policy before repository inspection and user approval.

★ 2
RawSocketLabs
RawSocketLabs/rsl

rust-protocol

Engineer and review binary protocols, wire formats, builders, encoders, parsers, framing, stateful messages, bit ordering, integrity, correction, malformed input, and conformance. Use for protocol or serializer code. Do not apply protocol rules to unrelated in-memory models.

★ 2