senrecep/csharpessentials/csharpessentials-any
Claude Code and agent skill by senrecep/csharpessentials
- community
Checking that the SKILL.md file is still in the repository.
Use when a method can return one of several distinct types. Covers Any<T0,T1> through Any<T0,…,T7> as a type-safe discriminated union, implicit assignment from any branch type, Match()/Switch() with one handler per branch, IsFirst/GetFirst, Is/As/TryAs, and Partition/Traverse for sequences.
Install
npx vskill@latest install senrecep/csharpessentials/csharpessentials-anySKILL.md
CSharpEssentials.Any
Any<T0,T1,...> is a discriminated union: a value that is exactly one of several possible types at runtime. Replaces object-typed returns and eliminates unsafe casting.
Installation
Namespace
Creating Any
Two type arguments of the same type (Any<int, int>) make the implicit conversion ambiguous (CS0457). Index is the active branch (0 for the first type) and Value its object? value.
Match and Switch
Type Inspection
Collections
Typical Usage: service return type
Best Practices
- Use
Any<T0,T1>overResult<T>when the error branches carry distinct, typed data - Pass a handler for every branch to
Match()/Switch(); a missing handler is not a compile error, it returnsNotExecuted IsFirst/GetFirst()orTryAs<…>()are the escape hatch for cases whereMatch()is too verbose- Avoid
object-typed union members; they defeat the purpose - A union serializes to JSON as
{"Index":n,"Value":...}and deserializes back to the same branch
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.well-known/agent-skills/csharpessentials-any/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/senrecep/csharpessentials/csharpessentials-any)