# Oracle Trivadis Ptbr

> Trivadis PL/SQL Guidelines 4.4 — nomenclatura, estrutura de código e revisão. ATIVE em revisar código Oracle com padrão Trivadis, validar prefixos (g_, gc_, l_, lc_, p_, r_, t_, co_, e_), naming PT-BR em variáveis/tabelas/colunas, checklist antes de deploy/GMUD, "esse código segue Trivadis?", "qual prefixo usar?", "como nomear essa variável?", "revisa esse package". NÃO ATIVE em geração de código…

- **Type:** Skill
- **Install:** `agentstack add skill-maxwbh-oracle-skills-ptbr-oracle-trivadis-ptbr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Maxwbh](https://agentstack.voostack.com/s/maxwbh)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Maxwbh](https://github.com/Maxwbh)
- **Source:** https://github.com/Maxwbh/oracle-skills-ptbr/tree/main/skills/oracle-trivadis-ptbr
- **Website:** https://maxwbh.github.io/oracle-skills-ptbr/

## Install

```sh
agentstack add skill-maxwbh-oracle-skills-ptbr-oracle-trivadis-ptbr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# oracle-trivadis-ptbr — v2.0.0

Trivadis PL/SQL Guidelines 4.4 — padrão de nomenclatura, estrutura de código e checklist de revisão.

**Desenvolvido por:** Maxwell da Silva Oliveira — [M&S do Brasil LTDA](https://msbrasil.inf.br)

## Áreas cobertas

| Área | Reference |
|---|---|
| **Trivadis Guidelines 4.4** | `references/plsql-trivadis-guidelines.md` |

> **Referência cruzada:** Esta skill documenta o padrão. As skills `oracle-plsql-ptbr`, `oracle-apex-ptbr`, `oracle-ords-ptbr`, `oracle-dba-ptbr` e `oracle-tuning-ptbr` aplicam Trivadis automaticamente em todo código gerado.

## Quando ativar

- "Esse código segue Trivadis?" — revisão explícita de padrão
- "Qual prefixo usar para essa variável/cursor/constante?"
- "Como nomear essa tabela/coluna/package em PT-BR?"
- Checklist pré-deploy / pré-GMUD: validar naming antes de subir para produção
- Auditoria de código legado: identificar desvios do padrão
- Dúvidas sobre convenções: exceções locais vs globais, packages nativos Oracle em inglês, status values em PT-BR

**Não usar** para: geração de código PL/SQL (→ oracle-plsql-ptbr), APEX, ORDS, DBA ops, tuning.

## Prefixos canônicos Trivadis

| Prefixo | Uso | Exemplo |
|---|---|---|
| `g_` | Variável global (package) | `g_ultima_execucao` |
| `gc_` | Constante global (package) | `gc_nome_pacote` |
| `l_` | Variável local | `l_total_pago` |
| `lc_` | Constante local | `lc_nome_unidade` |
| `p_` | Parâmetro | `p_id_fatura` |
| `r_` | Record | `r_fatura` |
| `t_` | Type (collection, record) | `t_lista_ids` |
| `co_` | Cursor | `co_faturas_pendentes` |
| `e_` | Exception user-defined | `e_estado_invalido` |

## Checklist de revisão — o que verificar

1. **Naming:** variáveis, procedures, functions, tabelas e colunas em PT-BR (exceto keywords Oracle, pacotes nativos, prefixos Trivadis)
2. **Prefixos Trivadis:** `g_`, `gc_`, `l_`, `lc_`, `p_`, `r_`, `t_`, `co_`, `e_` aplicados corretamente
3. **Keywords em inglês:** `BEGIN`, `END`, `EXCEPTION`, `BULK COLLECT`, `FORALL`, `MERGE INTO` nunca traduzidos
4. **Pacotes nativos em inglês:** `DBMS_LOB`, `APEX_JSON`, `UTL_HTTP`, `DBMS_STATS` nunca traduzidos
5. **`lc_nome_unidade`** declarado em toda procedure pública
6. **`gc_nome_pacote`** declarado no package body
7. **Comentários em PT-BR** — explicam o PORQUÊ, não o QUÊ
8. **Status values em PT-BR:** `'PENDENTE'`, `'PAGO'`, `'CANCELADO'`, `'ATIVO'`, `'PROCESSADO'`
9. **`WHEN OTHERS THEN NULL`** ausente — sempre propagar com contexto
10. **`DBMS_OUTPUT`** ausente em produção — substituído por Logger

## O que fica em inglês obrigatoriamente

| Categoria | Exemplos |
|---|---|
| Keywords SQL/PL/SQL | `BEGIN`, `END`, `EXCEPTION`, `BULK COLLECT`, `FORALL`, `RETURN`, `IS`, `AS` |
| Pacotes Oracle nativos | `DBMS_LOB`, `DBMS_OUTPUT`, `DBMS_STATS`, `APEX_JSON`, `UTL_HTTP` |
| Funções built-in | `SYSDATE`, `NVL`, `COALESCE`, `TO_DATE`, `INSTR`, `SUBSTR` |
| Variáveis sistema APEX | `:APP_USER`, `:APP_SESSION`, `:APP_ID` |
| Hints | `/*+ APPEND */`, `/*+ PARALLEL */`, `/*+ INDEX */` |
| Prefixos Trivadis | `g_`, `gc_`, `l_`, `lc_`, `p_`, `r_`, `t_`, `co_`, `e_` |

## Referências cruzadas

| Precisa de | Skill |
|---|---|
| Geração de código PL/SQL, packages | **oracle-plsql-ptbr** |
| Código dentro de APEX processes | **oracle-apex-ptbr** |
| Código dentro de ORDS handlers | **oracle-ords-ptbr** |
| Scripts DBA com padrão Trivadis | **oracle-dba-ptbr** |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Maxwbh](https://github.com/Maxwbh)
- **Source:** [Maxwbh/oracle-skills-ptbr](https://github.com/Maxwbh/oracle-skills-ptbr)
- **License:** MIT
- **Homepage:** https://maxwbh.github.io/oracle-skills-ptbr/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-maxwbh-oracle-skills-ptbr-oracle-trivadis-ptbr
- Seller: https://agentstack.voostack.com/s/maxwbh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
