Analyze Cargo.toml dependencies and attempt to remove unused features to reduce compile times and binary size
This skill analyzes Cargo.toml dependencies to identify and remove unused features.
Many crates enable features by default that may not be needed. This skill:
default-features = false worksAsk the user which crate(s) to analyze:
For the workspace Cargo.toml (quickwit/Cargo.toml), list dependencies that:
default-features = falseRun: cargo tree -p <crate> -f "{p} {f}" --edges features to see what features are actually used.
Look up the crate on crates.io or check its Cargo.toml to understand:
Use: cargo metadata --format-version=1 | jq '.packages[] | select(.name == "<crate>") | .features'
Modify the dependency in quickwit/Cargo.toml:
From:
some-crate = { version = "1.0" }
To:
some-crate = { version = "1.0", default-features = false }
Run: cargo check --workspace (or target specific packages for faster feedback)
If compilation fails:
some-crate = { version = "1.0", default-features = false, features = ["needed-feature"] }
If there are many default features, use binary search:
For each dependency analyzed, report:
After all changes, run:
cargo check --workspace --all-targets
cargo test --workspace --no-run
Often only needs derive:
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
Identify which runtime features are actually used:
tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "macros", "sync"] }
Often doesn't need all TLS backends:
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "json"] }
If changes cause issues:
git checkout quickwit/Cargo.toml
cargo check --workspace
cargo bloat --crates to identify large dependenciescargo tree -d for duplicate dependencies that might indicate feature conflicts[dev-dependencies] featuresnpx skills add quickwit-oss/rationalize-deps下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.
Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI.
Capture and automate macOS UI with the Peekaboo CLI.
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
iMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
Category:developer