Database Internals Mechanics
Use when the user asks to explain MVCC and the write-ahead log (WAL), B-tree vs LSM tree, compaction, write amplification, storage engines, isolation levels, write skew, serializable snapshot isolation or vacuum bloat. Produces an engine explanation turned into concrete engine, key and isolation choices. Not for PostgreSQL ops tuning (use data-relational-database).
Install
npx skills add j4flmao/agent-skills --skill database-internals-mechanicsgit clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/data/database-internals ~/.claude/skills/database-internals-mechanicsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Database Internals
## Purpose
Explain why a database behaves the way it does under a workload: why random-key inserts hurt a B-tree, why an LSM store has read and space amplification, what a commit actually waits for, and which anomalies each isolation level permits in a specific engine. Use this to choose engines, keys and isolation levels from mechanism rather than folklore.
## Agent Protocol
### Trigger
"database internals", "b-tree", "lsm", "storage engine", "write amplification", "compaction", "wal", "fsync", "mvcc", "isolation level", "phantom", "write skew", "ssi", "vacuum", "bloat".
### Input Context
- Engine and version (PostgreSQL, MySQL/InnoDB, RocksDB, Cassandra/ScyllaDB, SQLite...).
- Workload: read/write ratio, key pattern (sequential vs random), row size, update vs append, consistency needs.
### Output Artifact
Mechanism explanation + recommendation (engine, key, isolation, settings). No file unless requested.
### Response Format
```
Mechanism: {what the engine does}
Impact on workload: {amplification/anomaly/latency}
Recommendation: {change}
Verify: {metric or query}
```
### Completion Criteria
- [ ] Claims tied to the specific engine (isolation semantics differ between engines).
- [ ] Recommendation has a measurable check (e.g. `pg_stat_*`, RocksDB stats, compaction metrics).
## Storage Structures
| | B+tree | LSM-tree |
|--|--------|----------|Details
- Skill name
database-internals-mechanics- Repository
- j4flmao/agent-skills
- Path
skills/data/database-internals/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Database Internals Mechanics skill do?
Use when the user asks to explain MVCC and the write-ahead log (WAL), B-tree vs LSM tree, compaction, write amplification, storage engines, isolation levels, write skew, serializable snapshot isolation or vacuum bloat. Produces an engine explanation turned into concrete engine, key and isolation choices. Not for PostgreSQL ops tuning (use data-relational-database).
How do I install the Database Internals Mechanics skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill database-internals-mechanics. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Database Internals Mechanics popular?
It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.
Related skills
Agent Observability
45j4flmao/agent-skills
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
AI Agent Architectures
45j4flmao/agent-skills
Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).
AI Agent Core Loop
45j4flmao/agent-skills
Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).
Database Migration
45j4flmao/agent-skills
Use when the user asks about schema migrations, Flyway, Liquibase, Alembic, Prisma Migrate, zero-downtime expand/contract changes, AWS DMS, heterogeneous database moves, or schema drift. Produces safe migration scripts, rollout order and validation. Not for whole-workload cloud migration (use cloud-migration).
Data Relational Database
45j4flmao/agent-skills
Use when the user asks about PostgreSQL or MySQL indexing, EXPLAIN ANALYZE, partitioning, streaming or logical replication, autovacuum, connection pooling (PgBouncer) or query optimization. Produces index, partition, replication and pooling configs. Not for engine theory such as MVCC internals (use database-internals-mechanics) or sharding (use architecture-database-scaling).
Firebase
45j4flmao/agent-skills
Use when the user asks about Firebase, Firestore data modeling, Firestore security rules, Firebase Auth, Cloud Functions for Firebase, Firebase Admin SDK, App Check or emulators. Produces Firebase backend code and rules. Not for Supabase/Postgres (use supabase) or push messaging on devices (use mobile-push-notifications).
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.