Agent skill

Schema Builder

by waynesutton in waynesutton/markdown-site

Design and generate Convex database schemas with proper validation, indexes, and relationships.

MITAuto-check passed

Install Schema Builder

skills CLI
$ npx skills add waynesutton/markdown-site --skill schema-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install waynesutton/markdown-site schema-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/waynesutton/markdown-site.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/schema-builder .claude/skills/schema-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
schema-builder
GitHub stars
628
Token cost
~872 tokens
SKILL.md length
168 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Design and generate Convex database schemas with proper validation, indexes, and relationships.

  • Works in 4 steps: Document-Relational: Use flat documents… → Index Foreign Keys: Always index fields… → Limit Arrays: Only use arrays for small,… → …
  • Creating schema.ts
  • SKILL.md covers When to Use, Schema Design Principles, Schema Template and Common Patterns, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Schema Builder is an agent skill from waynesutton/markdown-site. Design and generate Convex database schemas with proper validation, indexes, and relationships. Use when creating schema.ts or modifying table definitions.

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Convex. The repository describes itself as: An open-source publishing framework built for AI agents and developers to ship websites, docs, or blogs. Write markdown, sync from the terminal. Your content is instantly… The licence is MIT.

When your agent uses it

  • Creating schema.ts
  • Modifying table definitions

Example prompts

  • “/schema-builder”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Document-Relational: Use flat documents with ID references, not deep nesting
  2. Index Foreign Keys: Always index fields used in lookups (userId, teamId, etc.)
  3. Limit Arrays: Only use arrays for small, bounded collections (<8192 items)
  4. Type Safety: Use strict validators with v.* types

What it can do on your machine

Read from SKILL.md and the folder at commit 3872c59. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Schema Builder loads about 872 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 168 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~872

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from waynesutton/markdown-site at commit 3872c59, republished under its MIT licence (© waynesutton). 168 words, ~872 tokens.

