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/sxgen.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/sxgen)<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/sxgen"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/sxgen/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/sxgen"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/sxgen.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.00657 |
| Opus 5 | $0.00000 | $0.00329 |
| Sonnet 5 | $0.00000 | $0.00131 |
| Haiku 4.5 | $0.00000 | $0.00066 |
Grade A, and why
sxgen 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.
How it starts
The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/sxgen — Generate Protheus SX data dictionary configuration scripts for tables, fields, indexes, groups, and lookups
You are an expert ADVPL/TLPP assistant for TOTVS Protheus. This command generates Protheus data dictionary (SX) configuration scripts from a natural-language description.
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 skills/sx-configuration/reference.md.
Configuration types
| Type | What it generates |
|---|---|
sx2 |
Table header (X2_CHAVE, X2_ARQUIVO, X2_NOME, X2_MODO) — required before SX3 for new custom tables |
sx3 |
Field definitions (X3_ARQUIVO, X3_CAMPO, X3_TIPO, etc.) plus SX7 triggers |
six |
Index definitions (INDICE, ORDEM, CHAVE, NICKNAME) |
sxg |
Field group (XG_GRUPO, XG_TAMANHO, XG_TIPO) — shared size contract across tables |
sxa |
Form folder/tab (XA_ALIAS, XA_ORDEM, XA_DESCRIC) for MVC views |
sx1 |
Report question definitions (X1_GRUPO, X1_PERGUNT, X1_TIPO) |
sx5 |
Generic table entries (X5_TABELA, X5_CHAVE, X5_DESCRI) |
sxb |
F3 standard query / lookup (XB_ALIAS, XB_TIPO 1-4, XB_CONTEM) |
sx7 |
Field triggers (X7_CAMPO, X7_REGRA, X7_CDOMIN) — usually auto-generated by sx3 when F3 is set |
Workflow
- Parse the natural-language description that follows the command to identify the SX
--type(auto-detect if not given) and the field specifications. - Validate field types, sizes, and pictures based on the detected type and Protheus conventions.
- Generate the configuration script as formatted key-value blocks with all required attributes.
- Deliver: display it, or write it to
--outputif provided.
Output rules
- Auto-generate pictures based on type (currency, date, code).
- Add
NaoVazio()for required fields,ExistCpo()for fields with F3 lookup, andPertence()for fields with combo options. - Generate SX7 triggers for F3 lookup fields when producing
sx3scripts. - Include 3-language support (pt-BR, es, en) in descriptions.
- Ensure FILIAL is the first component of every index (
six). - The output is a script/reference for manual input in Configurador or for APSDU/UPDDISTR import — it is not directly executable code.
- 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.
- 11d ago First seen · 36 lines · 0 tokens per session scan A 4e3fcd02eb5f
sxgen is a command published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 657 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
init
Initialize configurations for Supabase local development.
toh-connect
Connect app to Supabase backend with schema and RLS policies.
model-create
Create a new Django model following best-practice conventions.
services
Manage the connect service registry. Register API services and database connections, store credentials, set read-only vs write access, manage the destination allowlist, and report trust status.
p3-data-model
Designs the Data Model with entities and relationships as well as the API design with interface specification. The result is DATAMODEL.md and APISPEC.md as the binding foundation for implementation.
crud
Generates a complete CRUD domain in the house pattern (NestJS or Express + Prisma — picked by the project's real stack, multi-tenant).