dotnet-sep

Parse and write separated-value files in .NET using the Sep library.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-sep-zhenpenglai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-sep
Source: https://github.com/zhenpengLai/myuseskill/tree/main/dotnet-sep
Command: npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-sep-zhenpenglai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Reading and writing CSV, TSV, and other delimited files in .NET often involves tradeoffs between allocation overhead, parsing correctness, and configuration control. This Skill provides guidance for using the Sep library to handle separated-value data with explicit reader/writer options, low-allocation span-based APIs, and support for header inference, trimming, unescaping, and async pipelines. ## Core Features & Use Cases - High-performance reading: Parse delimited files with Sep.Reader, access columns as ReadOnlySpan<char>, and convert values with Parse<T> only when needed. - Controlled writing: Generate output with SepWriterOptions, round-trip input specs via reader.Spec.Writer(), and control header, escaping, and column-count behavior. - Async and parallel workflows: Use async readers/writers on .NET 9+ and apply ParallelEnumerate for CPU-heavy transformations after benchmarking. - Use Case: An ETL pipeline reads a large CSV file, transforms numeric columns, and writes normalized output while preserving the original separator and culture settings. ## Quick Start Ask the AI to add the Sep NuGet package to your .NET project and write code that reads a CSV file with Sep and writes the transformed rows to a new file.

Frequently Asked Questions about dotnet-sep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read a CSV file in .NET with Sep?▼

Install the Sep NuGet package, then create a reader with Sep.Reader() and call FromFile or FromText. Iterate rows with foreach and access columns by name with row["ColName"] or by index, using Parse<T> for typed values.

How do I write CSV output with Sep in .NET?▼

Create a writer with Sep.Writer(...) or reuse input settings via reader.Spec.Writer(), then call ToFile or ToText. For each input row, call writer.NewRow(row) and set or format column values before the row is disposed.

Sep vs CsvHelper for .NET CSV parsing?▼

Sep focuses on zero-allocation, span-based parsing for performance-sensitive workloads, while CsvHelper offers a more conventional object-mapping model. Sep is frequently benchmarked against CsvHelper and suits high-throughput pipelines rather than drop-in replacement scenarios.

Does Sep support async reading and writing?▼

Yes, Sep provides async APIs such as FromTextAsync and await foreach over reader rows. Async row iteration requires C# 13 and .NET 9 or later, and writers support await using for asynchronous disposal.

What are the limitations of Sep row and column types?▼

SepReader.Row and SepWriter.Row are ref structs, so they cannot be stored beyond their immediate scope or used in async buffering patterns. Materialize values with ToString or Parse<T> if you need random access or LINQ-style collection behavior.