rust-network-module

A Rust code-scaffolding guide for asynchronous network modules in the nat464-sidecar project. It covers components such as listeners, protocol handlers, proxies, resolvers, and HTTP servers.

In plain words
What is it for?
It is for adding TCP or UDP listeners, protocol handlers, relays, proxies, DNS resolvers, connection racers, and Hyper-based HTTP endpoints.
Why use it?
It helps new networking code follow the project's existing file structure, naming, and implementation patterns.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fakoli/fakoli-plugins/rust-network-module
Any agent
npx skills add fakoli/fakoli-plugins --skill rust-network-module
Clone the repo
git clone --depth 1 https://github.com/fakoli/fakoli-plugins

Made for: Claude Code, Codex.

Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.00777
Opus 5 $0.00039 $0.00388
Sonnet 5 $0.00016 $0.00155
Haiku 4.5 $0.00008 $0.00078

Measured 2d ago against content hash daaf0aeceb01, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-network-module scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

archive/rust-network-module/skills/rust-network-module/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust Network Module Scaffolding

Scaffold new async networking modules following nat464-sidecar's established patterns.

Workflow

1. Determine Module Type

Type Pattern Example
Listener Accept connections, spawn handler tasks proxy/inbound.rs
Protocol handler Parse/serialize protocol messages socks5/handshake.rs
Relay/proxy Bidirectional byte forwarding between streams proxy/copy.rs, socks5/relay.rs
Resolver/racer DNS resolution, connection racing happy_eyeballs/resolver.rs, racer.rs
HTTP server Hyper-based HTTP endpoint health.rs

2. Create Module Files

Every module is a directory under src/ with mod.rs + implementation files.

src/<module_name>/
├── mod.rs           # Re-exports, shared types/constants
├── <primary>.rs     # Main logic
└── (optional).rs    # Additional files as needed

Register in parent: add pub mod <module_name>; to src/main.rs or parent mod.rs.

3. Apply Project Conventions

See references/patterns.md for the full pattern catalog with code templates.

Key conventions:

  • pub async fn run_<name>(port: u16, ...) -> anyhow::Result<()> for server entry points
  • tokio::spawn per connection, errors logged inside spawn (never crash the server)
  • tracing structured fields: debug! per-connection, info! lifecycle, error! failures
  • anyhow::Result everywhere, anyhow::bail! for protocol errors
  • In-module #[cfg(test)] mod tests with test_pair() helper for TCP stream pairs
  • Tests bind to port 0 for random allocation

4. Add to Cargo.toml If Needed

Only add dependencies if the new module requires crates not already in Cargo.toml. Current deps: tokio, clap, tracing, tracing-subscriber, hyper, hyper-util, http-body-util, tokio-util, anyhow, thiserror.

5. Wire Into main.rs

Add the new server to tokio::try_join! in main.rs if it runs as a long-lived server. Add CLI flags to config.rs if the module needs configuration.

Read the full file on GitHub · 73 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 73 lines · 78 tokens per session scan A daaf0aeceb01

Subscribe to this mod's changes

rust-network-module is a skill published in the GitHub repository fakoli/fakoli-plugins (4 stars, last pushed 24d ago), licensed MIT. It adds 78 tokens to every session and 777 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cross-cutting-checklist-generator

Detect when a concern is scattered across many places in a project (config keys, enums, translations, feature flags, API endpoints, doc references) and auto-generate a project-local checklist so that same concern is never partially updated again. Use whenever you add or change something that also exists in several…

Marcel-Bich/marcel-bich-claude-marketplace · 94 tokens

omh-localization-review

This is a Hermes-native localization-review workflow skill.

rlaope/oh-my-hermes · 56 tokens

localization-design

Design for multiple languages, writing directions, and cultural contexts — text expansion, RTL mirroring, and locale formats. Use when shipping beyond one locale. For the words themselves, use ux-writing (designer-toolkit).

Owl-Listener/designer-skills · 49 tokens

deno-knowledge-patch

Use this skill when choosing current Deno runtime APIs, CLI options, configuration, dependency behavior, Node compatibility, or deployment workflows. Open the topic reference before changing a project because several commands, flags, APIs, and defaults changed more than once.

Nevaberry/nevaberry-plugins · 9 tokens

android-sdk-knowledge-patch

Use this skill when updating Android applications, libraries, build logic, or Play delivery settings where recent platform and Android Gradle Plugin behavior can affect compatibility. Check the project's compileSdk, targetSdk, minSdk, AGP, Gradle, JDK, Kotlin, KSP, NDK, and form factors before applying target-gated…

Nevaberry/nevaberry-plugins · 9 tokens

apache-kafka-knowledge-patch

Use this skill when upgrading, configuring, extending, or operating Apache Kafka and its clients, Kafka Streams, Kafka Connect, MirrorMaker, KRaft, share groups, or tiered storage. Inspect the project's actual broker, client, metadata, and Java versions before applying version-dependent advice.

Nevaberry/nevaberry-plugins · 10 tokens