From plugadvpl
Diagnoses Protheus log files (console, error, profile, compila) with 19 alert rules and 93 correction tips with official TDN URLs. Useful for developers debugging Protheus ERP errors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugadvpl:log-diagnosepathsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Diagnostica arquivos de log Protheus em um único comando. Pipeline em 2 estágios:
/plugadvpl:log-diagnoseDiagnostica arquivos de log Protheus em um único comando. Pipeline em 2 estágios:
[DD/MM HH:MM:SS], [SEVERITY])./plugadvpl:log-diagnose [paths] [--severity critical|warning|info] [--category CAT] [--rule RULE] [--since 30m|24h|7d]
--severity <nivel> — só findings da severidade indicada--category <cat> — uma das 12 categorias (database, thread_error, rpo, network, connection, service, rest_api, compilation, authentication, shutdown, lifecycle, application)--rule <id> — só uma rule específica (ex: LOG-DB-ORA, LOG-THREAD-ERROR)--arquivo <nome> — filtra por basename do log--since <janela> — relativa ao último timestamp do log, não ao wall clock (ex: 24h = últimas 24h dentro do log)--max-findings N — cap (default 1000)--force — re-ingere mesmo se hash+mtime baterem (ignora cache)--no-diagnose — só faz ingest (sem rodar match)Sem args, auto-discover em --root via globs:
*console*.log *error*.log *profile*.log *compila*.log *appserver*.log
Cobre prefixos comuns: dev_console.log, prd-error.log, compila.log, etc.
uvx [email protected] --format md log-diagnose $ARGUMENTS
Para agente IA: prefira
--format mdou--format json— o defaulttabletrunca colunas em terminais estreitos. Flags--format/--quiet/--limitsão GLOBAIS e vêm ANTES do subcomando.
| # | Padrão | Exemplo |
|---|---|---|
| 1 | ISO 8601 + thread_id | 2026-05-21T08:15:00.123-03:00 1648| ... |
| 2 | THREAD ERROR PT-BR | THREAD ERROR ([31716], TIRETPIN, THIS) 06/05/2026 22:42:06 |
| 3 | Timestamp PT-BR isolado | [06/05/2026 22:42:06] ... |
| 4 | Severity bracket | [ERROR] AppServer fail to start |
Cada evento começa com 1 desses headers; linhas subsequentes viram body (preserva THREAD ERROR + stacktrace e dumps SQL multi-linha intactos).
| Categoria | Severidade típica | Sinais |
|---|---|---|
database | critical | ORA-xxx, Error - TOPCONN, Ctree Error |
thread_error | critical | THREAD ERROR (...), type mismatch, array bounds |
rpo | critical | CheckAuth ERROR, EMPTY RPO, function not found |
compilation | critical | ARQ.PRW(N) Cxxx Syntax Error |
service | critical | HTTP Server fail to start, Server shutdown |
rest_api | critical | Error 500, Fail to write response |
network | warning | SSL timeout, TLS init error |
connection | warning | inactivity timeout, Error ending thread |
authentication | warning | LogonUser code 1326/1327/1331 |
shutdown | warning | Closing connections.. Retry N |
application | warning | [WARNING] genérico |
lifecycle | info | Server is running, in shutdown |
/plugadvpl:log-diagnose — auto-discover + diagnose completo/plugadvpl:log-diagnose /var/log/protheus/ — diretório explícito/plugadvpl:log-diagnose console.log error.log — múltiplos arquivos/plugadvpl:log-diagnose --severity critical --since 24h — críticos das últimas 24h dentro do log/plugadvpl:log-diagnose --category database — só erros de banco/plugadvpl:log-diagnose --rule LOG-DB-ORA --format json — todas as ORA-xxx em JSONPara cada finding:
sugestao_fix (correction tip da KB TDN, com URL oficial quando aplicável)ora_code (quando ORA-xxx aparece), usuario + host (quando Thread finished/Error ending thread)/plugadvpl:log-diagnose --rule <REGRA> --format json — drill-down em 1 padrão/plugadvpl:log-diagnose --category thread_error --format md — todas as THREAD ERRORnpx claudepluginhub jonipraia/plugadvpl --plugin plugadvplAudits Protheus INI files (appserver, dbaccess, smartclient, tss, broker) against 487 TDN-official best-practice rules. Detects misconfigurations via value checks, range checks, regex, and key presence.
Search logs and codebases for error patterns, stack traces, and anomalies. Correlates errors across systems to identify root causes and monitoring gaps.
Searches and analyzes logifai-captured development logs in NDJSON format using Read, Grep, Glob, Bash. Debugs errors, runtime issues, reviews activity via keywords, timestamps, stack traces, logifai:// URIs.