code-format

Format C#/.NET, JSON, YAML, Markdown, JavaScript, and TypeScript files using dotnet format and Prettier.

4|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/icartsh/icartsh_plugin --skill code-format-icartsh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-format
Source: https://github.com/icartsh/icartsh_plugin/tree/main/icartsh-plugin/skills/code-format
Command: npx skills add https://github.com/icartsh/icartsh_plugin --skill code-format-icartsh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill standardizes code formatting across languages and tools to reduce style violations, speed up commits, and enforce consistent project conventions.

Core Features & Use Cases

  • Multi-tool formatting: coordinates dotnet-format, Prettier, and other formatters for deterministic results
  • Pre-commit readiness: ensures codebase is clean before commits or PRs
  • Project-wide consistency: applies .editorconfig and .prettierrc rules across the codebase

Quick Start

Use the code-format skill to format code with these commands:

  • .NET: cd ./dotnet then dotnet format PigeonPea.sln
  • Prettier: npx prettier --write "**/*.{json,yml,yaml,md}"
  • Format everything: ./.agent/skills/code-format/scripts/format-all.sh

Frequently Asked Questions about code-format

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

FAQPage Schema
How do I enforce consistent code formatting across multiple languages in my repository?

Code formatting standardizes styling rules across languages by coordinating tools like dotnet-format for C#/.NET and Prettier for JSON, YAML, Markdown, JavaScript, and TypeScript. Configuration files such as .editorconfig and .prettierrc.json define rules once, then apply them repository-wide to eliminate style violations and maintain consistency.

Can I automate code formatting as part of my pre-commit workflow?

Yes, code formatting integrates with pre-commit hooks to automatically clean and validate code before commits. The Skill supports verify modes for non-destructive checking and respects project configuration files, enabling automated enforcement in CI pipelines and local development workflows.

What file types and formatters does dotnet-format and Prettier support?

The Skill applies dotnet-format to C# and .NET projects, and Prettier to JSON, YAML, Markdown, JavaScript, and TypeScript files. Both tools respect configuration files (.editorconfig, .prettierrc.json, .prettierignore) and support targeted file patterns for selective formatting.

How do I format an entire codebase at once?

Run the format-all.sh script included in the Skill to format your entire repository in one operation. For specific languages, use `dotnet format` for .NET projects or `npx prettier --write` for JSON, YAML, Markdown, and JavaScript/TypeScript files with your project's configuration rules applied.

Does code formatting work with .editorconfig and existing project configuration files?

Yes, the Skill respects .editorconfig, .prettierrc.json, and .prettierignore files in your project, ensuring formatting rules align with existing standards. This eliminates configuration duplication and enforces consistent conventions across your entire multi-language repository.

Can I verify formatting without making changes to files?

The Skill supports verify modes for non-destructive checking, allowing you to validate code against formatting rules before applying changes. This is useful for CI validation and pre-commit checks without modifying your codebase.