cargo-toml-optimization

cargo-toml-optimization is a skill for Claude Code from uwuclxdy/agenticat. It costs 31 tokens per session (2,264 once invoked), scanned A, original, MIT.

A guide for tuning Rust project settings in Cargo.toml and .cargo/config.toml. It covers build profiles, optional features, workspaces, and dependencies.

In plain words
What is it for?
Use it to inspect build timings, find duplicate dependencies, understand why crates or features are included, and adjust Rust build configuration.
Why use it?
Rust build settings can trade faster compilation, smaller binaries, and faster programs against each other. This helps you measure one goal at a time instead of guessing.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to inspect build timings, find duplicate dependencies, understand why crates or features are included, and adjust Rust build configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uwuclxdy/agenticat/cargo-toml-optimization
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.

Any agent
npx skills add uwuclxdy/agenticat --skill cargo-toml-optimization
Clone the repo
git clone --depth 1 https://github.com/uwuclxdy/agenticat

Made for: Claude Code.

Wrote 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.

agentmods badge for cargo-toml-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/uwuclxdy/agenticat/cargo-toml-optimization.svg)](https://agentmods.dev/skills/uwuclxdy/agenticat/cargo-toml-optimization)
Your own site
<a href="https://agentmods.dev/skills/uwuclxdy/agenticat/cargo-toml-optimization"><img src="https://agentmods.dev/badge/skills/uwuclxdy/agenticat/cargo-toml-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00031 $0.02264
Opus 5 $0.00015 $0.01132
Sonnet 5 $0.00006 $0.00453
Haiku 4.5 $0.00003 $0.00226

Measured 8d ago against content hash 3567cc47cdd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cargo-toml-optimization 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 8d 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.

skills/cargo-toml-optimization/SKILL.md · 162 lines

How it starts

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

Cargo.toml Optimization

Tune a Rust manifest (Cargo.toml) and its build config (.cargo/config.toml) toward one goal at a time. Runtime speed, binary size, compile time, dependency hygiene: these pull against each other, so name the target before editing. Then take a baseline measurement, change a single lever, re-measure.

Measure First

Advice you haven't measured is guessing. opt-level "z" is not always smaller than "s" or 3. Fat LTO can cost minutes of link time for a percent of runtime. The real bottleneck is often one crate on the critical path rather than the whole graph.

Question Command
What is slow to compile? cargo build --timings -> HTML report; read the critical path
Which deps are duplicated at incompatible versions? cargo tree -d
What makes the binary big? cargo bloat --release --crates (install cargo-bloat)
Why is this feature / crate here? cargo tree -e features -i <crate>

Build cache, Cargo.lock rules, build.rs cost: references/how-cargo-works.md.

Two Files, Two Jobs

  • Cargo.toml lists what to build: dependencies, features, profile definitions, workspace layout.
  • .cargo/config.toml governs how it gets built: linker, rustflags, sccache, target, env. It can override any profile field; that override then wins over the Cargo.toml profile.

Trap: [profile.*] and [patch] are read only from the workspace root; the same tables in a member crate are ignored with a warning, not applied. ([workspace] in a member is different: it makes that crate its own workspace root.)

Profiles: The Core of It

Most Cargo.toml tuning happens here. A profile applies to every target (lib, bin, test, bench). Per-setting detail (every value, every default) is in references/profiles.md. Start from one of these:

Balanced release (near-fat-LTO quality, ~2x faster link than full fat LTO):

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 4
panic = "abort"          # smaller + faster panic path; drop it if you need unwinding or catch_unwind
strip = "debuginfo"      # trims size, keeps symbol names for crash reports

Read the full file on GitHub · 162 lines

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. 8d ago First seen · 162 lines · 31 tokens per session scan A 3567cc47cdd1

Subscribe to this mod's changes

cargo-toml-optimization is a skill published in the GitHub repository uwuclxdy/agenticat (5 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 2,264 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-08-31.

Related

Other skills, from other repositories

azure-storage-blob-rust

Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust".

microsoft/skills · 57 tokens

azure-eventhub-rust

Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".

microsoft/skills · 58 tokens

azure-keyvault-certificates-rust

Azure Key Vault Certificates library for Rust. Create, manage, and use X.509 certificates including self-signed and CA-issued. Triggers: "keyvault certificates rust", "CertificateClient rust", "create certificate rust", "self-signed certificate rust", "X.509 rust".

microsoft/skills · 65 tokens

azure-keyvault-keys-rust

Azure Key Vault Keys library for Rust. Create, manage, and use cryptographic keys including RSA, EC, and HSM-protected keys. Triggers: "keyvault keys rust", "KeyClient rust", "create key rust", "encrypt rust", "wrap key rust", "sign rust".

microsoft/skills · 68 tokens

azure-cosmos-rust

Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data. Triggers: "cosmos db rust", "CosmosClient rust", "document crud rust", "NoSQL rust", "partition key rust".

microsoft/skills · 56 tokens

azure-identity-rust

Azure Identity library for Rust. Microsoft Entra ID authentication for all Azure SDK clients. Triggers: "azure identity rust", "DeveloperToolsCredential", "authentication rust", "managed identity rust", "credential rust", "Entra ID rust".

microsoft/skills · 54 tokens