Cargo watch

From juspay/skills · View interactive version

Cargo watch is an AI agent skill from the GitHub repository juspay/skills. Run cargo-watch in the background for continuous clippy feedback during code editing.

How to use this skill

Skill file

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).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.