Claude Skill

dotnet-resharper-clt

Use the free official JetBrains ReSharper Command Line Tools for .NET repositories. Use when a repo wants powerful `jb inspectcode` inspections, `jb cleanupcode` cleanup profiles, solution-level `.DotSettings` enforcement, or a stronger CLI quality gate for C# than the default SD

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download postpartum-genushyacinthus29-dotnet-skills-skills_dotnet-resharper-clt-bfa4ebd.zip · 8 KB
Part of postpartum-genushyacinthus29/dotnet-skills — 80 skills

Install

skills CLI npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills/tree/main/skills/dotnet-resharper-clt
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install postpartum-genushyacinthus29-dotnet-skills@llmmart
Git git clone https://github.com/Postpartum-genushyacinthus29/dotnet-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole postpartum-genushyacinthus29/dotnet-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

ReSharper Command Line Tools

Trigger On

  • the repo uses or wants ReSharper Command Line Tools
  • the team wants jb inspectcode or jb cleanupcode
  • the user asks for stronger C# inspections, cleanup profiles, or ReSharper-based CI gates

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

  • replacing tests with inspection output
  • ad-hoc formatting-only work when the repo intentionally standardizes on another formatter
  • repos that do not want JetBrains settings or CLT-based gates in their workflow

Inputs

  • the nearest AGENTS.md
  • the target .sln, .csproj, or bounded file set
  • repo-root .editorconfig
  • solution shared settings such as YourSolution.sln.DotSettings

Quick Start

  1. Read the nearest AGENTS.md and confirm scope and constraints.
  2. Run this skill's Workflow through the Ralph Loop until outcomes are acceptable.
  3. Return the Required Result Format with concrete artifacts and verification evidence.

Workflow

  1. Prefer solution-level runs when possible so ReSharper can resolve references and apply full inspections.
  2. Build the solution before jb cleanupcode when working at solution scope.
  3. Use jb inspectcode first to surface issues before editing anything broad.
  4. Treat surfaced issues as mandatory fixes when this gate is enabled for the repo; do not just dump a report and stop.
  5. Use jb cleanupcode with an explicit cleanup profile:
    • Built-in: Full Cleanup
    • Built-in: Reformat Code
    • Built-in: Reformat & Apply Syntax Style
    • or a checked-in custom profile
  6. Keep durable ReSharper settings in the team-shared solution layer and commit the solution .DotSettings file when policy changes.
  7. Re-run jb inspectcode after cleanup or fixes, then run the repo's normal quality pass and tests.

Bootstrap When Missing

If ReSharper Command Line Tools are not available yet:

  1. Detect current state:
    • rg --files -g '.config/dotnet-tools.json' -g '*.sln.DotSettings'
    • dotnet tool list --local
    • dotnet tool list --global
    • command -v jb
  2. Choose the install path deliberately:
    • preferred repo-local install for reproducible CI:
      • dotnet new tool-manifest (if missing)
      • dotnet tool install JetBrains.ReSharper.GlobalTools
    • global fallback:
      • dotnet tool install --global JetBrains.ReSharper.GlobalTools
  3. Verify the installed commands resolve correctly:
    • jb inspectcode --help
    • jb cleanupcode --help
  4. Record exact commands in AGENTS.md, for example:
    • dotnet build MySolution.sln -c Release
    • jb inspectcode MySolution.sln -o=artifacts/inspectcode.sarif
    • jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"
  5. If the repo needs stable settings, save them into the solution team-shared layer and commit YourSolution.sln.DotSettings.
  6. Run jb inspectcode once, fix or triage the surfaced issues, rerun it, and return status: configured or status: improved.
  7. If the repo intentionally excludes ReSharper CLT from its toolchain, return status: not_applicable.

Deliver

  • explicit jb inspectcode and jb cleanupcode commands
  • durable ReSharper settings in shared solution config
  • a quality gate that surfaces issues which are then fixed, not ignored

Validate

  • the target solution or project builds before solution-wide cleanup
  • jb inspectcode output is reviewed and acted on
  • cleanup profiles and shared settings are explicit
  • tests and the wider quality pass still run after ReSharper-driven fixes

