skillfed

csharpier

CSharpier establishes a single, opinionated formatting standard for C# and XML in .NET projects. It detects current formatter state, installs the tool locally for reproducible CI, and documents ownership to avoid conflicts with dotnet format. Use this when your team values consistent formatting decisions over extensive configuration options.

CSharpier sets up an opinionated C# formatter for .NET repos that prefer consistency over configuration.

AI-generated summary based on this skill's SKILL.md

463 35 MIT updated by managedcode

Install

managedcode/dotnet-skills/csharpier · repository language: C#

git clone https://github.com/managedcode/dotnet-skills
cp -r dotnet-skills/catalog/Tools/CSharpier/skills/csharpier ~/.claude/skills/csharpier
npx skillfed install managedcode/dotnet-skills/csharpier

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I set up CSharpier as the primary formatter for my .NET repository?

CSharpier establishes a single, opinionated formatting standard for C# and XML in .NET projects. Install it as a local tool via `dotnet tool install CSharpier`, then run `csharpier .` to format your codebase. Add CSharpier to your `.config/dotnet-tools.json` for reproducible CI environments. Configure any ignore rules in `.csharpierignore` if needed, and document formatting ownership to avoid conflicts with other formatters like dotnet format.

What is the difference between CSharpier and dotnet format?

CSharpier differs from dotnet format in its philosophy: CSharpier is an opinionated formatter that makes consistent formatting decisions for you, minimizing configuration overhead. Dotnet format offers more extensive customization options through EditorConfig. Choose CSharpier when your team values consistent, decided-upon formatting standards over extensive configuration flexibility. CSharpier detects current formatter state and helps clarify formatting ownership to prevent tool conflicts.

How do I integrate CSharpier into my CI/CD pipeline with check mode?

CSharpier integrates into CI/CD using check mode to verify formatting without modifying files. Install CSharpier as a local tool in your repository's `.config/dotnet-tools.json`, then run `csharpier --check .` in your pipeline. This command exits with a non-zero status if formatting violations are found, failing the build. For reproducibility across environments, always use local tool installation rather than global installation.

What is the recommended way to install CSharpier for a C# project?

CSharpier recommends local tool installation for reproducible builds. Run `dotnet tool install CSharpier` in your repository root to create `.config/dotnet-tools.json`. This ensures all team members and CI agents use the same CSharpier version. Local installation is preferable to global installation because it avoids version conflicts across projects and guarantees consistent formatting behavior in automated environments.

How does CSharpier handle ignore rules and formatting ownership?

CSharpier manages ignore rules through a `.csharpierignore` file, similar to `.gitignore` syntax. This clarifies which files CSharpier controls, reducing conflicts with other formatters. Document formatting ownership in your team's guidelines to establish that CSharpier is your primary formatter. This ownership model prevents confusion when multiple formatting tools are present and ensures consistent application of CSharpier's opinionated standards across your .NET projects.

Does CSharpier support EditorConfig and XML formatting?

CSharpier supports EditorConfig for configuration and formats both C# and XML files. Its opinionated approach means fewer EditorConfig settings are needed compared to dotnet format—CSharpier makes many formatting decisions automatically. This reduces configuration complexity while maintaining consistency. The tool's built-in XML formatting support makes it suitable for comprehensive .NET repository formatting without requiring separate tools for different file types.

SKILL.md

rendered from the published skill — quoted content, verbatim

CSharpier for .NET

Trigger On

  • the repo uses or wants CSharpier
  • the team prefers an opinionated formatter over many configurable style knobs

Value

  • produce a concrete project delta: code, docs, config, tests, CI, or review artifact
  • reduce ambiguity through explicit planning, verification, and final validation skills
  • leave reusable project context so future tasks are faster and safer

Do Not Use For

  • repos that already standardized on dotnet format as the only

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 5 files
catalog/Tools/CSharpier/skills/csharpier/SKILL.md
catalog/Tools/CSharpier/skills/csharpier/manifest.json
catalog/Tools/CSharpier/skills/csharpier/references/commands.md
catalog/Tools/CSharpier/skills/csharpier/references/config.md
catalog/Tools/CSharpier/skills/csharpier/references/csharpier.md

Related skills

Tags

code-formatter opinionated-style dotnet-tooling ci-automation formatting-standards xml-support tool-configuration reproducible-builds