Code Formatting

Format Rust and TypeScript code using justfile tasks and cargo nightly fmt.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/edgeandnode/amp --skill code-formatting-edgeandnode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Code Formatting
Source: https://github.com/edgeandnode/amp/tree/main/.claude/skills/code-format
Command: npx skills add https://github.com/edgeandnode/amp --skill code-formatting-edgeandnode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of inconsistent code style across a project, which often leads to messy diffs, reduced readability, and wasted time on manual formatting. It automates the enforcement of coding standards for both Rust and TypeScript.

Core Features & Use Cases

  • Rust Code Formatting: Apply rustfmt to all Rust code or specific files, ensuring consistent style.
  • TypeScript Code Formatting: Format TypeScript files using prettier via pnpm format.
  • Formatting Checks: Verify code style compliance without making changes, ideal for pre-commit hooks or CI.
  • Use Case: After making edits to a Rust file, immediately run just fmt-file src/my_module/logic.rs to automatically apply the project's formatting rules, saving you from manual adjustments and ensuring clean commits.

Quick Start

Format the Rust file located at src/my_module/logic.rs.

Frequently Asked Questions about Code Formatting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically format Rust and TypeScript code in my project?

Code formatting automates style consistency across Rust and TypeScript files. Use justfile tasks like `just fmt-rs` for Rust via rustfmt and `just fmt-ts` for TypeScript via prettier, ensuring uniform coding standards without manual adjustments.

Can I format specific files instead of my entire codebase?

Yes, the `just fmt-file` task detects file type automatically and applies the appropriate formatter—rustfmt for Rust or prettier for TypeScript—to individual files after edits.

Why should I automate code formatting in CI and pre-commit workflows?

Automated formatting checks catch style violations before commits, reducing messy diffs and review friction. Run formatting checks in CI to enforce standards across the team without manual code review overhead.

Does prettier work with TypeScript in a Rust workspace?

Yes, prettier formats TypeScript files via `pnpm format` within a Rust workspace. This Skill handles both languages side by side, applying rustfmt to Rust code and prettier to TypeScript components.

What's the difference between formatting and formatting checks?

Formatting rewrites code to match style rules; formatting checks verify compliance without making changes. Use checks in CI pipelines and pre-commit hooks to validate style before allowing commits.