Skip to content
Back to skills

Serverless Db Physics

ASecurity

Enforce standards for managing serverless, horizontally-scalable databases. This skill focuses on the logic of "Compute-Storage Separation" (Neon) and "Realtime Reactivity" (Convex) to ensure database performance matches the scaling patterns of serverless applications.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
databasesreacttestingapidatabasefrontendperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill serverless-db-physics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Serverless Db Physics?

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

Security grade badge for Serverless Db Physics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-serverless-db-physics/badge)](https://www.skillsdirectory.com/skills/idorgham-serverless-db-physics)

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
---
type: Skill
subagents: [core-validator, integrity-bot]
agents: [master-guide, swarm-router]
dependencies: [core-orchestration, global-sync]
version: 1.0.0
---



# 💾 Serverless Database Physics (Neon/Convex)

## Purpose
Enforce standards for managing serverless, horizontally-scalable databases. This skill focuses on the logic of "Compute-Storage Separation" (Neon) and "Realtime Reactivity" (Convex) to ensure database performance matches the scaling patterns of serverless applications.

---

## Technique 1 — Branching Workflows (Neon Data Physics)
- **Rule**: Use database branching for every development feature; never run migrations directly on the "main" branch without prior isolated testing.
- **Protocol**: 
    1. Create a data branch from production for the feature.
    2. Run Prisma/Drizzle migrations on the branch.
    3. Verify data integrity in the preview environment.
    4. Merge schemas into the master branch once the feature PR is approved.

---

## Technique 2 — Re-active Data Orchestration (Convex)
- **Rule**: Prioritize "Realtime Subscriptions" over REST polling for interactive applications.
- **Protocol**: 
    1. Define `query` and `mutation` functions in the `convex` folder.
    2. Use the `useQuery` hook in the React frontend to establish a live subscription.
    3. Leverage Convex's "Internal Functions" for background scheduling and third-party API sync.

---

## 🛡️ Critical Failure Modes (Anti-Patterns)

| Anti-Pattern | Result | Correction |
| :--- | :--- | :--- |
| **Connection Exhaustion** | 500 "Too many connections" | Use a "Connection Pooler" (e.g., Neon's pooled URL) for serverless environments where functions scale rapidly. |
| **Massive Scanning Queries** | High latency / Cost spikes | Ensure every query uses a defined Index; avoid `SELECT *` without filters on large datasets. |
| **Complex Logic in Realtime** | Sub-optimal UI lag | Offload heavy computation to asynchronous workers; keep the critical path for Realtime updates minimal. |

---

## Success Criteria (Serverless DB QA)
- [ ] 0 Migrations failed on production due to lack of branching tests.
- [ ] Realtime UI updates are reflected in < 100ms globally.
- [ ] 100% of sensitive storage is encrypted at rest.
- [ ] Backup schedules (PITR) are verified and active.

Files in this skill

  • SKILL.md2.2 KB
  • core.py371 B
  • manifest.yaml190 B
  • tests/test_core.py311 B

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.

View all in databases →

Comments

Loading comments…

Newsletter

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