protheus-locks-deadlocks

protheus-locks-deadlocks is a skill for Claude Code from thalysjuvenal/advpl-specialist. It costs 147 tokens per session (515 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 — 18 skills, 14 commands, 2 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 18 skills, 14 commands, 2 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 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 515 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.00147 $0.00515
Opus 5 $0.00073 $0.00258
Sonnet 5 $0.00029 $0.00103
Haiku 4.5 $0.00015 $0.00052

Measured 11d ago against content hash 7552a01b86b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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 %nolock% usage in Embedded 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. 11d 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 (186 stars, last pushed 21d ago), licensed MIT. It adds 147 tokens to every session and 515 once invoked, about $0.0007 per session on Opus 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

Other skills, from other repositories

triage-issues

Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…

googleapis/mcp-toolbox · 164 tokens

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…

prowler-cloud/prowler · 108 tokens

graphjin-eval

Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.

dosco/graphjin · 27 tokens

axiom-audit-grdb-performance

Use when the user mentions GRDB performance review, slow GRDB queries, app-group database setup audit, a ValueObservation that stopped updating, or pre-release GRDB scan.

CharlesWiltgen/Axiom · 43 tokens

django-perf-review

Django performance code review. Use when asked to "review Django performance", "find N+1 queries", "optimize Django", "check queryset performance", "database performance", "Django ORM issues", or audit Django code for performance problems.

getsentry/skills · 55 tokens

mma-investigator

Expert system for investigating MMA (Multi-Metric Allocator) behavior on CockroachDB clusters. Helps oncall engineers diagnose load imbalances, understand rebalancing decisions, and identify why MMA did or didn't act.

cockroachdb/cockroach · 47 tokens