design-vector-schema

design-vector-schema is a command for Claude Code from kumaran-is/claude-code-onboarding. It costs 41 tokens per session (549 once invoked), scanned A, original, MIT.

A command that creates a PostgreSQL pgvector migration for storing and searching numerical representations of text or other data. It chooses an index and matching distance settings from the embedding model, data size, and search metric.

In plain words
What is it for?
Use it to generate reversible Flyway or Alembic database changes with vector columns, model metadata, timestamps, indexes, and null-value safeguards.
Why use it?
It helps avoid mismatched vector dimensions, indexes, distance operators, and unsafe handling of missing embeddings.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to generate reversible Flyway or Alembic database changes with vector columns, model metadata, timestamps, indexes, and null-value safeguards.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kumaran-is/claude-code-onboarding/design-vector-schema
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.

Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

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 design-vector-schema

README.md
[![agentmods](https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/design-vector-schema/github.svg)](https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/design-vector-schema)
Your own site
<a href="https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/design-vector-schema"><img src="https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/design-vector-schema/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 design-vector-schema

Your own site · 80×15
<a href="https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/design-vector-schema"><img src="https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/design-vector-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 549 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.
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.00041 $0.00549
Opus 5.5 $0.00016 $0.00220
Sonnet 5.5 $0.00008 $0.00110
Haiku 4.5 $0.00004 $0.00055

Measured 1mo ago against content hash 6b3e2d1faa45, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

design-vector-schema 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 1mo 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/commands/design-vector-schema.md · 47 lines

What it actually says

Design Vector Schema

Generate a production-ready pgvector migration for the following:

Input: $ARGUMENTS

Steps

  1. Load the vector-database skill — read SKILL.md and references/pgvector-migration-template.md for templates and operator-index alignment rules.

  2. Gather requirements — Extract from $ARGUMENTS or ask:

    • Table name (existing or new)
    • Embedding model (from skill's model table — text-embedding-3-small, text-embedding-3-large, embed-english-v3.0, voyage-3-large, nomic-embed-text)
    • Estimated row count (determines HNSW vs IVFFlat)
    • Distance metric (cosine / L2 / inner product)
    • Migration format (Flyway V{N}__*.sql or Alembic {revision}_.py)
  3. Select index type based on row count:

    • < 100K rows: IVFFlat (with ANALYZE reminder)
    • ≥ 100K rows: HNSW
    • Always default to HNSW if count is unknown
  4. Generate migration file with:

    • CREATE EXTENSION IF NOT EXISTS vector; at top of up()
    • vector({dims}) column — dimension from model table
    • embedding_model varchar(100) DEFAULT '{model}'
    • embedded_at timestamptz
    • Correct index with matching ops class
    • Null guard partial index (WHERE embedding IS NOT NULL) for tables > 50K rows
    • Reversible down() section
    • Comment block: model, dims, distance metric, index params reasoning
  5. Run pgvector-schema-reviewer agent on the generated file before presenting to user.

  6. Save file to src/main/resources/db/migration/ (Flyway) or alembic/versions/ (Alembic) depending on project structure. If neither exists, save to current directory with correct naming convention.

  7. Report what was generated and any reviewer findings.

$ARGUMENTS

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. 1mo ago First seen · 47 lines · 41 tokens per session scan A 6b3e2d1faa45

Subscribe to this mod's changes

design-vector-schema is a command published in the GitHub repository kumaran-is/claude-code-onboarding (36 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 549 once invoked, about $0.0002 per session on Opus 5.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-09-03.