Agent Native

advpl-debugging

This skill helps debug ADVPL/TLPP code on TOTVS Protheus by diagnosing compilation errors, runtime failures, database locks, and performance issues.

by thalysjuvenalCommunityNot reviewed

Community author

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
d80599bpinned Oct 9, 2026
Context cost
about 330 tokenswhen the skill loads
GitHub stars
186on thalysjuvenal/advpl-specialist
Scripts
None found

What it does

“Use when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables), runtime failures (NIL access, type mismatch, array bounds), performance issues (slow queries, memory leaks), database locks (RecLock timeouts, deadlocks), or AppServer log/crash analysis. Also triggers on Portuguese phrasing like "erro de compilacao", "erro em tempo de execucao", "travou o lock", "RecLock nao libera", "performance lenta", "analisar log do appserver", or a pasted stack trace / error message from Protheus.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill helps debug ADVPL/TLPP code on TOTVS Protheus by diagnosing compilation errors, runtime failures, database locks, and performance issues. It provides a systematic methodology with decision flows, symptom tables, logging tool guidance, and lock diagnosis. Use it when investigating error messages, stack traces, hanging records, slow routines, or AppServer crashes.

When to use it

  • User reports a compilation error or syntax issue in ADVPL/TLPP code
  • Runtime failure occurs with NIL access, type mismatch, or array bounds error
  • Code hangs due to RecLock timeout or database deadlock
  • Performance bottleneck suspected in queries or routines

When not to

  • Generating new ADVPL/TLPP code from scratch
  • Auditing working code for general quality improvement
  • Converting .prw files to .tlpp format

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add thalysjuvenal/advpl-specialist --skill advpl-debugging

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install thalysjuvenal/advpl-specialist advpl-debugging@d80599b75e30e7f559218b453d72b84999f138a4

Installs the commit we checked (d80599b).

Copy by hand

Download the folder at d80599b and put it in .claude/skills/advpl-debugging for Claude Code and in .agents/skills/advpl-debugging for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at d80599b

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "advpl-debugging" by thalysjuvenal.

Source, pinned to commit d80599b75e30e7f559218b453d72b84999f138a4:
https://github.com/thalysjuvenal/advpl-specialist/tree/d80599b75e30e7f559218b453d72b84999f138a4/skills/advpl-debugging

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/advpl-debugging/ for Claude Code and .agents/skills/advpl-debugging/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/thalysjuvenal/advpl-debugging

SKILL.md at the pin

---
name: advpl-debugging
description: Use when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables), runtime failures (NIL access, type mismatch, array bounds), performance issues (slow queries, memory leaks), database locks (RecLock timeouts, deadlocks), or AppServer log/crash analysis. Also triggers on Portuguese phrasing like "erro de compilacao", "erro em tempo de execucao", "travou o lock", "RecLock nao libera", "performance lenta", "analisar log do appserver", or a pasted stack trace / error message from Protheus.
---

# ADVPL/TLPP Debugging

This skill provides a systematic methodology for diagnosing and resolving ADVPL/TLPP errors: a decision flow (compilation vs. runtime), a quick-diagnosis table by symptom, logging tool guidance (`Conout`, `FWLogMsg`, `ErrorBlock`), database lock diagnosis (`RecLock`/`MsUnlock`), and quick performance checks (wrong index, array growth in loops, Embedded SQL vs ISAM).

Activate this skill when the user reports an error message, a stack trace, a compilation failure, a hanging/locked record, a slow routine, or an AppServer crash/log to investigate. It does not cover generating new code from scratch (see `advpl-code-generation`), a general quality audit of working code (see `advpl-code-review`), restructuring code that already works correctly (see `advpl-refactoring`), or converting `.prw` to `.tlpp` (see `advpl-to-tlpp-migration`).

| Reference file | Read when |
|---|---|
| reference.md | Always -- debug methodology flow, quick diagnosis by symptom, logging tools, lock diagnosis, performance quick checks, common debugging mistakes |
| common-errors.md | Looking up a specific compilation or runtime error message (top 50 ADVPL/TLPP errors with cause and fix) |
| performance-tips.md | Investigating a performance bottleneck in depth (query optimization, loop efficiency, memory) |

From thalysjuvenal/advpl-specialist at d80599b, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at d80599b

Files

4 files, 59 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at d80599b
All Coding workflow skills
  • planning

    This skill orchestrates multi-workflow projects with dependencies and shared data tables by creating a task graph in the orchestrator via the create-tasks tool.

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.4K tokens · pinned 6 days ago

  • progressive-building

    This skill implements incremental workflow development for agents building or extending workflows.

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 1.4K tokens · pinned 6 days ago

  • workflow-builder

    Builds and edits n8n workflows using the TypeScript SDK.

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 14.2K tokens · pinned 6 days ago

  • remotion-upgrade

    This skill upgrades Remotion and its related packages to the latest stable version.

    by RemotionOfficial publisher

    Claude Code, Codex, Cursor +3 · about 460 tokens · pinned 6 days ago

  • remotion-upgrade

    This skill upgrades Remotion and related packages across a project, automatically detecting the package manager and workspaces.

    by RemotionOfficial publisher

    Claude Code, Codex, Cursor +3 · about 460 tokens · pinned 6 days ago

  • final-release-review

    Audits Python SDK release candidates or plans against the previous release, comparing diffs for regressions, API changes, and version compatibility.

    by OpenAIOfficial publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 5.4K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use