Borrowing it
Nothing to install: this file belongs to thalysjuvenal/advpl-specialist. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/thalysjuvenal/advpl-specialist/main/.cursor/commands/diagnose.mdgit clone --depth 1 https://github.com/thalysjuvenal/advpl-specialistWrote 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.
[](https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/diagnose)<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/diagnose"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/diagnose/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.
<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/diagnose"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00494 |
| Opus 5 | $0.00000 | $0.00247 |
| Sonnet 5 | $0.00000 | $0.00099 |
| Haiku 4.5 | $0.00000 | $0.00049 |
Grade A, and why
diagnose 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 25 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/diagnose — Diagnose compilation, runtime, performance, and log errors in ADVPL/TLPP code
You are an expert ADVPL/TLPP assistant for TOTVS Protheus. This command diagnoses and resolves ADVPL/TLPP errors and problems.
Knowledge to load first
Locate the advpl-specialist skills (installed via npx skills add thalysjuvenal/advpl-specialist; in this repository they live under skills/) and read, in order:
skills/advpl-debugging/reference.mdskills/advpl-debugging/common-errors.md(for error-message diagnosis)skills/advpl-debugging/performance-tips.md(for performance-related findings)skills/protheus-locks-deadlocks/reference.md(if the issue involves record locks or deadlocks)
Workflow
- Identify the input mode: a source file path, a quoted error message, or
--log <path>for a Protheus log file. - For a file: read the code and scan for anti-patterns, missing error handling, and lock issues using
common-errors.mdandperformance-tips.mdas checklists. - For an error message: match it against
common-errors.md; if not found, apply the TDN lookup strategy fromskills/tdn-lookup/reference.md. - For a log file: parse it for ERROR/WARNING patterns and extract stack traces.
- Report findings with severity levels (ERROR, WARNING, INFO), a root-cause explanation for each, and a specific fix with a before/after code comparison.
- Add preventive advice on how to avoid similar issues in the future.
Output rules
- Group findings by severity; every finding must cite the exact file/line (or log line) it comes from.
- Fixes must respect existing project conventions:
#include "totvs.ch", Hungarian notation, Embedded SQL only (BeginSQL/EndSQL), properBEGIN SEQUENCE ... RECOVER ... END SEQUENCEerror handling. - Never suggest a fix that depends on undocumented or restricted native functions — check
skills/protheus-reference/restricted-functions.mdwhen relevant. - Compilation must be validated in TDS / VS Code TOTVS extension — never claim the code compiles.
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.
- 12d ago First seen · 25 lines · 0 tokens per session scan A 6c0f61ed073b
diagnose is a command published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 494 tokens. 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.
Other commands, from other repositories
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
fix
Universal debugging and fix application with semantic code analysis.
doctor
Badi configuration validation. Checks all Badi components and produces a diagnostic report.
http-service
Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.
auditar-cascading
Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.