Ralph Loop

Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.

  1. Plan first (mandatory):
    • analyze current state
    • define target outcome, constraints, and risks
    • write a detailed execution plan
    • list final validation skills to run at the end, with order and reason
  2. Execute one planned step and produce a concrete delta.
  3. Review the result and capture findings with actionable next fixes.
  4. Apply fixes in small batches and rerun the relevant checks or review steps.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable or only explicit exceptions remain.
  7. If a dependency is missing, bootstrap it or return status: not_applicable with explicit reason and fallback path.

Required Result Format

  • status: complete | clean | improved | configured | not_applicable | blocked
  • plan: concise plan and current iteration step
  • actions_taken: concrete changes made
  • validation_skills: final skills run, or skipped with reasons
  • verification: commands, checks, or review evidence summary
  • remaining: top unresolved items or none

For setup-only requests with no execution, return status: configured and exact next commands.

Load References

  • references/resharper-clt.md
  • references/commands.md
  • references/config.md

Example Requests

  • "Add ReSharper CLI inspections to this .NET repo."
  • "Run InspectCode and fix what it finds."
  • "Set up CleanupCode with a shared profile."
  • "Use JetBrains ReSharper command line tools in CI."
Files (dotnet-skills)
  • references
    • commands.md 5.6 KB
      # ReSharper Command Line Tools Commands
      
      ## jb inspectcode
      
      Run code inspections and produce a report of issues.
      
      ### Basic Usage
      
      ```bash
      jb inspectcode <solution|project> [options]
      ```
      
      ### Common Options
      
      | Option | Description |
      |--------|-------------|
      | `-o`, `--output` | Output file path |
      | `-f`, `--format` | Output format: `Sarif` (default), `Xml`, `Html`, `Text` |
      | `--severity` | Minimum severity to report: `ERROR`, `WARNING`, `SUGGESTION`, `HINT` |
      | `--include` | Glob pattern for files to include |
      | `--exclude` | Glob pattern for files to exclude |
      | `--project` | Project name filter within the solution |
      | `--properties` | MSBuild properties (e.g., `Configuration=Release`) |
      | `--dotSettings` | Path to custom settings file |
      | `--caches-home` | Path to cache directory |
      | `--no-build` | Skip building the solution before inspection |
      | `--build` | Force build before inspection |
      | `--verbosity` | Output verbosity: `OFF`, `FATAL`, `ERROR`, `WARN`, `INFO`, `VERBOSE`, `TRACE` |
      
      ### Examples
      
      Basic inspection with SARIF output (default since 2024.1):
      
      ```bash
      jb inspectcode MySolution.sln -o=artifacts/inspectcode.sarif
      ```
      
      XML output format:
      
      ```bash
      jb inspectcode MySolution.sln -f=Xml -o=artifacts/inspectcode.xml
      ```
      
      HTML report:
      
      ```bash
      jb inspectcode MySolution.sln -f=Html -o=artifacts/inspectcode.html
      ```
      
      Filter by severity (only errors and warnings):
      
      ```bash
      jb inspectcode MySolution.sln --severity=WARNING -o=artifacts/inspectcode.sarif
      ```
      
      Include only specific files:
      
      ```bash
      jb inspectcode MySolution.sln --include="src/**/*.cs" -o=artifacts/inspectcode.sarif
      ```
      
      Exclude test files:
      
      ```bash
      jb inspectcode MySolution.sln --exclude="**/*Tests*/**" -o=artifacts/inspectcode.sarif
      ```
      
      Inspect specific project only:
      
      ```bash
      jb inspectcode MySolution.sln --project=MyProject -o=artifacts/inspectcode.sarif
      ```
      
      With explicit MSBuild configuration:
      
      ```bash
      jb inspectcode MySolution.sln --properties:Configuration=Release -o=artifacts/inspectcode.sarif
      ```
      
      Use custom settings file:
      
      ```bash
      jb inspectcode MySolution.sln --dotSettings=custom.DotSettings -o=artifacts/inspectcode.sarif
      ```
      
      CI-friendly with cache control:
      
      ```bash
      jb inspectcode MySolution.sln --caches-home=.cache/resharper -o=artifacts/inspectcode.sarif
      ```
      
      ### Severity Levels
      
      | Level | Description |
      |-------|-------------|
      | `ERROR` | Critical issues that likely cause runtime errors |
      | `WARNING` | Issues that may cause problems or violate best practices |
      | `SUGGESTION` | Improvements that could enhance code quality |
      | `HINT` | Minor suggestions and style preferences |
      
      ---
      
      ## jb cleanupcode
      
      Apply code cleanup and reformatting based on a profile.
      
      ### Basic Usage
      
      ```bash
      jb cleanupcode <solution|project|files> [options]
      ```
      
      ### Common Options
      
      | Option | Description |
      |--------|-------------|
      | `--profile` | Cleanup profile name (required for predictable results) |
      | `--include` | Glob pattern for files to include |
      | `--exclude` | Glob pattern for files to exclude |
      | `--properties` | MSBuild properties (e.g., `Configuration=Release`) |
      | `--dotSettings` | Path to custom settings file |
      | `--caches-home` | Path to cache directory |
      | `--no-build` | Skip building the solution before cleanup |
      | `--verbosity` | Output verbosity |
      | `--disable-settings-layers` | Disable specific settings layers |
      
      ### Built-in Profiles
      
      | Profile | Description |
      |---------|-------------|
      | `Built-in: Full Cleanup` | Complete cleanup including code style, formatting, and optimizations |
      | `Built-in: Reformat Code` | Only reformat without code changes |
      | `Built-in: Reformat & Apply Syntax Style` | Reformat and apply syntax style preferences |
      
      ### Examples
      
      Full cleanup on entire solution:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"
      ```
      
      Reformat only (no code changes):
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Reformat Code"
      ```
      
      Reformat with syntax style:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Reformat & Apply Syntax Style"
      ```
      
      Cleanup specific files:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup" --include="src/**/*.cs"
      ```
      
      Exclude generated files:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup" --exclude="**/*.g.cs;**/*.Designer.cs"
      ```
      
      Use custom cleanup profile from settings:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="MyCustomProfile"
      ```
      
      With explicit build configuration:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup" --properties:Configuration=Release
      ```
      
      CI-friendly with cache:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup" --caches-home=.cache/resharper
      ```
      
      ### Important Notes
      
      - Always build the solution before solution-wide cleanup so binary references resolve correctly.
      - Use `--no-build` only when you are certain the solution is already built.
      - Custom profiles must be defined in a `.DotSettings` file.
      - Changes are applied in-place; use version control to review and revert if needed.
      
      ---
      
      ## Combined CI Workflow
      
      Typical CI sequence:
      
      ```bash
      # Build first
      dotnet build MySolution.sln -c Release
      
      # Inspect before cleanup
      jb inspectcode MySolution.sln -o=artifacts/inspectcode-before.sarif
      
      # Apply cleanup
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"
      
      # Inspect after cleanup
      jb inspectcode MySolution.sln -o=artifacts/inspectcode-after.sarif
      
      # Run tests
      dotnet test MySolution.sln -c Release --no-build
      ```
      
      ### Exit Codes
      
      | Code | Meaning |
      |------|---------|
      | 0 | Success |
      | Non-zero | Failure (check output for details) |
      
      Note: `jb inspectcode` returns 0 even when issues are found. Parse the output file to determine if issues exist.
      
    • config.md 7.3 KB
      # ReSharper DotSettings Configuration
      
      ## Settings Layer Hierarchy
      
      ReSharper uses a layered settings system. From lowest to highest priority:
      
      | Layer | File Pattern | Scope | Commit to VCS |
      |-------|--------------|-------|---------------|
      | Global | `%APPDATA%\JetBrains\...` | User machine | No |
      | Solution Team-Shared | `SolutionName.sln.DotSettings` | Team/repo | Yes |
      | Solution Personal | `SolutionName.sln.DotSettings.user` | User only | No |
      | Project Team-Shared | `ProjectName.csproj.DotSettings` | Project team | Yes |
      | Project Personal | `ProjectName.csproj.DotSettings.user` | User only | No |
      
      For repository policy, use the **Solution Team-Shared** layer: `YourSolution.sln.DotSettings`.
      
      ---
      
      ## File Structure
      
      `.DotSettings` files are XML with a specific namespace:
      
      ```xml
      <wpf:ResourceDictionary xml:space="preserve"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:s="clr-namespace:System;assembly=mscorlib"
          xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
          xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
      
          <!-- Settings go here -->
      
      </wpf:ResourceDictionary>
      ```
      
      ---
      
      ## Common Settings Categories
      
      ### Inspection Severity
      
      Control the severity level of specific inspections:
      
      ```xml
      <!-- Disable an inspection -->
      <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
      
      <!-- Set to warning -->
      <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToAutoProperty/@EntryIndexedValue">WARNING</s:String>
      
      <!-- Set to error -->
      <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleNullReferenceException/@EntryIndexedValue">ERROR</s:String>
      ```
      
      Severity values:
      
      | Value | Meaning |
      |-------|---------|
      | `DO_NOT_SHOW` | Disabled |
      | `HINT` | Hint (lowest) |
      | `SUGGESTION` | Suggestion |
      | `WARNING` | Warning |
      | `ERROR` | Error (highest) |
      
      ### Code Formatting
      
      Indentation and braces:
      
      ```xml
      <!-- Use tabs instead of spaces -->
      <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_STYLE/@EntryValue">TAB</s:String>
      
      <!-- Indent size -->
      <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_SIZE/@EntryValue">4</s:Int64>
      
      <!-- Brace style -->
      <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BRACES_FOR_IFELSE/@EntryValue">REQUIRED_FOR_MULTILINE</s:String>
      ```
      
      ### Naming Rules
      
      ```xml
      <!-- Private field naming: _camelCase -->
      <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IO/@EntryIndexedValue">IO</s:String>
      
      <!-- Type naming conventions -->
      <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
      ```
      
      ### File Header Template
      
      ```xml
      <s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">// Copyright (c) MyCompany. All rights reserved.
      // Licensed under the MIT License.</s:String>
      ```
      
      ---
      
      ## Custom Cleanup Profiles
      
      Define custom cleanup profiles in `.DotSettings`:
      
      ```xml
      <!-- Define a custom profile -->
      <s:String x:Key="/Default/CodeCleanup/Profiles/=MyCustomProfile/@EntryIndexedValue">&lt;Profile name="MyCustomProfile"&gt;
        &lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;
        &lt;CSOptimizeUsings&gt;
          &lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;
          &lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;
          &lt;RegionName&gt;&lt;/RegionName&gt;
        &lt;/CSOptimizeUsings&gt;
        &lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;
        &lt;CSReorderTypeMembers&gt;False&lt;/CSReorderTypeMembers&gt;
      &lt;/Profile&gt;</s:String>
      ```
      
      Use the custom profile:
      
      ```bash
      jb cleanupcode MySolution.sln --profile="MyCustomProfile"
      ```
      
      ---
      
      ## Excluding Files and Folders
      
      ### Generated Code
      
      Mark paths as generated code (skipped by many inspections):
      
      ```xml
      <s:Boolean x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=*_002Eg_002Ecs/@EntryIndexedValue">True</s:Boolean>
      <s:Boolean x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=*_002EDesigner_002Ecs/@EntryIndexedValue">True</s:Boolean>
      ```
      
      ### Skip Entire Folders
      
      ```xml
      <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGeneratedCode_002Ecs/@EntryIndexedValue">ExplicitlyExcluded</s:String>
      ```
      
      ### Suppress Warnings in Code
      
      In-code suppression (add to the generated `.DotSettings` when appropriate):
      
      ```csharp
      // ReSharper disable once UnusedMember.Global
      public void SomeMethod() { }
      
      // ReSharper disable UnusedMember.Global
      // ... multiple members
      // ReSharper restore UnusedMember.Global
      ```
      
      ---
      
      ## Complete Example
      
      Minimal team-shared settings file:
      
      ```xml
      <wpf:ResourceDictionary xml:space="preserve"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:s="clr-namespace:System;assembly=mscorlib"
          xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
          xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
      
          <!-- File header -->
          <s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">// Copyright (c) MyCompany. All rights reserved.</s:String>
      
          <!-- Treat possible null reference as error -->
          <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleNullReferenceException/@EntryIndexedValue">ERROR</s:String>
      
          <!-- Mark generated files -->
          <s:Boolean x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=*_002Eg_002Ecs/@EntryIndexedValue">True</s:Boolean>
          <s:Boolean x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=*_002EDesigner_002Ecs/@EntryIndexedValue">True</s:Boolean>
      
          <!-- Private field prefix -->
          <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
      
      </wpf:ResourceDictionary>
      ```
      
      ---
      
      ## EditorConfig Integration
      
      ReSharper respects `.editorconfig` for many settings. Prefer `.editorconfig` for settings that should apply to all tools:
      
      ```ini
      # .editorconfig
      root = true
      
      [*.cs]
      indent_style = space
      indent_size = 4
      end_of_line = lf
      charset = utf-8
      trim_trailing_whitespace = true
      insert_final_newline = true
      
      # ReSharper-specific
      resharper_csharp_braces_for_ifelse = required_for_multiline
      resharper_csharp_braces_for_for = required_for_multiline
      ```
      
      Use `.DotSettings` for settings not covered by `.editorconfig` or for ReSharper-specific features like inspection severities and custom cleanup profiles.
      
      ---
      
      ## CLI Settings Override
      
      Override settings from the command line:
      
      ```bash
      # Use a custom settings file
      jb inspectcode MySolution.sln --dotSettings=ci-strict.DotSettings -o=artifacts/inspectcode.sarif
      
      # Disable specific settings layers
      jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup" --disable-settings-layers=SolutionPersonal
      ```
      
      ---
      
      ## Best Practices
      
      1. Commit `YourSolution.sln.DotSettings` to version control.
      2. Never commit `.DotSettings.user` files (add to `.gitignore`).
      3. Keep cleanup profiles in the team-shared layer.
      4. Document the expected profile in `AGENTS.md`.
      5. Use `.editorconfig` for cross-tool settings.
      6. Use `.DotSettings` for ReSharper-specific inspection and cleanup configuration.
      7. Review settings changes in pull requests like any other code.
      
    • resharper-clt.md 3.4 KB
      # JetBrains ReSharper Command Line Tools
      
      ## What This Skill Uses
      
      This skill standardizes on the free official JetBrains package `JetBrains.ReSharper.GlobalTools`, exposed through the `jb` command.
      
      Primary commands:
      
      - `jb inspectcode`
      - `jb cleanupcode`
      
      Use this skill when the repo intentionally wants stronger ReSharper inspections and cleanup than the default SDK analyzers alone.
      
      ## Official Docs
      
      - ReSharper Command Line Tools:
        - https://www.jetbrains.com/help/resharper/ReSharper_Command_Line_Tools.html
      - CleanupCode:
        - https://www.jetbrains.com/help/resharper/CleanupCode.html
      - InspectCode:
        - https://www.jetbrains.com/help/resharper/InspectCode.html
      
      ## Installation Paths
      
      Preferred repo-local install for reproducible CI:
      
      ```bash
      dotnet new tool-manifest
      dotnet tool install JetBrains.ReSharper.GlobalTools
      dotnet tool restore
      ```
      
      Global fallback:
      
      ```bash
      dotnet tool install --global JetBrains.ReSharper.GlobalTools
      ```
      
      Verify the commands:
      
      ```bash
      jb inspectcode --help
      jb cleanupcode --help
      ```
      
      ## Shared Settings
      
      If the repo uses ReSharper CLI as a real gate, keep durable settings in the solution team-shared layer and commit the resulting file:
      
      - `YourSolution.sln.DotSettings`
      
      This is where cleanup profiles and many inspection settings become durable for the rest of the team.
      
      Do not rely on user-specific settings files for repo policy.
      
      ## InspectCode
      
      Use `InspectCode` to surface problems that must then be fixed.
      
      Basic run:
      
      ```bash
      jb inspectcode YourSolution.sln -o=artifacts/inspectcode.sarif
      ```
      
      Important details from the official docs:
      
      - starting with ReSharper 2024.1, SARIF is the default output format
      - XML is still available through `-f="xml"`
      - output path is controlled through `-o` or `--output`
      
      Examples:
      
      ```bash
      jb inspectcode YourSolution.sln -o=artifacts/inspectcode.sarif
      jb inspectcode YourSolution.sln -f=Html -o=artifacts/inspectcode.html
      jb inspectcode YourSolution.sln -f=Xml -o=artifacts/inspectcode.xml
      ```
      
      Use `InspectCode` before and after cleanup or code fixes so you can prove the issue count actually moved in the right direction.
      
      ## CleanupCode
      
      Use `CleanupCode` to apply a selected cleanup profile over a solution, project, or bounded file set.
      
      Solution-wide run:
      
      ```bash
      jb cleanupcode YourSolution.sln --profile="Built-in: Full Cleanup"
      ```
      
      Focused reformat-only run:
      
      ```bash
      jb cleanupcode YourSolution.sln --profile="Built-in: Reformat Code"
      ```
      
      Useful profile options from the official docs:
      
      - `Built-in: Full Cleanup`
      - `Built-in: Reformat Code`
      - `Built-in: Reformat & Apply Syntax Style`
      
      Useful scope controls:
      
      - `--include`
      - `--exclude`
      
      Example:
      
      ```bash
      jb cleanupcode YourSolution.sln --profile="Built-in: Reformat & Apply Syntax Style" --include="src/**/*.cs"
      ```
      
      Important official note:
      
      - build the solution first when running solution-wide cleanup, otherwise binary references may not resolve correctly
      
      ## Recommended Flow
      
      1. Build the solution in `Release`.
      2. Run `jb inspectcode`.
      3. Fix or clean up the surfaced issues.
      4. Run `jb cleanupcode` with an explicit profile.
      5. Run `jb inspectcode` again.
      6. Run the repo's analyzers and tests.
      
      ## Gate Policy
      
      If the repo enables ReSharper CLI as a quality gate:
      
      - surfaced issues are not informational only
      - the task is not done while the agreed blocking issues remain
      - cleanup must be followed by tests and broader verification
      
      Do not stop at generating a SARIF file.
      
  • SKILL.md 5.8 KB
    ---
    name: dotnet-resharper-clt
    version: "1.0.0"
    category: "Code Quality"
    description: "Use the free official JetBrains ReSharper Command Line Tools for .NET repositories. Use when a repo wants powerful `jb inspectcode` inspections, `jb cleanupcode` cleanup profiles, solution-level `.DotSettings` enforcement, or a stronger CLI quality gate for C# than the default SDK analyzers alone."
    compatibility: "Requires a .NET solution or project; works best when the repo keeps shared ReSharper settings in solution `.DotSettings` files and records exact commands in `AGENTS.md`."
    ---
    
    # ReSharper Command Line Tools
    
    ## Trigger On
    
    - the repo uses or wants ReSharper Command Line Tools
    - the team wants `jb inspectcode` or `jb cleanupcode`
    - the user asks for stronger C# inspections, cleanup profiles, or ReSharper-based CI gates
    
    ## 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
    
    - replacing tests with inspection output
    - ad-hoc formatting-only work when the repo intentionally standardizes on another formatter
    - repos that do not want JetBrains settings or CLT-based gates in their workflow
    
    ## Inputs
    
    - the nearest `AGENTS.md`
    - the target `.sln`, `.csproj`, or bounded file set
    - repo-root `.editorconfig`
    - solution shared settings such as `YourSolution.sln.DotSettings`
    
    ## Quick Start
    
    1. Read the nearest `AGENTS.md` and confirm scope and constraints.
    2. Run this skill's `Workflow` through the `Ralph Loop` until outcomes are acceptable.
    3. Return the `Required Result Format` with concrete artifacts and verification evidence.
    
    ## Workflow
    
    1. Prefer solution-level runs when possible so ReSharper can resolve references and apply full inspections.
    2. Build the solution before `jb cleanupcode` when working at solution scope.
    3. Use `jb inspectcode` first to surface issues before editing anything broad.
    4. Treat surfaced issues as mandatory fixes when this gate is enabled for the repo; do not just dump a report and stop.
    5. Use `jb cleanupcode` with an explicit cleanup profile:
       - `Built-in: Full Cleanup`
       - `Built-in: Reformat Code`
       - `Built-in: Reformat & Apply Syntax Style`
       - or a checked-in custom profile
    6. Keep durable ReSharper settings in the team-shared solution layer and commit the solution `.DotSettings` file when policy changes.
    7. Re-run `jb inspectcode` after cleanup or fixes, then run the repo's normal quality pass and tests.
    
    ## Bootstrap When Missing
    
    If ReSharper Command Line Tools are not available yet:
    
    1. Detect current state:
       - `rg --files -g '.config/dotnet-tools.json' -g '*.sln.DotSettings'`
       - `dotnet tool list --local`
       - `dotnet tool list --global`
       - `command -v jb`
    2. Choose the install path deliberately:
       - preferred repo-local install for reproducible CI:
         - `dotnet new tool-manifest` (if missing)
         - `dotnet tool install JetBrains.ReSharper.GlobalTools`
       - global fallback:
         - `dotnet tool install --global JetBrains.ReSharper.GlobalTools`
    3. Verify the installed commands resolve correctly:
       - `jb inspectcode --help`
       - `jb cleanupcode --help`
    4. Record exact commands in `AGENTS.md`, for example:
       - `dotnet build MySolution.sln -c Release`
       - `jb inspectcode MySolution.sln -o=artifacts/inspectcode.sarif`
       - `jb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"`
    5. If the repo needs stable settings, save them into the solution team-shared layer and commit `YourSolution.sln.DotSettings`.
    6. Run `jb inspectcode` once, fix or triage the surfaced issues, rerun it, and return `status: configured` or `status: improved`.
    7. If the repo intentionally excludes ReSharper CLT from its toolchain, return `status: not_applicable`.
    
    ## Deliver
    
    - explicit `jb inspectcode` and `jb cleanupcode` commands
    - durable ReSharper settings in shared solution config
    - a quality gate that surfaces issues which are then fixed, not ignored
    
    ## Validate
    
    - the target solution or project builds before solution-wide cleanup
    - `jb inspectcode` output is reviewed and acted on
    - cleanup profiles and shared settings are explicit
    - tests and the wider quality pass still run after ReSharper-driven fixes
    
    ## Ralph Loop
    
    Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
    
    1. Plan first (mandatory):
       - analyze current state
       - define target outcome, constraints, and risks
       - write a detailed execution plan
       - list final validation skills to run at the end, with order and reason
    2. Execute one planned step and produce a concrete delta.
    3. Review the result and capture findings with actionable next fixes.
    4. Apply fixes in small batches and rerun the relevant checks or review steps.
    5. Update the plan after each iteration.
    6. Repeat until outcomes are acceptable or only explicit exceptions remain.
    7. If a dependency is missing, bootstrap it or return `status: not_applicable` with explicit reason and fallback path.
    
    ### Required Result Format
    
    - `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`
    - `plan`: concise plan and current iteration step
    - `actions_taken`: concrete changes made
    - `validation_skills`: final skills run, or skipped with reasons
    - `verification`: commands, checks, or review evidence summary
    - `remaining`: top unresolved items or `none`
    
    For setup-only requests with no execution, return `status: configured` and exact next commands.
    
    ## Load References
    
    - `references/resharper-clt.md`
    - `references/commands.md`
    - `references/config.md`
    
    ## Example Requests
    
    - "Add ReSharper CLI inspections to this .NET repo."
    - "Run InspectCode and fix what it finds."
    - "Set up CleanupCode with a shared profile."
    - "Use JetBrains ReSharper command line tools in CI."
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related