astrolabe-schemas

A JWT-based authentication system for a React app.

1|5|Updated Aug 6, 2023
One-click install
npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astrolabe-schemas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astrolabe-schemas
Source: https://github.com/astrolabe-apps/astrolabe-common/tree/main/skills/astrolabe-schemas
Command: npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astrolabe-schemas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Astrolabe.Schemas enables C# developers to define schemas that serialize to JSON for TypeScript/React form generation, reducing duplication and ensuring type safety across the frontend.

Core Features & Use Cases

  • Schema Field definitions in C#: map strings, numbers, booleans, dates, and nested compounds to JSON.
  • Form schemas and validation: build complete forms that can be rendered by frontend form libraries such as @react-typed-forms/schemas.
  • JSON serialization: emit camelCase JSON contracts consumable by TypeScript.
  • Use Case: generate TypeScript schemas from C# models for dynamic forms in admin dashboards.

Quick Start

Create a C# class with public properties, define a set of SimpleSchemaField/CompoundField entries, and serialize to JSON to feed a TS frontend.

Frequently Asked Questions about astrolabe-schemas

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

FAQPage Schema
How do I generate TypeScript form schemas from C# models?

You define schema fields and validation rules in C# classes, then serialize them to camelCase JSON contracts. These JSON outputs are consumed by TypeScript libraries to render dynamic forms with built-in validation.

What's the best way to share validation rules between .NET and TypeScript?

Sharing validation rules between .NET and TypeScript is done by defining cross-platform schemas in C# that serialize to JSON. This ensures type safety and reduces duplication by emitting contracts consumable by TypeScript frontend libraries.

Can I use C# schemas to render dynamic forms in React?

Yes, C# schemas can render dynamic forms in React. The skill emits JSON form schemas designed to be consumed by frontend libraries like @react-typed-forms/schemas, enabling dynamic form generation from .NET models.

Do I need external runtime libraries to serialize C# schemas to JSON for TypeScript?

No external runtime libraries are needed beyond the standard .NET toolchain. The skill serializes C# schema definitions to camelCase JSON natively, making the output directly consumable by TypeScript applications.

How does JSON schema serialization handle nested compounds in C#?

JSON schema serialization handles nested compounds by mapping C# public properties to SimpleSchemaField and CompoundField entries. These definitions are serialized into camelCase JSON, preserving the hierarchical structure for TypeScript form generation.

When should I use cross-platform schemas instead of duplicating TypeScript types?

Use cross-platform schemas when building admin dashboards or dynamic forms to eliminate type duplication. Defining schemas in C# and emitting JSON contracts ensures type safety across the frontend without manually maintaining separate TypeScript models.