Dependency management guidelines for Jarvy - crate selection criteria, feature flag best practices, version management, security auditing with cargo-audit and cargo-deny.
This skill provides guidance for managing Rust dependencies in the Jarvy project.
Dependency Selection Criteria
Prefer Standard Library First
Before adding external crates, verify stdlib cannot handle the need:
// PREFER: stdlib for simple operations
use std::fs;
use std::path::PathBuf;
use std::process::Command;
// AVOID: Adding crates for trivial functionality
Evaluation Checklist
When considering a new dependency:
Necessity: Can this be implemented in <100 lines?
Maintenance: Is the crate actively maintained?
Transitive deps: How many dependencies does it bring?
Compile time: What is the build time impact?
License: Is it compatible (MIT, Apache-2.0, BSD)?
Reuse Existing Dependencies
Need
Use Existing
JSON
serde_json
YAML
serde_yaml
TOML
toml
Error types
thiserror
HTTP
ureq
Logging
tracing
CLI args
clap with derive
Interactive prompts
inquire
Unique IDs
uuid v7
Platform dirs
dirs
Feature Flag Best Practices
Minimize Enabled Features
# GOOD: Explicit minimal features
clap = { version = "4.5", features = ["derive"] }
uuid = { version = "1.10", features = ["v7"] }
serde = { version = "1.0", features = ["derive"] }
ureq = { version = "3.1", features = ["json"] }
# BAD: Enabling all features
# clap = { version = "4.5", features = ["full"] }
Document Non-Obvious Features
# v7 provides time-ordered UUIDs for telemetry event ordering
uuid = { version = "1.10", features = ["v7"] }
Disable Default Features When Appropriate
some-crate = { version = "1.0", default-features = false, features = ["needed"] }
Version Management
Version Specification
# Standard: Allow patch and minor updates
serde = "1.0"
# Specific: Pin only when necessary
opentelemetry-otlp = "0.31.0"
Update Commands
# Update all dependencies
cargo update
# Update specific dependency
cargo update -p serde
# Check for outdated dependencies
cargo outdated
Lockfile Management
Commit Cargo.lock: This is an application, not a library
Review lockfile changes: Check diffs for unexpected updates
Configures 2-Agent workflow between PM and implementation roles. Use when user mentions 2-Agent, 2エージェント, PM連携設定, Cursor設定, Cursor連携, 2-agent運用. Do NOT load for: 単独運用, ワークフロー実行, ハンドオフ処理.
Add a new AI coding agent to Agent Sandbox. Creates all required files (Dockerfile, templates, CI, docs) and wires the agent into the CLI, proxy, and build system.
Add a new property to the AI agents database. Use when the user wants to add, create, or introduce a new column, property, field, or feature to track across all agents in the comparison matrix. Handles all four required steps - database updates, groups.json, table display, and GitHub issue templates.