Download SKILL.mdSave it as .claude/skills/schema-builder/SKILL.md (or your agent's skills folder).
name
schema-builder
description
Design and generate Convex database schemas with proper validation, indexes, and relationships. Use when creating schema.ts or modifying table definitions.

Convex Schema Builder

Build well-structured Convex schemas following best practices for relationships, indexes, and validators.

When to Use

  • Creating a new convex/schema.ts file
  • Adding tables to existing schema
  • Designing data model relationships
  • Adding or optimizing indexes
  • Converting nested data to relational structure

Schema Design Principles

  1. Document-Relational: Use flat documents with ID references, not deep nesting
  2. Index Foreign Keys: Always index fields used in lookups (userId, teamId, etc.)
  3. Limit Arrays: Only use arrays for small, bounded collections (<8192 items)
  4. Type Safety: Use strict validators with v.* types

Schema Template

typescript
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";

export default defineSchema({
  tableName: defineTable({
    field: v.string(),
    optional: v.optional(v.number()),
    userId: v.id("users"),
    status: v.union(
      v.literal("active"),
      v.literal("pending"),
      v.literal("archived")
    ),
    createdAt: v.number(),
    updatedAt: v.optional(v.number()),
  })
    .index("by_user", ["userId"])
    .index("by_user_and_status", ["userId", "status"])
    .index("by_created", ["createdAt"]),
});

Common Patterns

One-to-Many Relationship
typescript
export default defineSchema({
  users: defineTable({
    name: v.string(),
    email: v.string(),
  }).index("by_email", ["email"]),

  posts: defineTable({
    userId: v.id("users"),
    title: v.string(),
    content: v.string(),
  }).index("by_user", ["userId"]),
});
Many-to-Many with Junction Table
typescript
export default defineSchema({
  users: defineTable({ name: v.string() }),
  projects: defineTable({ name: v.string() }),
  projectMembers: defineTable({
    userId: v.id("users"),
    projectId: v.id("projects"),
    role: v.union(v.literal("owner"), v.literal("member")),
  })
    .index("by_user", ["userId"])
    .index("by_project", ["projectId"])
    .index("by_project_and_user", ["projectId", "userId"]),
});
Hierarchical Data
typescript
export default defineSchema({
  comments: defineTable({
    postId: v.id("posts"),
    parentId: v.optional(v.id("comments")),
    userId: v.id("users"),
    text: v.string(),
  })
    .index("by_post", ["postId"])
    .index("by_parent", ["parentId"]),
});

Validator Reference

typescript
v.string()
v.number()
v.boolean()
v.null()
v.id("tableName")
v.optional(v.string())
v.union(v.literal("a"), v.literal("b"))
v.object({ key: v.string(), nested: v.number() })
v.array(v.string())
v.record(v.string(), v.boolean())
v.any()

Index Strategy

  1. Single-field indexes: For simple lookups (by_user: ["userId"])
  2. Compound indexes: For filtered queries (by_user_and_status: ["userId", "status"])
  3. Remove redundant: by_a_and_b usually covers by_a

Checklist

  • All foreign keys have indexes
  • Common query patterns have compound indexes
  • Arrays are small and bounded (or converted to relations)
  • All fields have proper validators
  • Enums use v.union(v.literal(...)) pattern
  • Timestamps use v.number() (milliseconds since epoch)

Source: https://github.com/get-convex/convex-agent-plugins

© waynesutton, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/schema-builder of waynesutton/markdown-site.

Open the folder on GitHubat commit 3872c59

Compare with similar skills

Schema Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Schema Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Schema Builder this skillwaynesutton/markdown-site628—~872Automated safety check: PassMIT
Convex Migration Helperspokvulcan/poker-planning1148 repos~1.4kAutomated safety check: PassMIT
Convex Quickstartspokvulcan/poker-planning1146 repos~3.5kAutomated safety check: NotesMIT
Convex Agentswaynesutton/builder-skills404—~2.2kAutomated safety check: PassApache-2.0
Convex Best Practiceswaynesutton/builder-skills404—~2.6kAutomated safety check: PassApache-2.0
Convex Release Auditudecode/kitcn450—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Convex Migration Helper

    spokvulcan/poker-planning

    Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations.

    114 GitHub starsUsed in 8 repos~1.4k tokens
    Product & Project ManagementAuto-check passed
  • Convex Quickstart

    spokvulcan/poker-planning

    Creates or adds Convex to an app. An agent skill from spokvulcan/poker-planning.

    114 GitHub starsUsed in 6 repos~3.5k tokens
    Frontend & DesignAuto-check: notes
  • Convex Agents

    waynesutton/builder-skills

    Builds AI agents on the Convex agent component: threads, messages, tools that call queries and mutations, streaming, RAG with vector search, and workflows for multi step jobs.

    404 GitHub stars~2.2k tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Convex Best Practices

    waynesutton/builder-skills

    Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling.

    404 GitHub stars~2.6k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Audit newer Convex npm releases against kitcn. An agent skill from udecode/kitcn.

    450 GitHub stars~1.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Convex Backend

    CloudAI-X/claude-workflow-v2

    Convex backend development guidelines. An agent skill from CloudAI-X/claude-workflow-v2.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from waynesutton/markdown-site

All 17 skills in this repo
  • Convex Self Hosting

    waynesutton/markdown-site

    Integrate Convex static self hosting into existing apps using the latest upstream instructions from get-convex/self-hosting every time.

    628 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Robel Auth

    waynesutton/markdown-site

    Integrate and maintain Robelest Convex Auth in apps by always checking upstream before implementation.

    628 GitHub stars~4.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Migration Helper

    waynesutton/markdown-site

    Plan and execute Convex schema migrations safely, including adding fields, creating tables, and data transformations.

    628 GitHub starsUsed in 1 repo~958 tokens
    Auto-check passed
  • Convex Return Validators

    waynesutton/markdown-site

    Guide for when to use and when not to use return validators in Convex functions.

    628 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Convex Doctor

    waynesutton/markdown-site

    Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories.

    628 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check passed
  • Convex Quickstart

    waynesutton/markdown-site

    Initialize a new Convex project from scratch or add Convex to an existing app.

    628 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check: notes

Works with

Questions about Schema Builder

What does Schema Builder do?

Design and generate Convex database schemas with proper validation, indexes, and relationships. Schema Builder is an agent skill from waynesutton/markdown-site. Design and generate Convex database schemas with proper validation, indexes, and relationships.

When should I use Schema Builder?

Schema Builder fits situations like: creating schema.ts; modifying table definitions.

How do I install Schema Builder in Claude Code?

Run `npx skills add waynesutton/markdown-site --skill schema-builder -a claude-code`. Or copy the skill folder (.claude/schema-builder in waynesutton/markdown-site) into .claude/skills/schema-builder in your project. Claude Code loads it when a task matches its description.

How do I install Schema Builder in Codex?

Run `npx skills add waynesutton/markdown-site --skill schema-builder -a codex`. Or copy the skill folder (.claude/schema-builder in waynesutton/markdown-site) into .agents/skills/schema-builder in your project. Codex loads it when a task matches its description.

Can I use Schema Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add waynesutton/markdown-site --skill schema-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/schema-builder, .gemini/skills/schema-builder, .github/skills/schema-builder and .opencode/skills/schema-builder in your project.

What does Schema Builder need to run?

SKILL.md names no scripts, command-line tools or credentials: Schema Builder is instructions for the agent only.

Does Schema Builder access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Schema Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Schema Builder use?

Schema Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Schema Builder use?

About 872 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Schema Builder?

Skills that share tags, products or a category with Schema Builder: Convex Migration Helper (spokvulcan/poker-planning, 114 stars), Convex Quickstart (spokvulcan/poker-planning, 114 stars), Convex Agents (waynesutton/builder-skills, 404 stars) and Convex Best Practices (waynesutton/builder-skills, 404 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Schema Builder?

waynesutton (a GitHub user) maintains it in waynesutton/markdown-site, which has 628 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on May 20, 2026.

Source: waynesutton/markdown-site on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.