update-dependencies
БесплатноБез исполняемых скриптовНе проверенUpdate Cargo dependencies with cargo update, telling Cargo.lock-only updates from breaking ones, then check, commit and push. Use when updating or bumping…
от torrust★ 539 звёзд на GitHubОб этом скилле
Updating Dependencies
This skill guides you through updating project dependencies for the Torrust Tracker project.
Use .claude/skills/add-rust-dependency/SKILL.md when introducing a new crate.
This skill is for updating already-declared dependencies.
Use .claude/skills/update-github-workflow-actions/SKILL.md for GitHub Actions
workflow dependency updates and organization action-allowlist synchronization.
When updating crates and workflow actions together, complete the crate update first and use the
same dedicated branch for the subsequent workflow-action update.
Delivery policy:
- Never push directly to
developormain. - Merges into
developormainmust go through a PR opened intorrust/torrust-trackerfrom a fork branch (<fork-owner>:<branch>). - Remote names are contributor-specific (
josecelano,origin,torrust, etc.); use your configured fork remote.
Update Categories
Before starting, decide which category the update falls into:
| Category | Description | Branch / Issue |
|---|---|---|
| Trivial | cargo update only — no code changes needed |
Timestamped branch, no issue required |
| Breaking | Dependency change requires code rework | If small: same branch. If large: open a separate issue per dep |
Use cargo update --dry-run or read the dependency changelog to classify before starting.
Quick Reference
# Get one high-resolution timestamp (YYYYMMDD-HHMMSS) for this invocation.
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
UPDATE_OUTPUT=".tmp/${TIMESTAMP}-cargo-update.txt"
UPDATE_BRANCH="${TIMESTAMP}-update-dependencies"
# Create branch
git checkout develop && git pull --ff-only
git checkout -b "$UPDATE_BRANCH"
# Ensure the workspace-local ignored log directory exists.
mkdir -p .tmp
# Update dependencies
cargo update 2>&1 | tee "$UPDATE_OUTPUT"
# If Cargo.lock has no changes, nothing to do — stop here.
# Verify
./contrib/dev-tools/git/hooks/pre-commit.sh --format=json
# Commit and push (using the captured `cargo update` output as the commit body)
git add Cargo.lock
git commit -S -m "chore: update dependencies" -m "$(cat "$UPDATE_OUTPUT")"
git push {your-fork-remote} "$UPDATE_BRANCH"
# Open a PR targeting torrust/torrust-tracker:develop. Use
# docs/templates/CARGO-DEPENDENCY-UPDATE-PR.md and replace its Cargo-output
# placeholder with the complete "$UPDATE_OUTPUT" contents verbatim.
Complete Workflow
Step 1: Create a Branch
Generate one high-resolution timestamp for both the branch and captured output filename. This avoids ordinary same-day/same-second collisions and prevents the output capture of one invocation from overwriting another's:
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
UPDATE_OUTPUT=".tmp/${TIMESTAMP}-cargo-update.txt"
UPDATE_BRANCH="${TIMESTAMP}-update-dependencies"
git checkout develop
git pull --ff-only
git checkout -b "$UPDATE_BRANCH"
mkdir -p .tmp
Confirm the branch is cut from an up-to-date develop before running anything. A branch cut from
main (or any older branch) lacks the current hooks and tooling, so every commit fails or checks
against stale rules.
For breaking-change updates that require a tracked issue:
UPDATE_BRANCH="${TIMESTAMP}-{issue-number}-update-dependencies"
git checkout -b "$UPDATE_BRANCH"
Step 2: Run Cargo Update
mkdir -p .tmp
cargo update 2>&1 | tee "$UPDATE_OUTPUT"
If Cargo.lock has no changes, there is nothing to update — exit early.
Review "$UPDATE_OUTPUT" to identify any major version bumps that may be breaking.
This unique filename prevents captured-output collisions only. Concurrent update workflows must not share a Git working tree because Git's branch checkout and index remain shared.
Step 3: Handle Breaking Changes
If any updated dependency introduced a breaking API change:
- Small rework (a few lines, no design decisions): fix it in this branch and continue.
- Large rework (architectural impact or significant effort): revert that specific dependency
in
Cargo.toml, keep the other trivial updates, and open a new issue for the breaking dependency separately.
# Revert a single crate to its current locked version to defer it
cargo update --precise {old-version} {crate-name}
cargo update --precise is only recorded in Cargo.lock; the next plain cargo update moves the
crate again whenever the manifest requirement is loose (for example "0" or "1"). To defer a
breaking release durably, also pin the manifest requirement to the current series (for example
ringbuf = "0.5"), commit that pin, and open a follow-up issue or PR that raises the pin together
with the required code changes. Loosely-ranged 0.x crates are the usual source of breaking
minors, so after any cargo update run `ca
Установить update-dependencies в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл update-dependencies?
Update Cargo dependencies with cargo update, telling Cargo.lock-only updates from breaking ones, then check, commit and push. Use when updating or bumping dependencies.
Как установить скилл update-dependencies?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл update-dependencies запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic