CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

error-consolidation-setup

Creates or extends a consolidated C# compiler diagnostic article, TOC entry, and optional seed-code metadata. Use to start an error-consolidation workflow.

Quality

80%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./.github/skills/error-consolidation-setup/SKILL.md
SKILL.md
Quality
Evals
Security

Set Up an Error Consolidation Article

Create a new consolidated compiler error and warning article, or extend an existing destination. Do not merge existing articles or search for additional diagnostics in this skill. Use the user's prepared branch and leave changes uncommitted for review unless instructed otherwise.

Required Inputs

Collect these inputs from the user:

  • Destination filename: The new or existing .md filename, such as overloaded-operator-errors.md.
  • Theme description: A short description, such as "overflow, underflow, and checked and unchecked operators."
  • Seed error codes (optional): New, undocumented error codes to include initially.

Step 1: Ask for TOC Placement

First check whether the destination and its TOC entry already exist. Reuse an existing entry when it fits the approved theme; don't ask for placement again or create a duplicate entry. Preserve the existing article, metadata, anchors, and diagnostic ownership while adding approved seed codes.

For a new entry, ask the user:

Where in the TOC should this entry be placed? Provide the name or href of the existing entry it should appear after.

Stop and wait for the answer before making any changes.

Step 2: Create the Destination File

If the destination exists, don't replace it with a skeleton. Continue with the approved additions.

Create docs/csharp/language-reference/compiler-messages/{destination-filename} with this front matter:

---
title: "Resolve errors and warnings related to {theme description}"
description: "This article helps you diagnose and correct compiler errors and warnings related to {theme description}"
f1_keywords:
  # populated from seed error codes, sorted numerically
helpviewer_keywords:
  # populated from seed error codes, sorted numerically
ms.date: {today's date in MM/DD/YYYY format}
ai-usage: ai-assisted
---

Add this body:

# Resolve errors and warnings for {short theme title}

This article covers the following compiler errors and warnings:

<!-- The text in this list generates issues for Acrolinx, because they don't use contractions.
That's by design. The text closely matches the text of the compiler error / warning for SEO purposes.
 -->

Step 3: Add the TOC Entry

For a new entry, add it to docs/csharp/language-reference/toc.yml immediately after the entry the user specified. Match neighboring indentation and style. For an existing entry, update only approved keywords and codes without duplicating it.

- name: {Short theme title}
    href: ./compiler-messages/{destination-filename}
    displayName: >
      {theme keywords},
      {CS codes sorted numerically, comma-separated}

Step 4: Populate Seed Error Codes

If the user supplied seed codes, process all of them as one batch.

For each code:

  1. Extract its numeric portion. For example, CS0220 becomes 220.
  2. Find the constant assigned that number in ../roslyn/src/Compilers/CSharp/Portable/Errors/ErrorCode.cs.
  3. Find the <data> element in ../roslyn/src/Compilers/CSharp/Portable/CSharpResources.resx whose name exactly matches the constant name, including its prefix, such as ERR_, WRN_, or FTL_.
  4. Read the verbatim compiler message from the element's <value> child.

An uncommented ErrorCode.cs entry is the authority for inclusion; a missing emitting reference isn't grounds to exclude it. Don't invent a current reproduction. Flag commented-out or absent entries for review instead of adding new discovery metadata for them. If a resource is missing, report that limitation rather than inventing message text.

Then:

  • Add every code to f1_keywords and helpviewer_keywords, sorted numerically.

  • Add every code to the article's master error list, sorted numerically:

    - [**CS{NNNN}**](#anchor-tbd): *{verbatim error message}*
  • Use #anchor-tbd until the consolidation phase assigns thematic anchors.

  • Replace Roslyn format placeholders such as '{0}' and '{1}' with descriptive terms while preserving the static message text and producing a coherent sentence. Prefer context-appropriate generic terms such as 'type', 'value', 'operator', 'member', or 'method'. For example, Constant value '{0}' cannot be converted to a '{1}' becomes Constant value 'value' cannot be converted to a 'type'. Use the following XML <comment> element, when present, to identify placeholder meanings.

  • Add every code to the TOC entry's displayName, sorted numerically.

  • Remove every code from f1_keywords in docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md.

Step 5: Present for Review

Stop and present:

  1. The full destination file content.
  2. The new TOC entry.
  3. A summary of codes removed from the catch-all file.

Wait for user approval before ending. Do not merge existing articles or search for additional diagnostics; those are separate skills.

Repository

dotnet/docs

Path

.github/skills/error-consolidation-setup/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.