— No reviews yet
0 installs
2 views
0.0% view→install
Install
$ agentstack add skill-caraya-agent-skills-rust-formatting ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Rust Formatting? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
Rust Formatting
Use When
- Setting up or validating code formatting for Rust projects.
- Configuring rustfmt and Clippy for consistent style.
- Integrating formatting into the IDE or pre-commit hooks.
Standard Formatters
- rustfmt (built-in, recommended)
- Rust's official formatter; part of the standard toolchain.
- Install:
rustup component add rustfmt. - Run:
cargo fmtto format all files in the workspace.
- Clippy (linting)
- Official Rust linter; catches idiomatic and correctness issues.
- Install:
rustup component add clippy. - Run:
cargo clippy -- -D warningsto treat warnings as errors.
Configuration
rustfmt.toml (project root):
edition = "2021"
max_width = 100
tab_spaces = 4
use_small_heuristics = "Default"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
.clippy.toml or Cargo.toml (Clippy lints):
[lints.clippy]
pedantic = "warn"
nursery = "warn"
unwrap_used = "deny"
expect_used = "warn"
VS Code .vscode/settings.json:
{
"[rust]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.rustfmt.extraArgs": []
}
Checklist
- Consistency
rustfmtis configured with arustfmt.tomlthat matches team preferences.- Clippy is run on CI with
-- -D warningsto prevent regressions. - Edition is explicitly set (
edition = "2021"recommended).
- IDE integration
rust-analyzerextension is installed and active.- Format-on-save is enabled.
- Clippy is used as the check command (not just
cargo check).
- Pre-commit hooks
- Use
pre-commitor git hooks to runcargo fmt --checkandcargo clippy. - Prevents unformatted or lint-failing code from entering the repository.
- Import organization
imports_granularity = "Crate"groups imports by crate for readability.group_imports = "StdExternalCrate"separates std, external, and local imports.
Formatting Rules
- Indentation: 4 spaces (Rust standard).
- Line width: 100 characters (rustfmt default is 100).
- Trailing commas: Used in multi-line structures.
- Imports: Grouped by std, external crates, and local modules.
Common Commands
- Format:
cargo fmt. - Check (no changes):
cargo fmt -- --check. - Lint:
cargo clippy. - Lint as errors:
cargo clippy -- -D warnings.
Output Requirements
When setting up or validating formatting, provide:
- Formatter versions and configuration.
- IDE integration status.
- Pre-commit hook setup summary.
- Any formatting conflicts or Clippy violations found.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: caraya
- Source: caraya/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.