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.
npx skills add twaldin/hone --skill rust-system-callsgit clone --depth 1 https://github.com/twaldin/honeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/twaldin/hone/rust-system-calls)<a href="https://agentmods.dev/skills/twaldin/hone/rust-system-calls"><img src="https://agentmods.dev/badge/skills/twaldin/hone/rust-system-calls/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/twaldin/hone/rust-system-calls"><img src="https://agentmods.dev/badge/skills/twaldin/hone/rust-system-calls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.01111 |
| Opus 5 | $0.00021 | $0.00556 |
| Sonnet 5 | $0.00008 | $0.00222 |
| Haiku 4.5 | $0.00004 | $0.00111 |
Grade A, and why
rust-system-calls 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
System Calls & File I/O in Rust
Use bun_sys instead of std::fs or raw libc for cross-platform syscalls with proper error handling.
bun_sys::File (Preferred)
For most file operations, use the bun_sys::File wrapper. It owns the fd and closes on Drop.
use bun_sys::{File, Fd, O};
let file = File::openat(Fd::cwd(), b"path/to/file", O::RDONLY, 0)?;
let mut buf = vec![0u8; 4096];
let n = file.read_all(&mut buf)?; // loops until EOF or full
// `file` closes on Drop.
Complete Example
use bun_sys::{File, Fd, O};
pub fn write_file(path: &[u8], data: &[u8]) -> Result<(), bun_sys::Error> {
let file = File::openat(Fd::cwd(), path, O::WRONLY | O::CREAT | O::TRUNC, 0o664)?;
file.write_all(data)?;
Ok(())
}
Why bun_sys?
| Aspect | bun_sys | std::fs / libc |
|---|---|---|
| Return Type | Maybe<T> with rich Error |
io::Error (lossy) |
| Windows | Full support with libuv fallback | Incomplete/POSIX-ish |
| Error Info | errno, syscall tag, path, fd | errno only |
| EINTR | Automatic retry | Manual handling |
| Paths | &[u8] (WTF-8 safe) |
&Path (UTF-8 lossy) |
Error Handling with Maybe
bun_sys functions return Maybe<T> = Result<T, bun_sys::Error>. Propagate with ?; convert to a JS exception via bun_sys_jsc::ErrorJsc::to_js:
use bun_sys_jsc::ErrorJsc;
use bun_sys::{File, Fd, O};
let file = match File::openat(Fd::cwd(), path, O::RDONLY, 0) {
Ok(f) => f,
Err(err) => return Ok(err.to_js(global)?),
};
bun_sys::Error carries errno, syscall: Tag, and path: Box<[u8]>. To branch on errno:
match bun_sys::unlink(path) {
Ok(()) => {}
Err(e) if e.errno() == bun_c::ENOENT => {} // already gone
Err(e) => return Err(e),
}
Key Types and Functions
Fd(bun_core::Fd) — cross-platform file descriptor.Fd::cwd(),Fd::stdin()/stdout()/stderr(),fd.close().File::open(path: &ZStr, flags, mode)/File::openat(dir: Fd, path: &[u8], flags, mode)/File::make_open(...)(creates parent dirs) /File::create(dir, path, truncate)file.read(buf)/read_all(buf)/read_to_end()/read_to_end_small()/write(buf)/write_all(buf)bun_sys::open,read,write,pread,pwrite,stat,fstat,lstat,mkdir,unlink,rename,symlink,chmod— free fns overFd- Open flags:
bun_sys::O::RDONLY,O::WRONLY | O::CREAT | O::TRUNC, etc.
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.
- yesterday First seen · 97 lines · 42 tokens per session scan A 3f7ccb3f4c27
rust-system-calls is a skill published in the GitHub repository twaldin/hone (47 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 1,111 once invoked, about $0.0002 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-09-07.
Other skills, from other repositories
rust-check
Run cargo check on the current Rust project to find compile errors.
jupyter-notebook
Iterative Python via live Jupyter kernel (hamelnb).
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
contributor-onboarding
Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.
fleet-manager
Use when managing, triaging, restarting, escalating, or summarizing Codewhale fleet runs and workers.