How To Communicate
databasus/databasus
Communicate clearly in every response, progress update and agent-authored document.
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with deadlock detection. An agent skill from jeremylongshore/tons-of-skills-marketplace.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-database-deadlocks -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-database-deadlocks --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/detecting-database-deadlocks .claude/skills/detecting-database-deadlocks && 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 "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .claude/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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/detecting-database-deadlocksType 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 detecting-database-deadlocks -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-database-deadlocks --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/detecting-database-deadlocks .agents/skills/detecting-database-deadlocks && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .agents/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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 detecting-database-deadlocks -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-database-deadlocks --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/detecting-database-deadlocks .cursor/skills/detecting-database-deadlocks && 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 "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .cursor/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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/detecting-database-deadlocks--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 detecting-database-deadlocks -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-database-deadlocks --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/detecting-database-deadlocks .gemini/skills/detecting-database-deadlocks && 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 "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .gemini/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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 detecting-database-deadlocksInstalls 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 detecting-database-deadlocks -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/detecting-database-deadlocks .github/skills/detecting-database-deadlocks && 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 "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .github/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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 detecting-database-deadlocks -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 detecting-database-deadlocks --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/detecting-database-deadlocks .opencode/skills/detecting-database-deadlocks && 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 "detecting-database-deadlocks" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/detecting-database-deadlocks into .opencode/skills/detecting-database-deadlocks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detecting-database-deadlocks", 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.
detecting-database-deadlocksProcess use when you need to work with deadlock detection. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Detecting Database Deadlocks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with deadlock detection. This skill provides deadlock detection and resolution with comprehensive guidance and automation. Trigger with phrases like "detect deadlocks", "resolve deadlocks", or "prevent deadlocks".
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 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. 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 80f86df. 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 2 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.orgwiki.postgresql.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Detecting Database Deadlocks loads about 2k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 931 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 80f86df, republished under its MIT licence (© jeremylongshore). 931 words, ~1,972 tokens.
.claude/skills/detecting-database-deadlocks/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Detect, analyze, and prevent database deadlocks in PostgreSQL, MySQL, and MongoDB by examining lock wait graphs, parsing deadlock log entries, identifying the application code paths that cause lock ordering conflicts, and implementing preventive patterns.
pg_locks, INNODB_LOCK_WAITS)psql or mysql CLI for executing diagnostic querieslog_lock_waits = on and deadlock_timeout = 1s configuredinnodb_print_all_deadlocks = ON for deadlock logging to error logCheck for currently blocked transactions and their blockers:
SELECT blocked.pid AS blocked_pid, blocked.query AS blocked_query, blocking.pid AS blocking_pid, blocking.query AS blocking_query FROM pg_stat_activity blocked JOIN pg_locks bl ON bl.pid = blocked.pid JOIN pg_locks bl2 ON bl2.locktype = bl.locktype AND bl2.relation = bl.relation AND bl2.pid != bl.pid JOIN pg_stat_activity blocking ON blocking.pid = bl2.pid WHERE NOT bl.grantedSELECT * FROM information_schema.INNODB_LOCK_WAITSParse recent deadlock events from database logs:
ERROR: deadlock detected entries, which include the two conflicting queries and the lock typesSHOW ENGINE INNODB STATUS\G and examine the LATEST DETECTED DEADLOCK sectionConstruct the lock wait graph from the deadlock log. Map which transaction held which lock and which lock each transaction was waiting for. The circular dependency reveals the deadlock cycle. Identify the specific rows or index ranges involved.
Trace the deadlocking queries back to application code. Use Grep to find the SQL statements in the codebase and identify the transaction boundaries (BEGIN/COMMIT blocks or ORM transaction decorators). Map the full sequence of operations within each transaction.
Identify the root cause pattern:
READ COMMITTED isolation.Implement deadlock prevention strategies:
SELECT ... FOR UPDATE NOWAIT or SKIP LOCKED to fail fast instead of waitingAdd retry logic for deadlock victims. When the database aborts a transaction due to deadlock, catch the error (PostgreSQL error code 40P01, MySQL error code 1213) and retry the entire transaction up to 3 times with a short random delay.
Monitor deadlock frequency over time. Create a query or script that counts deadlock events per hour from the database logs. Alert when deadlock frequency exceeds the baseline by more than 3x.
For persistent deadlocks on specific tables, consider advisory locks (pg_advisory_lock() in PostgreSQL) to serialize access to contended resources at the application level, avoiding database-level lock contention entirely.
Document all identified deadlock patterns, root causes, and fixes in a deadlock analysis report for the development team.
| Error | Cause | Solution |
|---|---|---|
PostgreSQL error 40P01: deadlock detected | Circular lock dependency between transactions | Implement retry logic; fix lock ordering in application code; reduce transaction scope |
MySQL error 1213: Deadlock found when trying to get lock | InnoDB detected circular wait in lock wait graph | Enable innodb_print_all_deadlocks; analyze SHOW ENGINE INNODB STATUS; implement retry logic |
| Lock wait timeout (not deadlock) | Transaction holding lock too long, exceeding lock_wait_timeout | Investigate the blocking transaction; increase timeout or implement NOWAIT; optimize the long-running transaction |
| Phantom deadlocks in monitoring | Transient lock waits resolved before deadlock detection runs | Increase monitoring frequency; use database deadlock log instead of snapshot queries; set deadlock_timeout lower |
| Deadlock frequency increases after schema change | New index or constraint creates additional lock targets | Analyze new lock patterns with EXPLAIN and pg_locks; adjust transaction scope to avoid locking new index entries |
Classic opposite-ordering deadlock in an order processing system: Transaction A processes order 100 (locks order row), then updates inventory for product 50 (waits for inventory lock). Transaction B processes order 200 with product 50 (locks inventory row), then updates order 100 status (waits for order lock). Fix: always lock inventory first, then order, regardless of the business flow.
MySQL gap lock deadlock on a queue table: Two workers concurrently DELETE FROM job_queue WHERE status = 'pending' LIMIT 1. InnoDB gap locks on the index range conflict even though the workers target different rows. Fix: use SELECT ... FOR UPDATE SKIP LOCKED to skip already-locked rows, or add unique job IDs and target specific rows.
Foreign key deadlock between parent and child inserts: Concurrent transactions inserting into order_items (child) acquire shared locks on orders (parent) for FK validation. A third transaction updating orders requires an exclusive lock and deadlocks with the shared FK locks. Fix: explicitly SELECT ... FOR UPDATE on the parent order row before inserting child items.
© 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 4 other files (scripts, references, assets) in skills/.curated/detecting-database-deadlocks of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit 80f86df
Detecting Database Deadlocks 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 |
|---|---|---|---|---|---|---|
| Detecting Database Deadlocks this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2k | Automated safety check: Pass | MIT | |
| How To Communicatedatabasus/databasus | 8.8k | — | ~3.9k | Automated safety check: Pass | MIT | |
| SQL Database Support for pRESTprest/prest | 4.6k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Chdb SQLvemetric/vemetric | 395 | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Database DesignMoizIbnYousaf/ai-agent-skills | 1.1k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Sql2erystemsrx/sql_to_ER | 188 | — | ~1.1k | Automated safety check: Pass | AGPL-3.0 |
databasus/databasus
Communicate clearly in every response, progress update and agent-authored document.
prest/prest
Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.
vemetric/vemetric
A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…
MoizIbnYousaf/ai-agent-skills
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
ystemsrx/sql_to_ER
A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…
gocronx-team/gocron
Create, review, or verify gocron database migrations across SQLite, MySQL, and PostgreSQL.
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
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Process use when you need to work with deadlock detection. An agent skill from jeremylongshore/tons-of-skills-marketplace. Detecting Database Deadlocks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with deadlock detection.
Detecting Database Deadlocks fits situations like: you need to work with deadlock detection; with phrases like detect deadlocks; resolve deadlocks; prevent deadlocks.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-database-deadlocks -a claude-code`. Or copy the skill folder (skills/.curated/detecting-database-deadlocks in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/detecting-database-deadlocks in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-database-deadlocks -a codex`. Or copy the skill folder (skills/.curated/detecting-database-deadlocks in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/detecting-database-deadlocks 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 detecting-database-deadlocks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/detecting-database-deadlocks, .gemini/skills/detecting-database-deadlocks, .github/skills/detecting-database-deadlocks and .opencode/skills/detecting-database-deadlocks in your project.
Going by SKILL.md and its folder, Detecting Database Deadlocks needs Python for the scripts in its folder. 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 2 domains. As links in the text: postgresql.org and wiki.postgresql.org. 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.
Detecting Database Deadlocks is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 7.9k 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 Detecting Database Deadlocks: How To Communicate (databasus/databasus, 8.8k stars), SQL Database Support for pREST (prest/prest, 4.6k stars), Chdb SQL (vemetric/vemetric, 395 stars) and Database Design (MoizIbnYousaf/ai-agent-skills, 1.1k 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,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 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.