schema-authority

schema-authority is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 63 tokens per session (2,916 once invoked), scanned A, original, MIT.

A guide to defining a data shape once and generating related code from it, such as types, validation rules, documentation, test data, and client code. It applies this idea to APIs, databases, and shared schemas.

In plain words
What is it for?
Use it to design APIs from a central schema, generate TypeScript types and validators, keep database models aligned, and create contract tests.
Why use it?
It reduces mismatches caused by describing the same data separately in models, documentation, validators, and tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design APIs from a central schema, generate TypeScript types and validators, keep database models aligned, and create contract tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/schema-authority
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LuuOW/meridian-mcp --skill schema-authority
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for schema-authority

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/schema-authority/github.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/schema-authority)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/schema-authority"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/schema-authority/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for schema-authority

Your own site · 80×15
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/schema-authority"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/schema-authority.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02916
Opus 5 $0.00032 $0.01458
Sonnet 5 $0.00013 $0.00583
Haiku 4.5 $0.00006 $0.00292

Measured 8d ago against content hash 4150e35ca3d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

schema-authority scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:8000/openapi.json > openapi.json
skills/schema-authority/SKILL.md · 375 lines

How it starts

The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.

schema-authority

Core principle: one definition is the truth. Everything else — types, validators, docs, mocks, test fixtures, client SDKs — is derived from it. Never write the same shape twice.

If two places describe the same data, one of them is already wrong and you just don't know it yet.

1) Pydantic as canonical model → derive everything

# models/article.py  ←  THE truth. Touch this file, regenerate everything else.
from pydantic import BaseModel, Field
from typing import Literal
from datetime import datetime
from uuid import UUID

class ArticleBase(BaseModel):
    title: str = Field(..., min_length=3, max_length=200)
    slug: str  = Field(..., pattern=r"^[a-z0-9-]+$")
    status: Literal["draft", "published", "archived"] = "draft"

class ArticleCreate(ArticleBase):
    body_markdown: str

class ArticleRead(ArticleBase):
    id: UUID
    created_at: datetime
    word_count: int

    model_config = {"from_attributes": True}   # ORM → Pydantic without extra code

FastAPI auto-generates the OpenAPI spec from these models — no separate spec file to maintain.

# main.py
from fastapi import FastAPI
app = FastAPI(title="Content API", version="1.0.0")

@app.post("/articles", response_model=ArticleRead, status_code=201)
async def create_article(body: ArticleCreate, db: AsyncSession = Depends(get_db)):
    ...

Export the spec once, drive everything downstream from it:

# Export spec
curl http://localhost:8000/openapi.json > openapi.json

# Generate TypeScript types (frontend consumes these — never writes its own)
npx openapi-typescript openapi.json -o src/types/api.ts

# Generate a typed fetch client
npx openapi-fetch --input openapi.json --output src/lib/client

2) SQLModel: one class for ORM + API schema

# SQLModel collapses Pydantic model + SQLAlchemy ORM model into one definition.
# The database schema IS the Pydantic schema. Drift is structurally impossible.
from sqlmodel import SQLModel, Field
from typing import Optional
from uuid import UUID, uuid4

class Article(SQLModel, table=True):
    id: UUID = Field(default_factory=uuid4, primary_key=True)
    title: str = Field(index=True, max_length=200)
    slug: str  = Field(unique=True)
    status: str = Field(default="draft")
    body_markdown: str

class ArticleCreate(SQLModel):           # request body — no id, no status
    title: str
    slug: str
    body_markdown: str

class ArticleRead(Article):              # response — full row
    pass

Read the full file on GitHub · 375 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 375 lines · 63 tokens per session scan A 4150e35ca3d4

Subscribe to this mod's changes

schema-authority is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 2,916 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.