Validate Db logo

Validate Db

OrganizationPopular
wrtnlabs
validate-db

Validate Prisma schema against requirements specification (read-only)

Overview

Publisherwrtnlabs
Repositoryautobe
Skill namevalidate-db
Stars
1.4K
Forks
156
Bundled files
Instructions only
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by wrtnlabs on GitHub. Read the source before you install it.

Installation

Install the Validate Db AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wrtnlabs/autobe/tree/main/internals/template/realize/.claude/skills/validate-db
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wrtnlabs/autobe.git /tmp/autobe
mkdir -p .claude/skills
cp -r /tmp/autobe/internals/template/realize/.claude/skills/validate-db .claude/skills/validate-db
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Validate Db in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Validate Db on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Validate Db is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Validate Database Schema

Validate that Prisma schema matches the requirements specification. This skill only checks for discrepancies - it does NOT modify any files.

Purpose

Compare requirements documents with Prisma schema and report:

  • ✅ Matching items
  • ❌ Mismatching items (needs fix)
  • ⚠️ Items requiring review

Workflow

┌─────────────────────────────────────┐
│  Step 1: Read Requirements          │
│  /docs/analysis/*.md                │
└───────────────┬─────────────────────┘
                │
                ▼
┌─────────────────────────────────────┐
│  Step 2: Read Prisma Schema         │
│  /prisma/schema/*.prisma            │
└───────────────┬─────────────────────┘
                │
                ▼
┌─────────────────────────────────────┐
│  Step 3: Compare & Report           │
│  - Missing tables                   │
│  - Missing columns                  │
│  - Type mismatches                  │
│  - Relationship issues              │
└─────────────────────────────────────┘

Step 1: Read Requirements

bash
find docs/analysis -name "*.md" -type f

Extract from each document:

  • Entity definitions
  • Field requirements (name, type, nullable, constraints)
  • Relationship descriptions
  • Business rules

Step 2: Read Prisma Schema

bash
find prisma/schema -name "*.prisma" -type f

Extract from schema:

  • Model definitions
  • Field types and attributes
  • Relations and foreign keys
  • Indexes

Step 3: Validation Checks

3.1 Entity Coverage

For each entity in requirements:

  • ✅ Model exists in schema
  • ❌ Model missing from schema

3.2 Field Coverage

For each required field:

  • ✅ Field exists with correct type
  • ❌ Field missing
  • ❌ Field has wrong type
  • ⚠️ Nullable mismatch

3.3 Relationship Coverage

For each relationship:

  • ✅ Relation properly defined
  • ❌ Relation missing
  • ❌ Wrong cardinality (1:1, 1:N, N:M)
  • ⚠️ Missing onDelete cascade

3.4 Naming Convention

  • ✅ Table names follow {prefix}_{entities} pattern
  • ❌ Inconsistent naming
  • ⚠️ Non-standard field names

Boolean fields:

  • ✅ Boolean fields have is_ prefix (e.g., is_active, is_public)
  • ❌ Boolean field missing is_ prefix (e.g., active → is_active)

Field name consistency:

  • ✅ Same-purpose fields have consistent names across tables
  • ❌ Inconsistent naming (e.g., expires_at in one table, expired_at in another)
  • Common fields to check: *_at timestamps, *_id foreign keys, status fields

3.5 Table Necessity

Compare with requirements to identify unnecessary tables:

Duplicate tables:

  • ❌ Multiple tables serving same purpose
  • ⚠️ Tables with overlapping responsibilities

Unnecessary snapshot/history tables:

  • ❌ Snapshot table exists but requirements say data should be directly editable
  • ❌ History table without audit/versioning requirement
  • ✅ Snapshot table exists and requirements specify versioning/history

Output Format

markdown
# Validation Report: Database Schema

## Summary
- Total entities in requirements: X
- Entities found in schema: Y
- Missing entities: Z

## ✅ Valid Items
- [Entity] `users` - All fields match
- [Entity] `posts` - All fields match

## ❌ Issues Found
- [Missing Entity] `comments` - Defined in requirements but not in schema
- [Missing Field] `users.phone` - Required but not defined
- [Type Mismatch] `posts.view_count` - Expected Int, found String
- [Naming] `users.active` - Boolean field should be `is_active`
- [Naming] `sessions.expired_at` - Inconsistent with `tokens.expires_at`
- [Unnecessary Table] `post_snapshots` - Requirements say posts are directly editable

## ⚠️ Warnings
- [Nullable] `users.bio` - Requirements say required, schema allows null
- [Index] `posts` - Consider adding index on `created_at`
- [Duplicate] `user_profiles` and `users` - May have overlapping responsibilities

## Recommendation
Run `/fix-db` to fix the issues above.

Important

This skill is READ-ONLY.

  • Does NOT modify any files
  • Does NOT run any build commands
  • Only reports discrepancies

To fix issues, use /fix-db skill.

Frequently asked questions

What does the Validate Db AI skill do?

Validate Prisma schema against requirements specification (read-only)

Why use Validate Db on TypingMind?

Because you install it once and use it with any model. Validate Db is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Validate Db in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wrtnlabs/autobe/tree/main/internals/template/realize/.claude/skills/validate-db. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Validate Db?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Validate Db?

As many as you like. As long as a model supports skills, you can use Validate Db with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Validate Db AI skill free?

Yes. It is published on GitHub by wrtnlabs under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