/writing-csharp
Idiomatic C# /.NET development. Use when writing C# code, changing `.csproj`
$ npx -y skills add alexei-led/cc-thingz --skill writing-csharp --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/writing-csharp
Context preview
The summary Claude sees to decide when to auto-load this skill.
Idiomatic C# /.NET development. Use when writing C# code, changing `.csproj`
SKILL.md
writing-csharp.SKILL.mddescription: Idiomatic C# /.NET development. Use when writing C# code, changing `.csproj`
or `.sln`, or working on ASP.NET Core apps, libraries, CLIs, workers, and xUnit/NUnit/MSTest
suites. Emphasizes nullable references, async/await, LINQ discipline, boundary validation,
focused `dotnet` feedback, and minimal dependencies. NOT for Go, Python, TypeScript,
shell scripts, or infra-only work.
name: writing-csharp
C# /.NET Development
Use only for C# and .NET code. Follow the project's SDK, target frameworks, nullable settings, analyzer config, test stack, and local conventions.
Read First
Read [principles.md](references/principles.md) before writing, changing, or reviewing C# code. Read conditional references only when the change touches that area.
Conditional References
- [patterns.md](references/patterns.md) — solution layout, ASP.NET Core boundaries, DI, EF access, config, and worker patterns.
- [testing.md](references/testing.md) — adding or reshaping xUnit, NUnit, or MSTest coverage; keep the local `dotnet test` loop fast.
- [linting.md](references/linting.md) — changing `dotnet format`, analyzers, warning policy, or slow verification flow.
- [cli.md](references/cli.md) — writing or changing .NET CLIs.
Project Baseline
- Inspect the nearest `*.csproj`, `Directory.Build.props`, `global.json`, solution file, CI, and nearby code before using SDK- or framework-specific APIs.
- Keep nullable reference types enabled. Fix the warning or model, not the warning level.
- Prefer the BCL and existing NuGet packages before adding a dependency.
- Use the existing app style: ASP.NET Core controllers vs minimal APIs, records vs classes, MediatR or no mediator, EF or raw SQL, and the configured test framework.
Comments and XML Docs
- Use XML documentation comments for public APIs when the project emits API docs or enforces CS1591.
- Summarize contracts, invariants, edge cases, and effects. Do not restate member names or signatures.
- Use `//` for brief implementation notes; avoid long `/* */` explanations.
- Keep comments short. Move longer rationale to docs, issue links, or design notes.
- Do not comment obvious code.
- Keep tests readable without comments; add one only for unobvious fixtures, timing, concurrency, external services, or regression context.
Verification
Run focused `dotnet` checks while editing, then the project-configured build, tests, analyzers, and formatting checks before final output. Prefer the narrowest useful project or solution target for the hot loop, then the broader configured command before final output.
If a check is unavailable, state that and run the closest configured gate. If a check fails, quote the failure, diagnose the cause, fix one issue, and rerun the relevant check.
Failure Cases
- No clear .NET root: locate the nearest `*.csproj` or containing `*.sln` before choosing files or commands.
- Unknown SDK or language level: inspect `TargetFramework`, `TargetFrameworks`, `LangVersion`, `global.json`, CI, and lockfiles before using newer APIs or syntax.
- New package requested: confirm the BCL or existing packages cannot meet the requirement.
- Broad or risky edit: state the risk and ask before acting. Do not run destructive commands.
Final Response
Include:
- changed files
- checks run and results
- checks skipped with reasons
- remaining risks or follow-ups
Read more
description: Idiomatic C# /.NET development. Use when writing C# code, changing `.csproj` or `.sln`, or working on ASP.NET Core apps, libraries, CLIs, workers, and xUnit/NUnit/MSTest suites. Emphasizes nullable references, async/await, LINQ discipline, boundary validation, focused `dotnet` feedback, and minimal dependencies. NOT for Go, Python, TypeScript, shell scripts, or infra-only work. name: writing-csharp
C# /.NET Development
Use only for C# and .NET code. Follow the project's SDK, target frameworks, nullable settings, analyzer config, test stack, and local conventions.
Read First
Read [principles.md](references/principles.md) before writing, changing, or reviewing C# code. Read conditional references only when the change touches that area.
Conditional References
- [patterns.md](references/patterns.md) — solution layout, ASP.NET Core boundaries, DI, EF access, config, and worker patterns.
- [testing.md](references/testing.md) — adding or reshaping xUnit, NUnit, or MSTest coverage; keep the local `dotnet test` loop fast.
- [linting.md](references/linting.md) — changing `dotnet format`, analyzers, warning policy, or slow verification flow.
- [cli.md](references/cli.md) — writing or changing .NET CLIs.
Project Baseline
- Inspect the nearest `*.csproj`, `Directory.Build.props`, `global.json`, solution file, CI, and nearby code before using SDK- or framework-specific APIs.
- Keep nullable reference types enabled. Fix the warning or model, not the warning level.
- Prefer the BCL and existing NuGet packages before adding a dependency.
- Use the existing app style: ASP.NET Core controllers vs minimal APIs, records vs classes, MediatR or no mediator, EF or raw SQL, and the configured test framework.
Comments and XML Docs
- Use XML documentation comments for public APIs when the project emits API docs or enforces CS1591.
- Summarize contracts, invariants, edge cases, and effects. Do not restate member names or signatures.
- Use `//` for brief implementation notes; avoid long `/* */` explanations.
- Keep comments short. Move longer rationale to docs, issue links, or design notes.
- Do not comment obvious code.
- Keep tests readable without comments; add one only for unobvious fixtures, timing, concurrency, external services, or regression context.
Verification
Run focused `dotnet` checks while editing, then the project-configured build, tests, analyzers, and formatting checks before final output. Prefer the narrowest useful project or solution target for the hot loop, then the broader configured command before final output.
If a check is unavailable, state that and run the closest configured gate. If a check fails, quote the failure, diagnose the cause, fix one issue, and rerun the relevant check.
Failure Cases
- No clear .NET root: locate the nearest `*.csproj` or containing `*.sln` before choosing files or commands.
- Unknown SDK or language level: inspect `TargetFramework`, `TargetFrameworks`, `LangVersion`, `global.json`, CI, and lockfiles before using newer APIs or syntax.
- New package requested: confirm the BCL or existing packages cannot meet the requirement.
- Broad or risky edit: state the risk and ask before acting. Do not run destructive commands.
Final Response
Include:
- changed files
- checks run and results
- checks skipped with reasons
- remaining risks or follow-ups
Portable skills, agents, hooks, and Pi-native extensions for Claude Code, Codex CLI, GitHub Copilot, Cursor, Grok, and Pi. Gemini is retired.
Repo: alexei-led/cc-thingz
Other skills on cc-thingz.
- /browser-automation
Use this for browser exploration, validation, screenshots, recordings, frontend debugging, accessibility checks, and E2E/user-flow testing. Do not delete, reset, or mutate non-test data without explicit user confirmation.
Open skill - /playwright-skill
Support-only helper for `browser-automation`. Provides Playwright primitives: dev-server detection, a script runner (`scripts/run.js`), screenshot CLIs, and helper utilities (`scripts/lib/helpers.js`).
Open skill - /committing-code
Scope: inspect changes, group them, and create normal commits only. Do not rewrite history, amend existing commits, force-push, or stage secrets. Ground the proposal in git status, diff, and recent log output.
Open skill - /documenting-code
Scope: documentation files, agent instruction files, and useful code comments only. Not for code-quality review; use `reviewing-code` for that.
Open skill - /fixing-code
Follow the base skill. This Claude overlay only defines tool use and execution details.
Open skill - /improving-tests
Follow the base skill. This Claude overlay only defines tool use and execution details.
Open skill

