/plugadvpl:ingest-sx

Index Protheus SX1..SXG CSV exports into a SQLite database.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/JoniPraia/plugadvpl --skill plugadvpl-ingest-sx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: /plugadvpl:ingest-sx
Source: https://github.com/JoniPraia/plugadvpl/tree/main/skills/ingest-sx
Command: npx skills add https://github.com/JoniPraia/plugadvpl --skill plugadvpl-ingest-sx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of making the TOTVS Protheus SX (SX1..SXG) dictionary searchable and usable for AI answers without re-reading raw files or wasting context.

Core Features & Use Cases

  • Indexes SX CSV exports into SQLite with FTS5 for fast lookup of fields, triggers, queries, questions, groups, and relationships.
  • Auto-detects CSV encoding (cp1252 / utf-8-sig) and delimiter (comma/semicolon) while filtering out D_E_L_E_T_='*' rows.
  • Guards data quality with warnings for likely mis-exported sxg.csv (SX3 dump disguised) and deduplication collisions on primary keys.
  • Typical use: ingest a customer’s exported SX dictionary, then ask the AI questions about Protheus fields/tables/queries with structured context.

Quick Start

Run the ingest on your exported CSV folder by executing: /plugadvpl:ingest-sx ./sx-export.

Frequently Asked Questions about /plugadvpl:ingest-sx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I index a Protheus SX dictionary CSV export for AI retrieval?

Indexing a Protheus SX dictionary CSV export requires running the ingest command on your CSV folder, which auto-detects encoding and delimiters while loading the data into a local SQLite database with FTS5 search.

What is the best way to make Protheus SX1 through SXG tables searchable without wasting context?

The best way to make Protheus SX1 through SXG tables searchable without wasting context is by indexing the exported CSV files into a local SQLite database with FTS5, enabling efficient structured search over tables, fields, and parameters.

Do I need to run an initialization step before ingesting my SX CSV files?

Yes, ingesting SX CSV files requires an existing SQLite index created by the initialization step beforehand, which sets up the database structure needed to perform idempotent upserts of your Protheus dictionary data.

Can I import Protheus SX CSV exports with different encodings and delimiters automatically?

Yes, you can import Protheus SX CSV exports with automatic encoding detection for cp1252 and utf-8-sig, as well as automatic delimiter detection for commas and semicolons during the database ingestion process.

How does the ingestion process handle deleted rows and missing SX dictionary files?

The ingestion process handles deleted rows by filtering out records marked with D_E_L_E_T_='*' and tolerates missing SX dictionary files, ensuring a clean and complete Protheus data import without failing.

What happens if my sxg.csv file is actually a disguised SX3 dump during indexing?

If your sxg.csv file is a disguised SX3 dump during indexing, the ingestion process guards data quality by issuing warnings for likely mis-exported files and deduplication collisions on primary keys.