# Cargo Watch

> Run cargo-watch in the background for continuous clippy feedback during code editing.

- Skill: `juspay/cargo-watch` (Agent Skill)
- Install (CLI): `npx skillmds@latest add juspay/cargo-watch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/juspay/cargo-watch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: juspay (https://skillmd.com/u/juspay)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/juspay/cargo-watch

---


# Cargo Watch

## Rapid feedback with `just watch`

Run `just watch` in the background at the start of any code-editing task. It launches `cargo watch -x 'clippy --workspace --all-targets'` which automatically re-runs clippy on every `.rs` file change.

Use Bash with `run_in_background: true` to start it, then periodically check `TaskOutput` for compilation errors and clippy warnings as you edit. This catches mistakes early without waiting for a manual clippy run at the end.

## Devshell provides all tools

`cargo-watch`, `rustfmt`, `clippy`, and the full Rust toolchain come from the Nix devshell. No manual installs needed. The justfile auto-detects whether you're inside `nix develop` and wraps commands accordingly.

## Workspace-wide checks

Always use `--workspace --all-targets` flags with clippy/check to cover all crates and all target types (lib, bin, tests, examples).

