Skip to content
Back to skills

Type Safety Chain

ASecurity

Implements or verifies the six-layer chain from Drizzle schema through Zod, services, API routes, and React hooks. Use when regenerating after DB changes, fixing alignment scripts, or bootstrapping the same architecture in a new folder.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 26, 2026
databasessqlreactapidatabase

Works with

  • cursor
  • api
  • mcp

Security analysis

A100/100

Scanned October 26, 2026

npx -y skills add JoshuaShepherd/my-skills --skill type-safety-chain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Type Safety Chain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Type Safety Chain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joshuashepherd-type-safety-chain-my-skills/badge)](https://www.skillsdirectory.com/skills/joshuashepherd-type-safety-chain-my-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: type-safety-chain
description: Implements or verifies the six-layer chain from Drizzle schema through Zod, services, API routes, and React hooks. Use when regenerating after DB changes, fixing alignment scripts, or bootstrapping the same architecture in a new folder.
---

# Type safety chain (Cursor)

## Canonical source

All phases, SQL for Supabase MCP verification, generator script behavior, and layer rules are in **`.claude/skills/type-safety-chain/SKILL.md`**. Open and follow that file for any non-trivial chain work.

## Quick reference

| Layer | Location |
|-------|-----------|
| 1 DB schema | `src/lib/database/schema.ts` |
| 2 Zod | `src/lib/schemas/` |
| 3 Services | `src/lib/services/simplified/` |
| 4 Routes | `src/app/api/simplified/` |
| 5 Hooks | `src/hooks/simplified/` |
| 6 UI | `src/components/simplified/` (optional; `pnpm validate:all:with-ui`) |

Run `pnpm validate:all` after regenerating (layers 1–5). Use **`pnpm validate:all:with-ui`** when Layer 6 exists. Docs: **`_docs/_build/architecture/type-safety-chain.md`**, **`_docs/_build/type/README.md`**. Error-check workflow: **`.cursor/skills/validate/SKILL.md`**.

If Supabase MCP is available, use it to compare live tables to `schema.ts` as described in the Claude skill.

**Multi-tenant:** After schema or seed changes, confirm `organization_id` columns and tenant-scoped data per org. Canonical rules: **`.cursor/rules/multi-tenancy.mdc`** and the **Multi-tenancy** section in **`.claude/skills/type-safety-chain/SKILL.md`**.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.