facet

Replace serde with reflection-based type introspection for Rust serialization and CLI parsing.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/fasterthanlime/_claude --skill facet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: facet
Source: https://github.com/fasterthanlime/_claude/tree/main/skills/facet
Command: npx skills add https://github.com/fasterthanlime/_claude --skill facet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Facet provides a reflection-based alternative to serde for Rust. Instead of Serialize/Deserialize traits, types derive Facet which exposes a SHAPE associated constant with full type introspection, enabling serialization, CLI parsing, and crate mappings without the boilerplate of serde.

Core Features & Use Cases

  • Derive Macro: Derive Facet to enable runtime type introspection and generic tooling without serde derives.
  • Crate Mappings & Patterns: Provides crate mappings (serde_json → facet-json, clap → facet-args, etc.) and practical usage patterns for common formats and CLI parsing.
  • Use Case: Rapidly explore and serialize complex Rust types with minimal boilerplate, improving tooling and interoperability.

Quick Start

Use the facet derive on a struct to enable runtime shape introspection and JSON encoding with facet-json.

Frequently Asked Questions about facet

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

FAQPage Schema
How do I replace serde with reflection-based serialization in Rust?

Facet provides reflection-based serialization as a serde alternative. Derive Facet on your types to expose a SHAPE associated constant for runtime type introspection, enabling JSON serialization and deserialization without serde's boilerplate.

Can I use Facet for CLI argument parsing instead of clap?

Yes. Facet includes crate mappings like facet-args that replace clap for CLI parsing. Derive Facet on your struct to enable argument parsing with minimal setup.

What's the difference between Facet and serde for JSON encoding?

Facet replaces serde's Serialize/Deserialize traits with a single Facet derive and SHAPE constant for type introspection. The facet-json crate handles JSON encoding directly, reducing derive boilerplate while maintaining standard patterns.

Do I need to rewrite existing serde code to use Facet?

Facet provides crate mappings that mirror serde patterns (serde_json maps to facet-json, clap to facet-args). New code can use Facet directly; existing serde usage can migrate incrementally through these mapped crates.

How does Facet enable tooling without serde derives?

Facet's SHAPE associated constant exposes full type metadata at runtime, allowing generic tools and serialization frameworks to introspect Rust types directly without serde trait bounds.

Can Facet handle complex nested Rust types?

Facet's derive macro and SHAPE introspection support complex types with minimal boilerplate. The reflection-based approach rapidly serializes nested structures while maintaining type safety and interoperability.