| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Specs is a fast, deterministic ecosystem for defining and generating production-ready component specifications across platforms. Available as a Figma plugin and a command-line interface, Specs produces compact, schema-valid specs — sidestepping the cost and errors of agentic Figma extraction.
Both the plugin and CLI generate specs consistent with the Specs schema, a specifications model architected to unify component definitions for implementation across web, iOS, Android, and Figma.
Evaluating and differencing Figma styles and layers across variants is mechanical and predictable — and with Specs, incredibly fast and efficient.
Update Figma → Generate specs → Agents refine → Update component
The result is a spec that's compact yet complete — not noisy like Figma's REST API data — and built on a schema that agents and engineers can extend. Leave inference about behavior, accessibility, motion, and nuanced customization downstream, where AI agents excel.
| Specs ecosystem | Agentic Figma extraction | |
|---|---|---|
| Speed | ~1 sec (CLI) / ~10 sec (Plugin) per component | ~5–10 minutes per component |
| AI cost | Scripted — 0 AI tokens per component | 25/50/100,000+ AI tokens per component |
| Consistency | Deterministic and repeatable | Inference errors, gaps, and overconfidence |
| Output | Schema-valid YAML/MD, ideal for testing and versioning | Unstructured Markdown that complicates repeatable verification |
| Platforms | Tuned for cross-platform output and configurable Figma intents | Interprets and infers intents |
Command-line interface (CLI) for generating component specifications from Figma design files.
# 1. Install cli globally to run with the command `specs`
npm install -g @directededges/specs-cli
# 2. Initialize a specs.config.yaml file
specs init
# 3. Edit the config for your Figma file key and preferred settings
# 4. Set up an .env file with a Figma PAT and – if subscribed - license key
# 5. Fetch raw Figma data (file, variables, styles)
specs fetch
# 6. Scan the file to discover components and build a manifest
specs scan
# 7. Select components in the manifest to be generated
# 8. Generate specs from the manifest
specs generateHelpful documentation includes:
The shared type system and JSON schema that defines the structure of UI component specifications is a dependency of specs-cli and installed when you install the command line interface as above. However, it is also available as a standalone package.
npm install @directededges/specs-schemaExports include:
Learn more in the Schema docs, including details on each property including component, variants, styles, props and more.
The specs-from-figma package is the engine that converts Figma assets into specs and is used for both the command line interface and the associated Figma plugin. It is developed in a private repository and its published package is installed as a dependency of the command line interface.
Schema changes are proposed and tracked through ADRs in the adr/ directory. Each ADR documents the context, options considered, and decision for a type or schema modification.
Contributions are welcome. Clone the repo, run npm install at the root, and use npm run build and npm test to validate changes. All packages use Vitest with globals enabled.
This repo includes Claude Code agent skills for the full ADR lifecycle:
| Skill | Purpose |
|---|---|
| /specs.adr.create | Draft a new ADR, claim the next number, and reserve it in the index |
| /specs.adr.implement | Apply the type and schema changes described in an ADR to types, schema, tests, and changelog |
| /specs.adr.accept | Validate the implementation is clean, mark the ADR as ACCEPTED, and update the index |
Found a bug or have a feature request? Please check if it already exists in our Issues before creating a new one.
For bug reports, include:
For feature requests, include:
Questions? Visit our Slack community.
This repository contains packages with different licenses:
When extending or reusing the specs schema, you must:
Example attribution:
"This project uses the Specs UI Component Schema by Nathan Curtis of Directed Edges, licensed under CC BY 4.0."
Disclaimer: This is an independent project and is not officially affiliated with Figma Inc.
| Back | FazBrowse Home | New Git URL |