carpanet

Build .NET ATProtocol applications with CarpaNet source generators, XRPC clients, and Jetstream subscriptions.

7|3|Updated Sep 23, 2025
One-click install
npx skills add https://github.com/islamu-ngo/Event --skill carpanet-islamu-ngo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: carpanet
Source: https://github.com/islamu-ngo/Event/tree/main/.agents/skills/carpanet
Command: npx skills add https://github.com/islamu-ngo/Event --skill carpanet-islamu-ngo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building .NET applications on ATProtocol requires wiring up lexicon-based type generation, authenticated XRPC clients, OAuth 2.0 DPoP flows, and real-time event streams, which is error-prone without guidance on CarpaNet's source-generator architecture. ## Core Features & Use Cases - Lexicon-Driven Source Generation: Declare lexicons in .csproj via LexiconResolve, LexiconFiles, or authority resolution to generate type-safe bindings with NativeAOT-compatible JSON/CBOR contexts. - XRPC Client Operations: Create public or authenticated ATProtoClient instances to query profiles, create and delete records, and fetch timelines using NSID-named extension methods. - OAuth 2.0 with DPoP: Implement desktop and web OAuth flows with OAuthSession and persistent IOAuthSessionStore for secure token lifecycle management. - Real-Time Event Streaming: Subscribe to Jetstream v2 or the ATProtocol firehose with deterministic resume via persisted sequence numbers. - Use Case: A developer building a Bluesky bot declares the needed lexicons, authenticates with an app password, posts records via ComAtprotoRepoCreateRecordAsync, and monitors the firehose for mentions. ## Quick Start Ask the assistant to set up a CarpaNet .NET project that fetches a Bluesky profile and subscribes to the Jetstream post feed.

Frequently Asked Questions about carpanet

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

FAQPage Schema
How do I create an authenticated ATProtocol client in .NET with CarpaNet?▼

Call ATProtoClient.CreateWithSessionAsync with a handle and app password, passing ATProtoClientOptions with the generated ATProtoJsonContext and ATProtoCborContext. For user-facing apps, use OAuthSession from the CarpaNet.OAuth package with DPoP instead.

How do I subscribe to Bluesky Jetstream events in C#?▼

Create a JetstreamV2Client from the CarpaNet.Jetstream package and iterate SubscribeAsync with JetstreamV2SubscribeOptions specifying collections and DIDs. Persist evt.Seq to resume the stream deterministically across restarts.

CarpaNet vs FishyFlip for ATProtocol development in .NET?▼

CarpaNet uses compile-time source generation from declared lexicons with exception-based errors and IAsyncEnumerable streaming, while FishyFlip bundles all lexicons with Result-based returns and event callbacks. CarpaNet requires explicit lexicon declaration but is fully NativeAOT compatible.

Does CarpaNet support NativeAOT publishing?▼

Yes, CarpaNet is fully NativeAOT compatible. The source-generated ATProtoJsonContext and ATProtoCborContext eliminate reflection, so setting PublishAot to true and running dotnet publish works without extra configuration.

Why does my CarpaNet build fail to find Bluesky API methods?▼

CarpaNet only generates bindings for lexicons you explicitly declare in the .csproj via LexiconResolve, LexiconFiles, or authority resolution. Add the missing NSIDs or enable CarpaNet_LexiconAutoResolve to pull transitive dependencies automatically.

How do I persist OAuth sessions across app restarts in CarpaNet?▼

Implement IOAuthSessionStore to save and load OAuthSessionData containing DPoP keys and tokens, then pass it in OAuthClientConfig. Restore sessions later with OAuthSession.RestoreSessionAsync using the user's DID.