rationalize-deps
Analyze Cargo.toml dependencies and attempt to remove unused features to reduce compile times and binary size
Install
mkdir -p .claude/skills/rationalize-deps && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7563" && unzip -o skill.zip -d .claude/skills/rationalize-deps && rm skill.zipInstalls to .claude/skills/rationalize-deps
About this skill
Rationalize Dependencies
This skill analyzes Cargo.toml dependencies to identify and remove unused features.
Overview
Many crates enable features by default that may not be needed. This skill:
- Identifies dependencies with default features enabled
- Tests if
default-features = falseworks - Identifies which specific features are actually needed
- Verifies compilation after changes
Step 1: Identify the target
Ask the user which crate(s) to analyze:
- A specific crate name (e.g., "tokio", "serde")
- A specific workspace member (e.g., "quickwit-search")
- "all" to scan the entire workspace
Step 2: Analyze current dependencies
For the workspace Cargo.toml (quickwit/Cargo.toml), list dependencies that:
- Do NOT have
default-features = false - Have default features that might be unnecessary
Run: cargo tree -p <crate> -f "{p} {f}" --edges features to see what features are actually used.
Step 3: For each candidate dependency
3a: Check the crate's default features
Look up the crate on crates.io or check its Cargo.toml to understand:
- What features are enabled by default
- What each feature provides
Use: cargo metadata --format-version=1 | jq '.packages[] | select(.name == "<crate>") | .features'
3b: Try disabling default features
Modify the dependency in quickwit/Cargo.toml:
From:
some-crate = { version = "1.0" }
To:
some-crate = { version = "1.0", default-features = false }
3c: Run cargo check
Run: cargo check --workspace (or target specific packages for faster feedback)
If compilation fails:
- Read the error messages to identify which features are needed
- Add only the required features explicitly:
some-crate = { version = "1.0", default-features = false, features = ["needed-feature"] } - Re-run cargo check
3d: Binary search for minimal features
If there are many default features, use binary search:
- Start with no features
- If it fails, add half the default features
- Continue until you find the minimal set
Step 4: Document findings
For each dependency analyzed, report:
- Original configuration
- New configuration (if changed)
- Features that were removed
- Any features that are required
Step 5: Verify full build
After all changes, run:
cargo check --workspace --all-targets
cargo test --workspace --no-run
Common Patterns
Serde
Often only needs derive:
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
Tokio
Identify which runtime features are actually used:
tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "macros", "sync"] }
Reqwest
Often doesn't need all TLS backends:
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "json"] }
Rollback
If changes cause issues:
git checkout quickwit/Cargo.toml
cargo check --workspace
Tips
- Start with large crates that have many default features (tokio, reqwest, hyper)
- Use
cargo bloat --cratesto identify large dependencies - Check
cargo tree -dfor duplicate dependencies that might indicate feature conflicts - Some features are needed only for tests - consider using
[dev-dependencies]features
More by quickwit-oss
View all skills by quickwit-oss →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversSecurity Audit analyzes Node.js dependencies for vulnerabilities using npm-audit-report, delivering actionable security
Optimize your codebase for AI with Repomix—transform, compress, and secure repos for easier analysis with modern AI tool
MCP server for Ghidra reverse engineering. Enables AI assistants to decompile binaries, analyze functions, rename variab
Convert almost anything to Markdown. Transforms PDFs, images, web pages, DOCX, XLSX, and other formats into clean Markdo
Search and analyze arXiv research papers directly from AI assistants. Full-text search, paper recommendations, citation
Obsidian: fast search and analysis of Markdown notes across Obsidian vaults — find, filter, and analyze notes with an in
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.