Agent skill

Corvus Parsed Documents And Memory

by corvus-dotnet in corvus-dotnet/Corvus.JsonSchema

Parse JSON into pooled-memory documents and manage memory correctly in the Corvus.Text.Json library.

Apache-2.0Auto-check passedDevelopment

Install Corvus Parsed Documents And Memory

skills CLI
$ npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-parsed-documents-and-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install corvus-dotnet/Corvus.JsonSchema corvus-parsed-documents-and-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/corvus-dotnet/Corvus.JsonSchema.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/corvus-parsed-documents-and-memory .claude/skills/corvus-parsed-documents-and-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
corvus-parsed-documents-and-memory
GitHub stars
199
Token cost
~1.2k tokens
SKILL.md length
322 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
Apache-2.0

At a glance

Parse JSON into pooled-memory documents and manage memory correctly in the Corvus.Text.Json library.

  • Understanding the memory model
  • SKILL.md covers Core Abstractions, Parsing Overloads, stackalloc / ArrayPool Rent… and UTF-8 Transcoding Helpers, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Writing allocation-efficient code

What it does

Corvus Parsed Documents And Memory is an agent skill from corvus-dotnet/Corvus.JsonSchema. Parse JSON into pooled-memory documents and manage memory correctly in the Corvus.Text.Json library. Covers ParsedJsonDocument, IJsonDocument, the IJsonElement CRTP pattern, the stackalloc/ArrayPool rent pattern with JsonConstants thresholds, UTF-8 transcoding helpers, and disposal requirements. USE FOR: parsing JSON, understanding the memory model, writing allocation-efficient code, handling UTF-8/UTF-16 transcoding, understanding the IJsonElement type system. DO NOT USE FOR: mutable documents (use…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. The repository describes itself as: Support for Json Schema validation and entity generation. The licence is Apache-2.0.

When your agent uses it

  • Understanding the memory model
  • Writing allocation-efficient code
  • Handling UTF-8/UTF-16 transcoding
  • Understanding the IJsonElement type system

Example prompts

  • “/corvus-parsed-documents-and-memory”

What it can do on your machine

Read from SKILL.md and the folder at commit 973097f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Corvus Parsed Documents And Memory loads about 1.2k tokens when it runs. Until then it costs about 151 tokens; SKILL.md has 322 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~151
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from corvus-dotnet/Corvus.JsonSchema at commit 973097f, republished under its Apache-2.0 licence (© corvus-dotnet). 322 words, ~1,224 tokens.

Download SKILL.mdSave it as .claude/skills/corvus-parsed-documents-and-memory/SKILL.md (or your agent's skills folder).
name
corvus-parsed-documents-and-memory
description
Parse JSON into pooled-memory documents and manage memory correctly in the Corvus.Text.Json library. Covers ParsedJsonDocument, IJsonDocument, the IJsonElement CRTP pattern, the stackalloc/ArrayPool rent pattern with JsonConstants thresholds, UTF-8 transcoding helpers, and disposal requirements. USE FOR: parsing JSON, understanding the memory model, writing allocation-efficient code, handling UTF-8/UTF-16 transcoding, understanding the IJsonElement type system. DO NOT USE FOR: mutable documents (use corvus-mutable-documents), code generation (use corvus-codegen).

Parsed Documents and Memory Management

Core Abstractions

ParsedJsonDocument<T>

The primary read-only JSON document type. Backed by ArrayPool<byte> — always dispose.

csharp
using ParsedJsonDocument<JsonElement> doc = ParsedJsonDocument<JsonElement>.Parse(json);
JsonElement root = doc.RootElement;
// Use root...
// doc is disposed at end of using block, returning memory to the pool
IJsonElement<T> (CRTP Pattern)
csharp
public interface IJsonElement<T> where T : struct, IJsonElement<T>

Every JSON type implements this curiously recurring template pattern, enabling static dispatch without virtual calls. The generated types from JSON Schema all implement this interface.

IJsonDocument

Base interface for all pooled-memory documents. Always call Dispose() to return memory.

Parsing Overloads

Prefer these overloads in order (most efficient first):

OverloadUse when
Parse(ReadOnlyMemory<byte>)You have UTF-8 bytes in memory
Parse(ReadOnlySequence<byte>)You have a PipeReader or multi-segment buffer
Parse(Stream)Reading from a file or network stream
Parse(ReadOnlyMemory<char>)You have a char buffer
Parse(string)Convenience; least efficient

ParseValue() creates a self-owned copy (the element owns its backing memory). Parse() returns a disposable document that owns the backing memory.

stackalloc / ArrayPool Rent Pattern

The codebase uses a single consistent pattern for temporary buffers:

csharp
byte[]? rentedArray = null;

Span<byte> buffer = length <= JsonConstants.StackallocByteThreshold
    ? stackalloc byte[JsonConstants.StackallocByteThreshold]
    : (rentedArray = ArrayPool<byte>.Shared.Rent(length));

try
{
    DoWork(buffer.Slice(0, length));
}
finally
{
    if (rentedArray != null)
    {
        ArrayPool<byte>.Shared.Return(rentedArray);
    }
}
Thresholds
ConstantValueUse for
JsonConstants.StackallocByteThreshold256byte / UTF-8 buffers
JsonConstants.StackallocCharThreshold128char buffers

Rules:

  • Declare rentedArray before the ternary (must be in scope for finally)
  • Use the named constant, not a magic number
  • Always slice to length — ArrayPool.Rent may return a larger array
  • For small fixed-size buffers (always ≤ threshold), plain stackalloc without pool is acceptable

UTF-8 Transcoding Helpers

Use JsonReaderHelper.TranscodeHelper to convert between UTF-8 and strings:

csharp
// UTF-8 bytes → string (most common in tests)
string result = JsonReaderHelper.TranscodeHelper(utf8Span);

// UTF-8 bytes → char buffer
int charsWritten = JsonReaderHelper.TranscodeHelper(utf8Span, charBuffer);

// char buffer → UTF-8 bytes (reverse)
int bytesWritten = JsonReaderHelper.TranscodeHelper(charSpan, utf8Buffer);

// Non-throwing variant
bool success = JsonReaderHelper.TryTranscode(utf8Span, charBuffer, out int written);

Invalid UTF-8 always throws InvalidOperationException (wrapping DecoderFallbackException).

Configuration

Default max JSON depth: 64 for ParsedJsonDocument (reader/parser), 1000 for Utf8JsonWriter.

Partial-Class Organization

The JsonElement type is split across files by concern:

  • JsonElement.cs — core struct
  • JsonElement.Parse.cs — parsing
  • JsonElement.JsonSchema.cs — schema validation
  • JsonElement.Mutable.cs — mutable operations
  • JsonElementHelpers.*.cs — DateTime, Uri, numeric, NodaTime helpers

When adding functionality, create a new file JsonElement.<Concern>.cs.

Common Pitfalls

  • Forgetting to dispose: ParsedJsonDocument rents from ArrayPool<byte>. Not disposing leaks pooled memory.
  • Using elements after disposal: Elements reference the document's memory. Using them after Dispose() is undefined behavior.
  • Magic numbers in stackalloc: Always use JsonConstants.StackallocByteThreshold / StackallocCharThreshold.

Cross-References

  • For mutable documents, see corvus-mutable-documents
  • For production analyzers that catch missing dispose (CTJ004-006), see corvus-analyzers
  • For full conventions, see .github/copilot-instructions.md

© corvus-dotnet, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/corvus-parsed-documents-and-memory of corvus-dotnet/Corvus.JsonSchema.

Open the folder on GitHubat commit 973097f

Compare with similar skills

Corvus Parsed Documents And Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Corvus Parsed Documents And Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Corvus Parsed Documents And Memory this skillcorvus-dotnet/Corvus.JsonSchema199—~1.2kAutomated safety check: PassApache-2.0
Nx Generatenomcopter/react-mosaic4.8k7 repos~1.9kAutomated safety check: PassCustom licence
PonytailDavidObando/gsharp5648 repos~1.7kAutomated safety check: PassMIT
Run Nx Generatornrwl/nx29k2 repos~592Automated safety check: NotesMIT
Conductor Setupgemini-cli-extensions/conductor3.8k—~4.2kAutomated safety check: PassApache-2.0
Mirage VFS Adapter Authoringstrukto-ai/mirage3.7k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Nx Generate

    nomcopter/react-mosaic

    Generate code using nx generators. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 7 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    564 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Run Nx generators with prioritization for workspace-plugin generators.

    29k GitHub starsUsed in 2 repos~592 tokens
    DevelopmentAuto-check: notes
  • Conductor Setup

    gemini-cli-extensions/conductor

    Scaffolds the project and sets up the Conductor environment.

    3.8k GitHub stars~4.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.

    3.7k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces this repository's TypeScript backend module architecture under server/: feature folders, barrel exports, and where shared types and utilities belong.

    14k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from corvus-dotnet/Corvus.JsonSchema

All 28 skills in this repo
  • Corvus Analyzers

    corvus-dotnet/Corvus.JsonSchema

    Understand and work with the Roslyn analyzers shipped with Corvus.Text.Json.

    199 GitHub stars~876 tokensUpdated today
    Auto-check passed
  • Corvus Benchmarks

    corvus-dotnet/Corvus.JsonSchema

    Run, interpret, and maintain BenchmarkDotNet benchmarks for JSON Schema validation and query languages.

    199 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Corvus Bowtie Testing

    corvus-dotnet/Corvus.JsonSchema

    Test Corvus.JsonSchema against the JSON Schema Test Suite using Bowtie, the cross-implementation meta-validator.

    199 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Corvus Buffer And Pooling

    corvus-dotnet/Corvus.JsonSchema

    Write allocation-efficient buffer code in Corvus.JsonSchema using the codebase's established three-tier pooling pattern: stackalloc → ArrayPool → ThreadStatic caches.

    199 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Corvus Bytes To Bytes

    corvus-dotnet/Corvus.JsonSchema

    Eliminate hand-rolled POCO record<-document string seams — types/paths that materialize a managed string (or List<string/Dictionary) between a bytes SOURCE (a parsed UTF-8 body, a DB column, a…

    199 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Corvus Codegen

    corvus-dotnet/Corvus.JsonSchema

    Generate strongly-typed C from JSON Schema using the Roslyn source generator or the corvusjson CLI tool.

    199 GitHub stars~2.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Corvus Parsed Documents And Memory

What does Corvus Parsed Documents And Memory do?

Parse JSON into pooled-memory documents and manage memory correctly in the Corvus.Text.Json library. JsonSchema.Json library.

When should I use Corvus Parsed Documents And Memory?

Corvus Parsed Documents And Memory fits situations like: understanding the memory model; writing allocation-efficient code; handling UTF-8/UTF-16 transcoding; understanding the IJsonElement type system.

How do I install Corvus Parsed Documents And Memory in Claude Code?

Run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-parsed-documents-and-memory -a claude-code`. Or copy the skill folder (.github/skills/corvus-parsed-documents-and-memory in corvus-dotnet/Corvus.JsonSchema) into .claude/skills/corvus-parsed-documents-and-memory in your project. Claude Code loads it when a task matches its description.

How do I install Corvus Parsed Documents And Memory in Codex?

Run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-parsed-documents-and-memory -a codex`. Or copy the skill folder (.github/skills/corvus-parsed-documents-and-memory in corvus-dotnet/Corvus.JsonSchema) into .agents/skills/corvus-parsed-documents-and-memory in your project. Codex loads it when a task matches its description.

Can I use Corvus Parsed Documents And Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-parsed-documents-and-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/corvus-parsed-documents-and-memory, .gemini/skills/corvus-parsed-documents-and-memory, .github/skills/corvus-parsed-documents-and-memory and .opencode/skills/corvus-parsed-documents-and-memory in your project.

What does Corvus Parsed Documents And Memory need to run?

SKILL.md names no scripts, command-line tools or credentials: Corvus Parsed Documents And Memory is instructions for the agent only.

Does Corvus Parsed Documents And Memory access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Corvus Parsed Documents And Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Corvus Parsed Documents And Memory use?

Corvus Parsed Documents And Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Corvus Parsed Documents And Memory use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Corvus Parsed Documents And Memory?

Skills that share tags, products or a category with Corvus Parsed Documents And Memory: Nx Generate (nomcopter/react-mosaic, 4.8k stars), Ponytail (DavidObando/gsharp, 564 stars), Run Nx Generator (nrwl/nx, 29k stars) and Conductor Setup (gemini-cli-extensions/conductor, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Corvus Parsed Documents And Memory?

corvus-dotnet (a GitHub organization) maintains it in corvus-dotnet/Corvus.JsonSchema, which has 199 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 9, 2026.

Source: corvus-dotnet/Corvus.JsonSchema on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.