# Architecture

> How the Skills registry is built: its parts, where Rust runs, and how they connect.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://skills.docs.sypnia.com/architecture/

For agents: Registry engine: one Rust binary (axum) with API, MCP server, publisher (unpack, validate, store), checker (isolated worker, no network, never runs skill files; AI instructions review through an OpenAI-compatible endpoint: Sypnia AI in Cloud), signer (signature over the package SHA-256: ECDSA P-256 with a KMS key in Cloud, Ed25519 with a key file self-hosted), resolver, search (Postgres full text), web index. Postgres for publishers, skills, versions, reviews, tokens, reports, stats; S3-compatible storage for immutable packages behind a CDN. @sypnia/skills (TypeScript, MIT): CLI + SDK, verifies hash and signature locally. Cloud adds the marketplace site, review queue and console (private).

**Figure**: Sypnia Skills: the command line and agents, the registry engine, where packages and records live, and the review.

1. The `skills` command, the SDK and agents through MCP call the registry.
2. A new version is unpacked and checked in an isolated worker that never runs it.
3. A good version is signed and its package stored, immutable, behind a CDN.
4. Installs download from the CDN and verify the hash and the signature on your machine.
5. In Sypnia Cloud, public skills wait for a reviewer before they are listed.

The command line, the SDK and agents call the registry's API and MCP server. The registry engine is one Rust binary with the API, the MCP server, the publisher, the checker, the signer, the resolver and search. Records live in Postgres; packages live in S3-compatible storage and are served by a CDN. Verification happens on your machine, so a CDN or a storage mistake can never hand you a different skill.

| Part                                                                               | Language          | Open source   |
| ---------------------------------------------------------------------------------- | ----------------- | ------------- |
| Registry engine: API, MCP, publisher, checker, signer, resolver, search, web index | Rust (axum)       | yes, AGPL-3.0 |
| `@sypnia/skills`: the command line and the SDK                                     | TypeScript        | yes, MIT      |
| The official skills and the `sypnia` plugin marketplace                            | Markdown and YAML | yes, MIT      |
| The marketplace site, the review queue and the console of skills.sypnia.com        | TypeScript        | no            |

## Why it is built this way

- **Verification on your machine.** The registry signs; the command line checks. Trust does not depend on the network in between.
- **Packages never change.** One file per version, never overwritten, so a lock file means the same thing forever.
- **The checker runs nothing.** It reads files as text in a worker with no network, so a harmful skill cannot act while it is being checked.
- **Rust where a mistake is a security hole**: unpacking archives, reading untrusted files, signing.

* [Request paths](/architecture/request-paths/): What happens, step by step, when a skill is installed, published, reviewed and yanked.
* [Data model](/architecture/data-model/): The tables the registry keeps in Postgres, and what lives in storage.
* [On AWS](/architecture/reference-implementation-aws/): How skills.sypnia.com runs: the reference implementation on AWS, through Sypnia's own products.
* [Failures and scaling](/architecture/failures-and-scaling/): What keeps working when a part of the registry fails, and how it grows.
* [Codebase](/architecture/codebase/): Where the registry, the command line, the SDK and the official skills live.
