/dotnext-skills:dotnext-corefrom .NEXT
Provides core types from the DotNext NuGet package: Optional<T> and Result<T> monads, Timestamp, EnumType attribute lookup, ConsoleLifetimeTokenSource, TypeMap, LocalReference, and UserData.
Ships in .NEXT. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
DotNext the project references (.csproj or
Directory.Packages.props). This skill describes 6.x. For older versions, verify each
member you use against the XML docs/IntelliSense of the referenced version.DotNext.Diagnostics.Timestamp). Add the using for that namespace and use the short type name in code.DotNext.Optional<T> monad to express value absence in a unified way for both reference and value types.
System.Text.Json serialization via DotNext.Text.Json.OptionalConverterFactory converter. Use DotNext.Text.Json.OptionalConverter<T> explicitly for AOT and self-contained deployment.Optional<T> is undefined, so WhenWritingDefault drops it. Without JsonIgnore, the converter throws InvalidOperationException for undefined value.
[JsonConverter(typeof(OptionalConverterFactory))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Optional<int> IntegerValue { get; set; }
IsNull) is not undefined. It is written as JSON null.AsyncEnumerable.Flatten and Collection.Flatten in DotNext.Collections.Generic extension methods can be used to filter out the empty values in a sequence.DotNext.Result<T> monad to express error or successful result as a return type in synchronous methods
Task<Result<T>> or Result<Task<T>> wrapping. Task<T> in asynchronous code provides the same semantics: it can represent error or task result on successDotNext.Diagnostics.Timestamp value type for time measurements instead of System.Diagnostics.Stopwatch class or raw long values returned by Stopwatch.GetTimestamp().
Elapsed, ElapsedMilliseconds and ElapsedTicks give the time passed since the timestamp was taken.timestamp + timeout produces a deadline that can be checked with IsPast or IsFuture.GetElapsedTime, GetElapsedTicks, GetElapsedMilliseconds) have overloads that accept System.TimeProvider, so the code can be tested with a fake time provider. Elapsed*, IsPast and IsFuture properties always use the system clock.DotNext.Reflection.EnumType extensions to obtain a custom attribute for the enum field. This approach is AOT compatible.Microsoft.Extensions.Hosting), DotNext.Hosting.ConsoleLifetimeTokenSource can be used to get cancellation token associated with the console application lifetime. It gets canceled on SIGINT (Ctrl+C), SIGQUIT or SIGTERM signal (SIGTERM is sent by docker stop and Kubernetes).
ConsoleLifetimeTokenSource.IsSupported in cross-platform code.using. Dispose removes the signal handlers.DotNext.Collections.Specialized.TypeMap<TValue> or DotNext.Collections.Specialized.ConcurrentTypeMap<TValue> classes to replace System.Collections.Generic.Dictionary<System.Type, TValue> when keys are known at compile time. These specialized maps provide O(1) lookup.
map.Set<string>(value), map.TryGetValue<string>(out var value). A System.Type instance obtained at runtime cannot be used as a key.TypeMap<TValue> is not thread-safe. Use ConcurrentTypeMap<TValue> for concurrent access.DotNext.LocalReference<T> or DotNext.ReadOnlyLocalReference<T> if you need a ref field pointing to a ref struct (C# doesn't allow ref fields of ref struct type), or you need to represent managed pointer in generic context.DotNext.BasicExtensions.UserData extension property to attach arbitrary values to the objects instead of maintaining System.Runtime.CompilerServices.ConditionalWeakTable<TKey, TValue> manually.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dotnext, monads, optional, result, json-serialization, console-shutdown
4 skills in this plugin
/dotnext-concurrencyConcurrent data structures and allocation-free async building blocks from the DotNext.Threading NuGet package - AsyncLazy, TaskCompletionPipe, reusable ValueTaskCompletionSource, CancellationTokenMultiplexer, AsyncCounter (throttling), AsyncStateTracker, distributed leases, BoundedObjectPool and the SIEVE-based RandomAccessCache (managed and unmanaged-memory variants). Use when replacing Lazy<T> or Lazy<Task<T>> with async initialization; when reducing allocations of TaskCompletionSource, linked CancellationTokenSource or Task.WhenEach in hot paths; when implementing rate limiting, change notification streams, an object pool, an LRU/concurrent cache (including a large cache that puts pressure on GC), or a distributed lease./dotnext-memoryAllocation-free memory routines from the DotNext and DotNext.Unsafe NuGet packages - SpanOwner (safe stackalloc with pooled fallback), BufferWriterSlim (stack-allocated StringBuilder/buffer replacement with string interpolation), PoolingBufferWriter, PoolingArrayBufferWriter, SparseBufferWriter, and the MemoryAllocator abstraction over ArrayPool, plain arrays and unmanaged memory. Use when reducing allocations in .NET hot paths; when stackalloc length comes from input; when replacing StringBuilder, MemoryStream, RecyclableMemoryStream, ArrayBufferWriter or manual ArrayPool rent/return code; or when making the memory allocation strategy configurable.npx claudepluginhub dotnet/dotnext --plugin dotnext-skillsOther plugins' skills for the same job