csharpier

Configure and enforce CSharpier opinionated formatting for C# and XML files in .NET repositories.

Updated May 2, 2026
One-click install
npx skills add https://github.com/hdeshev/pi-config --skill csharpier-hdeshev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: csharpier
Source: https://github.com/hdeshev/pi-config/tree/main/agent/skills/csharpier
Command: npx skills add https://github.com/hdeshev/pi-config --skill csharpier-hdeshev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? .NET teams often struggle with inconsistent code formatting and ambiguous ownership between formatting tools like CSharpier and dotnet format. This Skill sets up CSharpier as the single opinionated formatter, wires it into CI, and documents clear ownership so formatting debates disappear. ## Core Features & Use Cases - Bootstrap CSharpier Setup: Detects existing tool manifests, installs CSharpier as a local dotnet tool, and creates .csharpierignore and .csharpierrc configuration. - CI Formatting Gates: Adds dotnet csharpier check . to CI pipelines so unformatted code fails the build. - Ownership Resolution: Defines explicit boundaries between CSharpier and dotnet format so both tools never fight over the same formatting rules. - Use Case: A team migrating to an opinionated formatter asks the agent to set up CSharpier; the Skill inspects the repo, installs the local tool, adds ignore files, configures the CI check, and reports status: configured with verification evidence. ## Quick Start Ask the agent to set up CSharpier for this repository and add a formatting check to CI.

Frequently Asked Questions about csharpier

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

FAQPage Schema
How do I set up CSharpier in a .NET repository?▼

Create a tool manifest with `dotnet new tool-manifest`, then run `dotnet tool install csharpier` for a reproducible local installation. Add a `.csharpierignore` file if needed and run `dotnet csharpier check .` to verify formatting.

CSharpier vs dotnet format: which formatter should I use?▼

CSharpier is an opinionated formatter with minimal configuration, while dotnet format follows detailed .editorconfig style rules. Choose CSharpier when the team prefers one enforced style; avoid running both on the same formatting concerns without documented ownership.

How do I add a CSharpier formatting check to CI?▼

Run `dotnet csharpier check .` as a CI step; it exits with a non-zero code when files need formatting, failing the build. This works in GitHub Actions, Azure DevOps, and pre-commit hooks.

Can CSharpier and dotnet format be used together?▼

Yes, but they must not own the same formatting rules. Disable whitespace formatting rules for dotnet format in .editorconfig, let CSharpier own formatting decisions, and document the split in AGENTS.md.

How do I exclude files from CSharpier formatting?▼

Create a `.csharpierignore` file in the repository root using gitignore-style patterns such as `**/Migrations/` or `**/*.generated.cs`. CSharpier also automatically excludes obj/, bin/, and auto-generated files.

When should I not use CSharpier?▼

Avoid CSharpier when the repository has standardized on dotnet format as the only formatter or when the team wants detailed .editorconfig-driven formatting control rather than one opinionated style.