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 agentmods add skills/cosmix/loom/loom-rustnpx skills add cosmix/loom --skill loom-rustgit clone --depth 1 https://github.com/cosmix/loomWrote 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/cosmix/loom/loom-rust)<a href="https://agentmods.dev/skills/cosmix/loom/loom-rust"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-rust.svg" alt="Measured on agentmods" 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 | $0.00015 | $0.08195 |
| Opus 5 | $0.00008 | $0.04097 |
| Sonnet 5 | $0.00003 | $0.01639 |
| Haiku 4.5 | $0.00002 | $0.00819 |
Grade A, and why
loom-rust scanned grade A with 1 finding 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 today.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
for url in urls { set.spawn(fetch(url)); } How it starts
The opening of the file, as written. The whole thing — 532 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Language Expertise
Overview
Idiomatic, production-quality Rust for an engineer who already knows ownership/borrowing. This skill is decision rules, gotchas, and the traps that cost hours: async/Send correctness, error-handling architecture, serde pitfalls, and edition-2024 features. Assumes the borrow checker itself is not the problem — using it well is.
Error Handling: anyhow vs thiserror
The decision rule: will a caller ever match on the error to recover? → thiserror (concrete, matchable enum). Does the error only bubble up to be logged/reported? → anyhow (type-erased, context chains). Never put anyhow::Error in a library's public API — it erases the type and denies callers any recovery. Libraries expose thiserror enums; binaries/apps consume with anyhow.
// Library boundary: thiserror. Each variant = a distinct, matchable failure mode.
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ParseError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error), // #[from] gives `?` conversion for free
#[error("invalid syntax at {line}:{column}: {message}")]
Syntax { line: usize, column: usize, message: String },
#[error("unexpected token: expected {expected}, found {found}")]
Unexpected { expected: String, found: String },
}
// Application code: anyhow. `?` unifies heterogeneous errors; .context adds a chain.
use anyhow::{Context, Result, bail, ensure};
fn load_config(path: &str) -> Result<Config> {
let content = std::fs::read_to_string(path)
.with_context(|| format!("reading config: {path}"))?; // with_context: lazy, use for allocating msgs
let config: Config = toml::from_str(&content).context("parsing config TOML")?; // context: eager literal
ensure!(!config.name.is_empty(), "config name cannot be empty"); // returns Err on false
if config.port == 0 { bail!("port must be non-zero"); } // early return with Err
Ok(config)
}
context(eager, takes a value) vswith_context(|| ...)(lazy closure) — usewith_contextwhenever the message allocates (format!), else you pay the cost on the success path too.#[from]generatesFromfor?;#[error(transparent)]forwardsDisplay/sourceto the inner error (use for a pass-through variant).- Option→Result:
.ok_or_else(|| Error::NotFound(id.to_string()))?. Preferok_or_else(lazy) overok_orwhen the error allocates. - Collecting:
iter.map(f).collect::<Result<Vec<_>>>()stops at the firstErr; collect intoVec<Result<_>>to keep all outcomes. thiserror2.0: must be a direct dependency (not transitive); format strings dropped raw-identifier support ({type}, not{r#type}); field trait bounds no longer inferred when shadowed by a format arg. New:no_stdviadefault-features = false, out-of-line#[error(fmt = path)], per-variant#[error(transparent)]. Pinthiserror = "2".
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.
- today Changed · -43 tokens per session 9f23c563db39
- 4d ago First seen · 532 lines · 58 tokens per session scan A c61aee688519
loom-rust is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 8,195 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
hardcoded-secret
A bundle that leaks a real credential. This must never publish.
code-review
Perform thorough code reviews focusing on correctness, security, and maintainability.
checkpointed-workflow
Use when the user asks to assemble and validate a checkpointed report bundle.
deterministic-transform
Use when the user asks to transform a JSON data file deterministically.
document-formatter
Use when the user asks to format a document against the house style guide.
dangerous-skill
Example skill that demonstrates security scanner detection.