code-format

Format C# code with dotnet format and frontend files with Prettier.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/GiantCroissant-Lunar/fantasim-world --skill code-format-giantcroissant-lunar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-format
Source: https://github.com/GiantCroissant-Lunar/fantasim-world/tree/main/.agent/skills/code-format
Command: npx skills add https://github.com/GiantCroissant-Lunar/fantasim-world --skill code-format-giantcroissant-lunar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Manual code formatting is repetitive and error-prone, leading to inconsistent styling across a codebase. This Skill automates formatting to ensure compliance with project standards.

Core Features & Use Cases

  • Dotnet format for C# projects to apply .NET style guidelines.
  • Prettier for JSON, YAML, Markdown, and JavaScript/TypeScript to standardize non-.NET files.
  • Unified, script-driven workflow to format code before commits, PRs, or CI checks.

Quick Start

Use the code-format skill to format the repository:

  • Run the all-format script: ./.agent/skills/code-format/scripts/format-all.sh
  • Verify formatting without applying changes: ./.agent/skills/code-format/scripts/format-all.sh --verify
  • Format only .NET code: ./.agent/skills/code-format/scripts/format-all.sh --skip-prettier
  • Format only non-.NET code: ./.agent/skills/code-format/scripts/format-all.sh --skip-dotnet
  • Get verbose progress: ./.agent/skills/code-format/scripts/format-all.sh --verbose

Frequently Asked Questions about code-format

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

FAQPage Schema
How do I automate code formatting for both .NET and frontend projects?

Automate code formatting by applying dotnet format to C# projects and Prettier to JSON, YAML, Markdown, and JavaScript/TypeScript files. A unified script executes deterministic formatting across the entire repository to enforce consistent styling standards.

What is the best way to verify code formatting in a CI pipeline without changing files?

Verify code formatting in CI by running the format-all script with the --verify flag. This checks .NET and frontend files against style guidelines without applying changes, ensuring deterministic compliance before merging code.

Do I need Node.js and .NET SDK installed to run automated formatting locally?

Yes, you need the .NET SDK with dotnet format installed for C# projects, and Node.js with Prettier installed for frontend files. These dependencies provide the underlying tooling required to execute the formatting scripts.

Can I format only C# code and skip Prettier formatting for frontend files?

Yes, you can format only C# code by running the format-all script with the --skip-prettier flag. Conversely, use the --skip-dotnet flag to format only non-.NET files like JSON and YAML.

When should I use pre-commit hooks for code formatting instead of manual checks?

Use pre-commit hooks for code formatting to catch styling inconsistencies before they enter the repository, preventing repetitive manual checks. This automates compliance during development, PRs, and CI checks.

Why does consistent code formatting matter for software engineering teams?

Consistent code formatting matters because manual formatting is repetitive and error-prone. Automating style compliance eliminates inconsistent styling across a codebase, allowing teams to focus on logic rather than formatting debates.