protheus-locks-deadlocks

protheus-locks-deadlocks is a skill for Claude Code from thalysjuvenal/advpl-specialist. It costs 56 tokens per session (421 once invoked), scanned A, original, MIT.

A troubleshooting skill for record locks and deadlocks in Protheus, an enterprise system that uses database records and transactions. It explains how Protheus locking works with PostgreSQL, SQL Server, or Oracle databases.

In plain words
What is it for?
Use it to investigate “record locked” errors, lock leaks, transaction scope, lock ordering, concurrent batch jobs, and live lock activity.
Why use it?
It helps diagnose records left locked, slowdowns caused by competing work, and deadlocks where transactions wait on one another indefinitely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the advpl-specialist plugin — 19 skills, 16 commands, 5 hooks shipped together

Good fit Use it to investigate “record locked” errors, lock leaks, transaction scope, lock ordering, concurrent batch jobs, and live lock activity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks
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.

Any agent
npx skills add thalysjuvenal/advpl-specialist --skill protheus-locks-deadlocks
Clone the repo
git clone --depth 1 https://github.com/thalysjuvenal/advpl-specialist

Made for: Claude Code.

Or install advpl-specialist, the plugin that ships this one along with the rest of its 19 skills, 16 commands, 5 hooks.

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 protheus-locks-deadlocks

README.md
[![agentmods](https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks/github.svg)](https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks)
Your own site
<a href="https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks"><img src="https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks/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 protheus-locks-deadlocks

Your own site · 80×15
<a href="https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks"><img src="https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 421 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00056 $0.00421
Opus 5.5 $0.00022 $0.00168
Sonnet 5.5 $0.00011 $0.00084
Haiku 4.5 $0.00006 $0.00042

Measured 3d ago against content hash 24452ab5f7d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

protheus-locks-deadlocks 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 3d 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.

skills/protheus-locks-deadlocks/SKILL.md · 17 lines

What it actually says

Protheus Locks & Deadlocks

This skill documents the Protheus hybrid locking model -- record-level Workarea locks (RecLock/MsUnlock) coordinated by DBAccess on top of the underlying RDBMS (PostgreSQL, MSSQL, Oracle) -- and how to diagnose and prevent the lock leaks, contention, and deadlocks that are among the most common production issues. It covers lock API semantics (RecLock, MsUnlock/MsUnlockAll, SoftLock, LockByName, TCSqlExec, BeginTran/EndTran/DisarmTransaction), safe transaction scoping with BEGIN SEQUENCE/RECOVER, and live diagnostic procedures per database engine.

Activate this skill when the user reports a "Record locked by user XYZ" error, needs to investigate performance degradation under concurrent load, is writing or reviewing code that locks records, or is designing a batch job over large data sets where lock ordering matters. It does not cover query design or database-specific locking hints in SQL (see query-builder), general runtime/performance debugging unrelated to locking (see advpl-debugging), or BeginSQL/EndSQL macro syntax (see embedded-sql).

Reference file Read when
reference.md Always -- lock types table, core lock/transaction APIs, when-to-use guidance
patterns-prevention.md Writing or refactoring code that locks records -- BEGIN SEQUENCE/RECOVER, SoftLock, transaction scoping, lock ordering rules
diagnostics.md Investigating live lock contention or deadlocks -- TopMemoStatus, MonitorActiveLocks, DBAccess monitor, engine-specific SQL lock queries
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago Changed · -91 tokens per session 24452ab5f7d9
  2. 3mo ago First seen · 17 lines · 147 tokens per session scan A 7552a01b86b5

Subscribe to this mod's changes

protheus-locks-deadlocks is a skill published in the GitHub repository thalysjuvenal/advpl-specialist (202 stars, last pushed 4d ago), licensed MIT. It adds 56 tokens to every session and 421 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-08-30.

Related

protheus-locks-deadlocks compared with skills from other repositories

protheus-locks-deadlocks next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
protheus-locks-deadlocksthalysjuvenal/advpl-specialistSkill2024d agoMITA56Claude Code
debugar-advplGuipegoraro/tds-mcpSkill34d agoMITA69Claude Code, Codex
triage-issuesgoogleapis/mcp-toolboxSkill17k3d agoApache-2.0A164Claude Code, Codex
postgresql-indexingprowler-cloud/prowlerSkill15k3d agoApache-2.0A108Claude Code
sql-optimization-patternssickn33/agentic-awesome-skillsSkill51kyesterdayMITA28Claude Code
graphjin-evaldosco/graphjinSkill3.2k2d agoApache-2.0A27Claude Code, Codex
read-only-investigationSyngnat/GoNaviSkill2.1kyesterdayApache-2.0A0Claude Code, Codex