DB Ops Sop
OpenDCAI/DataMind
Database operations runbook — backup, recovery, performance tuning, troubleshooting.
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database scalability.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replication --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/managing-database-replication .claude/skills/managing-database-replication && rm -rf skills-srcUse ~/.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/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .claude/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replicationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replication --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/managing-database-replication .agents/skills/managing-database-replication && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .agents/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replication --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/managing-database-replication .cursor/skills/managing-database-replication && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .cursor/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/managing-database-replication--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replication --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/managing-database-replication .gemini/skills/managing-database-replication && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .gemini/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replicationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/managing-database-replication .github/skills/managing-database-replication && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .github/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-replication --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/managing-database-replication .opencode/skills/managing-database-replication && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "managing-database-replication" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-replication into .opencode/skills/managing-database-replication/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-replication", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
managing-database-replicationProcess use when you need to work with database scalability.
Managing Database Replication is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with database scalability. This skill provides replication and sharding with comprehensive guidance and automation. Trigger with phrases like "set up replication", "implement sharding", or "scale database".
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code
It sits in Databases, covering Database administration. It works with PostgreSQL and MySQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobBash(psql:*)Bash(mysql:*)Bash(mongosh:*)From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (Python), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
postgresql.orgpatroni.readthedocs.iomongodb.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
SOURCE_PASSWORDFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Managing Database Replication loads about 1.9k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 792 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 792 words, ~1,858 tokens.
.claude/skills/managing-database-replication/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Configure and manage database replication topologies for PostgreSQL (streaming replication, logical replication), MySQL (source-replica, group replication), and MongoDB (replica sets). This skill covers primary-replica setup, read scaling through replica routing, failover automation, replication lag monitoring, and conflict resolution for multi-primary configurations.
pg_isready or mysqladmin ping)psql, mysql, or mongosh CLI tools installed on all nodesChoose the replication topology based on requirements:
For PostgreSQL streaming replication, configure the primary:
wal_level = replica, max_wal_senders = 10, max_replication_slots = 10CREATE ROLE replicator WITH REPLICATION LOGIN PASSWORD 'secure_password'pg_hba.conf: host replication replicator replica_ip/32 scram-sha-256SELECT pg_reload_conf()Initialize the replica with a base backup: pg_basebackup -h primary_host -U replicator -D /var/lib/postgresql/data -Fp -Xs -P -R. The -R flag creates standby.signal and configures primary_conninfo automatically.
For MySQL source-replica replication, configure the source:
server-id = 1, log_bin = mysql-bin, binlog_format = ROWCREATE USER 'replicator'@'replica_ip' IDENTIFIED BY 'secure_password'; GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'replica_ip'SHOW MASTER STATUSConfigure the MySQL replica: CHANGE REPLICATION SOURCE TO SOURCE_HOST='primary_host', SOURCE_USER='replicator', SOURCE_PASSWORD='...', SOURCE_LOG_FILE='mysql-bin.000001', SOURCE_LOG_POS=154; START REPLICA.
For MongoDB replica sets: initialize with rs.initiate({_id: "rs0", members: [{_id: 0, host: "node1:27017"}, {_id: 1, host: "node2:27017"}, {_id: 2, host: "node3:27017"}]}). MongoDB handles leader election and failover automatically.
Monitor replication lag continuously:
SELECT client_addr, state, sent_lsn, write_lsn, flush_lsn, replay_lsn, (sent_lsn - replay_lsn) AS lag_bytes FROM pg_stat_replicationSHOW REPLICA STATUS\G (check Seconds_Behind_Source)rs.printReplicationInfo() and rs.printSecondaryReplicationInfo()Configure application-level read routing: direct write queries to the primary connection and read queries to a load-balanced replica pool. Use connection poolers (PgBouncer, ProxySQL) or application middleware for automatic routing.
Set up automated failover using Patroni (PostgreSQL), MySQL InnoDB Cluster + MySQL Router, or MongoDB's built-in election mechanism. Test failover by stopping the primary and verifying the replica promotes automatically within the target RTO.
Configure alerting for replication lag exceeding 10 seconds, replication slot inactive for more than 1 hour, and replica connection drops. Stale replication slots in PostgreSQL cause WAL accumulation and can fill the disk.
| Error | Cause | Solution |
|---|---|---|
| Replication lag increasing steadily | Replica cannot keep up with primary write volume | Check replica I/O and CPU; increase max_parallel_workers on replica; consider upgrading replica hardware; reduce write-heavy batch operations on primary |
replication slot is inactive warning | Replica disconnected or paused, WAL accumulating on primary | Reconnect replica; if permanently removed, drop the slot with SELECT pg_drop_replication_slot('slot_name') to prevent disk fill |
could not connect to primary on replica | Network partition, primary down, or authentication failure | Verify network connectivity; check pg_hba.conf entries; confirm replication user credentials; check primary process status |
| Replica has diverged from primary | Split-brain after failed failover or manual writes to replica | Re-initialize replica from fresh base backup; for PostgreSQL, use pg_rewind if timeline divergence is small |
| Conflict in logical replication | Same row modified on both publisher and subscriber | Configure conflict resolution policy; use UPDATE conflict handler; design schema to avoid cross-node writes to same rows |
Setting up PostgreSQL read replicas for a web application: A primary database handles 2,000 writes/second but read traffic is 10x higher. Two streaming replicas are added with PgBouncer routing read queries to replicas in round-robin. Result: primary CPU drops from 90% to 40%, read latency improves by 60%.
Automated failover with Patroni: A 3-node PostgreSQL cluster managed by Patroni with etcd for consensus. When the primary fails, Patroni promotes the most up-to-date replica within 10 seconds. Application reconnects automatically through the Patroni-managed VIP or DNS endpoint.
Cross-region logical replication for compliance: EU customer data must stay in EU region. Logical replication publishes only non-PII tables to the US region replica. EU application reads locally; US analytics queries use the replicated subset. Publication filter: CREATE PUBLICATION us_analytics FOR TABLE orders, products, categories.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references, assets) in skills/.curated/managing-database-replication of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit 23ea8d4
Managing Database Replication 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Managing Database Replication this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.9k | Automated safety check: Pass | MIT | |
| DB Ops SopOpenDCAI/DataMind | 423 | — | ~388 | Automated safety check: Pass | Apache-2.0 | |
| Database Expertcin12211/orca-q | 224 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Database OptimizerJeffallan/claude-skills | 12k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Whodbxiaoyuge886/aigc | 198 | — | ~894 | Automated safety check: Pass | MIT | |
| Database Backupssickn33/agentic-awesome-skills | 47k | 2 repos | ~3.1k | Automated safety check: Notes | MIT |
OpenDCAI/DataMind
Database operations runbook — backup, recovery, performance tuning, troubleshooting.
cin12211/orca-q
Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.
Jeffallan/claude-skills
Tunes PostgreSQL and MySQL performance by analyzing slow queries and execution plans, designing indexes, rewriting queries and adjusting configuration, one validated change at a time.
xiaoyuge886/aigc
Database operations including querying, schema exploration, and data analysis.
sickn33/agentic-awesome-skills
Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.
matlab/matlab-agentic-toolkit
Reads from, writes to, and manages relational databases using MATLAB Database Toolbox.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.
jeremylongshore/tons-of-skills-marketplace
Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.
jeremylongshore/tons-of-skills-marketplace
Process identify anomalies and outliers in datasets using machine learning algorithms.
jeremylongshore/tons-of-skills-marketplace
Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.
jeremylongshore/tons-of-skills-marketplace
Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.
Works with
Categories
Process use when you need to work with database scalability. Managing Database Replication is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with database scalability.
Managing Database Replication fits situations like: you need to work with database scalability; with phrases like set up replication; implement sharding.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a claude-code`. Or copy the skill folder (skills/.curated/managing-database-replication in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/managing-database-replication in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a codex`. Or copy the skill folder (skills/.curated/managing-database-replication in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/managing-database-replication in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-replication -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/managing-database-replication, .gemini/skills/managing-database-replication, .github/skills/managing-database-replication and .opencode/skills/managing-database-replication in your project.
Going by SKILL.md and its folder, Managing Database Replication needs Python for the scripts in its folder and credentials named SOURCE_PASSWORD. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 3 domains. As links in the text: postgresql.org, patroni.readthedocs.io and mongodb.com. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Managing Database Replication is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Managing Database Replication: DB Ops Sop (OpenDCAI/DataMind, 423 stars), Database Expert (cin12211/orca-q, 224 stars), Database Optimizer (Jeffallan/claude-skills, 12k stars) and Whodb (xiaoyuge886/aigc, 198 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.