Skip to content

Add C# Guidelines AI agent skill#400

Merged
dennisdoomen merged 4 commits into
mainfrom
dennisdoomen/add-csharp-guidelines-skill
May 15, 2026
Merged

Add C# Guidelines AI agent skill#400
dennisdoomen merged 4 commits into
mainfrom
dennisdoomen/add-csharp-guidelines-skill

Conversation

@dennisdoomen
Copy link
Copy Markdown
Owner

Summary

Adds a new Copilot AI agent skill (Skills/csharp-guidelines/) that captures all of the coding and design guidelines defined in this repository. The skill is designed to be invoked by an AI agent when writing, reviewing or refactoring C# code.

Structure

Skills/
  csharp-guidelines/
    SKILL.md                     ← agent entry point (frontmatter + 11 summary tables)
    references/
      general.md                 ← AV0100 series (NEW)
      class-design.md            ← AV1000 series
      member-design.md           ← AV1100 series (incl. C# 14: AV1145, AV1150, AV1155)
      misc-design.md             ← AV1200 series
      maintainability.md         ← AV1500 series (incl. AV1582, AV1585)
      testability.md             ← AV1600 series (NEW)
      naming.md                  ← AV1700 series
      performance.md             ← AV1800 series
      framework.md               ← AV2200 series (incl. AV2225)
      documentation.md           ← AV2300 series (incl. AV2308)
      layout.md                  ← AV2400 series

Key highlights

  • SKILL.md has YAML frontmatter with user-invocable: true and a comprehensive description so agents know when to apply it. Each section is a compact summary table linking to the relevant reference file.
  • 11 reference files contain the full rule text, rationale and code examples for every rule, so agents can look up details when needed.
  • Newly included sections not present in earlier skill drafts:
    • AV0100 series (General principles: KISS, YAGNI, DRY, AI code review)
    • AV1600 series (Testability: test naming, Specs suffix, builders, public API testing)
  • New and updated rules accurately reflected:
    • AV1145 / AV1150 / AV1155 — C# 14 extension members, local function guidance, field keyword
    • AV1500 — correctly states 15 statements (not 7)
    • AV1582 — raw string literals (C# 11+)
    • AV1585 — required properties (C# 11+)
    • AV2202 — updated with C# 14 null-coalescing assignment example
    • AV2225 — deconstruction rule
    • AV2308 — document purpose not implementation
    • AV1755 — nuanced async suffix rule ("only when both sync and async variants exist")

Introduces a new Copilot agent skill under Skills/csharp-guidelines/
that captures all coding and design guidelines from this repository.

- SKILL.md: entry point with YAML frontmatter (user-invocable), severity
  legend, and one summary table per guideline category with rule IDs,
  severity levels and one-line descriptions.
- 11 reference files under references/ with full rule text, code examples
  and rationale — one file per category:
    general, class-design, member-design, misc-design, maintainability,
    testability, naming, performance, framework, documentation, layout.

Highlights:
- Includes new rules introduced since the last published version:
  AV0100-series (General), AV1600-series (Testability), AV1145/1150/1155
  (C# 14 extension members, local functions, field keyword), AV2225
  (deconstruction), AV2308 (document purpose not implementation),
  AV1582 (raw string literals), AV1585 (required properties).
- AV1500 correctly states the 15-statement limit (not 7).
- AV1755 correctly documents the nuanced async suffix rule.
- AV2202 updated with C# 14 null-coalescing assignment example.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dennisdoomen and others added 2 commits May 15, 2026 08:29
SKILL.md is now a lean index with section links only.
All 11 reference files reduced to a single-line description
per rule — no code examples, no copied guideline text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dennisdoomen dennisdoomen changed the base branch from develop to main May 15, 2026 07:50
Each rule ID now hyperlinks to its section on
https://csharpcodingguidelines.com.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dennisdoomen dennisdoomen merged commit 90792b3 into main May 15, 2026
@dennisdoomen dennisdoomen deleted the dennisdoomen/add-csharp-guidelines-skill branch May 15, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant