iopsystems/durable/format-code

Claude Code and agent skill by iopsystems/durable

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Formats the codebase using nightly rustfmt. Use when asked to "format the code", "run rustfmt", "cargo fmt", or when formatting is needed after code changes.

Install

npx vskill@latest install iopsystems/durable/format-code

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Format Code

Description

Formats all Rust code in the codebase using nightly rustfmt to ensure consistent code style. This skill always uses nightly rustfmt to access the latest formatting features and configurations.

When to Use

  • When asked to "format the code" or "format my code"
  • When asked to "run rustfmt" or "cargo fmt"
  • When asked to "fix formatting" or "clean up formatting"
  • After completing code changes that need formatting
  • Before committing changes to ensure consistent style
  • When formatting issues are flagged by CI or pre-commit hooks

How It Works

Step 1: Run Nightly Rustfmt

Execute the format command using nightly toolchain:

bash
cargo +nightly fmt

This formats all Rust files in the workspace according to the project's rustfmt.toml configuration (if present).

Step 2: Report Results

After formatting completes:

  • If changes were made, inform the user that files were formatted
  • If no changes were needed, confirm the code was already properly formatted
  • Report any errors that occurred during formatting

Example Usage

User Request: "Format the code"

Expected Behavior:

  1. Run formatter:

``bash cargo +nightly fmt ``

  1. Check for changes (optional):

``bash git status ``

  1. Report:

`` Code formatted successfully using nightly rustfmt. ``

User Request: "Run rustfmt before I commit"

Expected Behavior:

  1. Run formatter:

``bash cargo +nightly fmt ``

  1. Report:

`` Formatting complete. Ready to commit. ``

Best Practices

Do:
  • Always use cargo +nightly fmt to ensure nightly toolchain
  • Run formatting before committing changes
  • Report whether any files were modified by the formatter
Don't:
  • Use cargo fmt without the +nightly flag
  • Skip formatting when making code changes
  • Ignore formatting errors

Quality Checklist

Before considering the task complete, verify:

  • [ ] Ran cargo +nightly fmt successfully
  • [ ] No formatting errors were reported
  • [ ] User is informed of the result

Troubleshooting

Nightly toolchain not installed:

  • Run rustup install nightly to install
  • Then retry the format command

Formatting fails with parse errors:

  • Check for syntax errors in the Rust code
  • Fix compilation errors first, then format

rustfmt.toml issues:

  • Verify the configuration file is valid
  • Check that nightly-only options are supported

Related Skills

  • create-git-commit - Create commits after formatting
  • Code quality and linting workflows

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
53
Repository forks
1
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.

Extension points

  • hookPre/post lifecycle hooks
  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/iopsystems/durable/format-code/badge)](https://verified-skill.com/skills/iopsystems/durable/format-code)

Something wrong with this skill or its page? Tell us.