claude-code-mastery-project-starter-kit: Skill for Claude Code

.claude/skills/schema-source-of-truth/SKILL.md

schema-source-of-truth is a skill for Claude Code from TheDecipherist/claude-code-mastery-project-starter-kit. It costs 102 tokens per session (877 once invoked), scanned A, original, MIT.

A rule for defining each data entity once with a Zod schema, then deriving its TypeScript type and validation rules from that schema. Zod is a TypeScript library for checking that data has the expected shape.

In plain words
What is it for?
Use it when creating or changing entities, API inputs and outputs, Express request checks, frontend form validation, or database document shapes. It helps reuse the same rules across the application.
Why use it?
It prevents the frontend, backend, API validation, and database code from maintaining separate versions of the same data shape. One canonical definition reduces mismatches when fields change.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

This is TheDecipherist/claude-code-mastery-project-starter-kit's own configuration. It tells Claude Code how to work on claude-code-mastery-project-starter-kit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-mastery-project-starter-kit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TheDecipherist/claude-code-mastery-project-starter-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TheDecipherist/claude-code-mastery-project-starter-kit/main/.claude/skills/schema-source-of-truth/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TheDecipherist/claude-code-mastery-project-starter-kit

Made for: Claude Code.

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-source-of-truth

README.md
[![agentmods](https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth/github.svg)](https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth)
Your own site
<a href="https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth"><img src="https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth/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-source-of-truth

Your own site · 80×15
<a href="https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth"><img src="https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/schema-source-of-truth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00102 $0.00877
Opus 5 $0.00051 $0.00439
Sonnet 5 $0.00020 $0.00175
Haiku 4.5 $0.00010 $0.00088

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

Security

Grade A, and why

schema-source-of-truth scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/schema-source-of-truth/SKILL.md · 51 lines

How it starts

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

Schema as a Single Source of Truth

A data entity should be defined once, as a Zod schema, and everything else derived from it. The failure pattern to kill: declaring the same entity separately at each layer, a frontend interface User, a backend interface User, a hand-written API validator, and a manual Mongo $jsonSchema. Four shapes for one entity, kept in sync by hand, guaranteed to drift the first time a field is added or renamed.

One schema per entity, derive the rest

Define the canonical schema once and generate every other representation from it:

  • TypeScript type: type User = z.infer<typeof UserSchema>. Never hand-write an interface that parallels a schema, infer it so it can't fall out of sync.
  • API validation: parse req.body / req.query / req.params through the schema in middleware. safeParse and return 400 on failure, no field-by-field if checks.
  • Frontend forms: the same schema drives form validation (zodResolver with react-hook-form), so client and server reject the same inputs by the same rules.
  • Pre-write guard: parse before writing to the DB. See the mongodb-rules skill for the Mongo-specific parse-before-write and $jsonSchema floor.
  • OpenAPI and $jsonSchema: generate them from the schema (zod-to-openapi, zod-to-json-schema) rather than maintaining them by hand.

Zod is TypeScript-first with zero runtime dependencies, so this costs one small library and removes every duplicated definition.

One base, many variants (they are not identical)

"Same schema everywhere" is the goal, but a create payload is not the stored document and a response is not the request, so don't pretend they're one object. Model it honestly: one base schema, with per-layer variants derived from it, sharing a single origin while differing where they genuinely must.

const UserSchema = z.object({
  _id: z.string(),
  email: z.string().email(),
  name: z.string().min(1),
  createdAt: z.date(),
});

const CreateUser   = UserSchema.omit({ _id: true, createdAt: true }); // POST body
const UpdateUser   = CreateUser.partial();                            // PATCH body
const UserResponse = UserSchema.extend({ displayName: z.string() });  // adds computed field
type User = z.infer<typeof UserSchema>;

Read the full file on GitHub · 51 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. 10d ago First seen · 51 lines · 102 tokens per session scan A a1f160e113ba

Subscribe to this mod's changes

schema-source-of-truth is a skill published in the GitHub repository TheDecipherist/claude-code-mastery-project-starter-kit (338 stars, last pushed 2mo ago), licensed MIT. It adds 102 tokens to every session and 877 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

deepstream-sop

Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…

NVIDIA/skills · 219 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

azure-search-documents-ts

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

microsoft/skills · 48 tokens