Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser/writer options, and low-allocation row/column workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted f
.claude/skills/managedcode-sep/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 203% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 34% | 0% |
dotnet add package Sepdotnet add package Sep --version <version><PackageReference Include="Sep" Version="x.y.z" />mermaidflowchart LR A[Input source: file/text/stream] --> B[Sep.Reader or Sep.New(...).Reader] B --> C[SepReaderOptions] C --> D[Rows -> Cols -> Span/Parse] D --> E[Transform and validate] E --> F[SepWriter via SepWriterOptions] F --> G[To file/text output]
;, ,, tab, custom) or infer from first rowSep.Reader(...) and explicit options only where needed:Sep.Reader() for inferred separator from header-like first rowSep.New(',').Reader(...) for explicit separator modeSep.Reader(o => o with { HasHeader = false }) if header is absentReadOnlySpan<char> first, convert only when needed.reader.Spec.Writer() when you need the same separator/culture as input.Sep.Writer(...) and SepWriterOptions (WriteHeader, Escape, DisableColCountCheck).await foreach over async reader rows.ParallelEnumerate for CPU-heavy transformations only after benchmarking single-threaded baseline.csharpusing var reader = Sep.Reader(o => o with { HasHeader = true, Unescape = true, Trim = SepTrim.Both }).FromText(data); foreach (var row in reader) { var id = row["Id"].Parse<int>(); var name = row[1].ToString(); // process row }
csharpusing var reader = Sep.Reader().FromFile("input.csv"); using var writer = reader.Spec.Writer().ToFile("output.csv"); foreach (var row in reader) { using var writeRow = writer.NewRow(row); writeRow["Amount"].Format(row["Amount"].Parse<double>() * 1.2); }
csharpvar text = "A;B\n1;hello\n"; using var reader = await Sep.Reader().FromTextAsync(text); await using var writer = reader.Spec.Writer().ToText(); await foreach (var row in reader) { await using var writeRow = writer.NewRow(row); var normalized = row["B"].ToString().ToUpperInvariant(); writeRow["B"].Set(normalized); }
HasHeader = truerow["ColName"]HasHeader = falserow[0], row[1]reader.Spec.Writer() to preserve inference and formatting contractParse<T> in hot paths to avoid extra allocations.ToString/format conversions at the edge (presentational layers), not in inner loops.Unescape, Trim, and DisableQuotesParsing settings deliberately and test with realistic samples.ParallelEnumerate where appropriate.SepReader.Row and SepWriter.Row are ref structs:SepReader row iteration is row-by-row by design; it is intentionally not the same as a classic collection model.dotnet add package Sep installs correctly and project compilesOther measured skills in the registry, with their headline benchmark lift.