DB Migrations
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
Build optimized and safe SQL queries for Protheus tables. An agent skill from totvs/engpro-advpl-tlpp-skills.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builder --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .claude/skills/query-builder && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .claude/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builderType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builder --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .agents/skills/query-builder && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .agents/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builder --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .cursor/skills/query-builder && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .cursor/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/totvs/engpro-advpl-tlpp-skills.git --path skills/advpl-tlpp/query-builder--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builder --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .gemini/skills/query-builder && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .gemini/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builderInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .github/skills/query-builder && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .github/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills query-builder --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/advpl-tlpp/query-builder .opencode/skills/query-builder && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "query-builder" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/query-builder into .opencode/skills/query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-builder", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
query-builderBuild optimized and safe SQL queries for Protheus tables. An agent skill from totvs/engpro-advpl-tlpp-skills.
Query Builder is an agent skill from totvs/engpro-advpl-tlpp-skills. Build optimized and safe SQL queries for Protheus tables. Automatically includes mandatory filters (DELET, branch), suggests appropriate indexes from SIX patterns, generates both Embedded SQL (preferring FWExecStatement) and Workarea (DBSelectArea/DBSeek) versions, and warns about common Protheus SQL pitfalls. Use when user says 'build query', 'SQL for Protheus table', 'FWExecStatement', 'TCQuery', 'Workarea vs SQL'.
Its SKILL.md is about 4.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/cross-database-compatibility.md` and `references/query-patterns-and-examples.md`).
It sits in Databases, covering SQL and ORMs and data access. It works with SQL. The repository describes itself as: Repositório contendo skills para orientar desenvolvimento ADVPL/TLPP com agentes de IA. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 3908e4e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Query Builder loads about 4.7k tokens when it runs, and up to ~8.4k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 1,628 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from totvs/engpro-advpl-tlpp-skills at commit 3908e4e, republished under its MIT licence (© totvs). 1,628 words, ~4,686 tokens.
.claude/skills/query-builder/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Build correct, safe, and optimized SQL queries for Protheus ERP tables. Protheus has unique database conventions — mandatory soft-delete filters, multi-branch filtering, Hungarian notation for fields, data dictionary-driven schemas, and specific index patterns — that every query must respect. This skill generates queries that follow these conventions and helps choose between Workarea access and Embedded SQL.
Use this skill when:
FWExecStatement, TCSqlExec) in AdvPL/TLPPThis skill uses progressive disclosure. The SKILL.md body covers conventions, decision logic, the checklist, and anti-patterns. Detailed code templates and cross-database reference tables are in the references/ directory — read them on demand based on the scenario:
| Reference File | When to Read | Content |
|---|---|---|
| references/query-patterns-and-examples.md | Generating query code — Workarea, Embedded SQL, multi-table JOINs, TCSqlExec updates, counting, or reviewing SQL injection prevention examples | Full code templates for all 5 query patterns, safe/unsafe FWExecStatement examples, LIKE clause parameterization |
| references/cross-database-compatibility.md | Handling cross-database concerns — ChangeQuery(), TCGetDB(), DBAccess macros, or translating functions between MSSQL / PostgreSQL / Oracle | ChangeQuery and TCGetDB code examples, DBAccess macros table, cross-database function equivalents (9 operations × 4 dialects) |
Also refer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference shared across skills.
Protheus table aliases follow the pattern XXN where XX is the module prefix and N is a sequence:
| Prefix | Module | Example Tables |
|---|---|---|
| SA | Customers/Vendors | SA1 (Customers), SA2 (Vendors), SA3 (Salespeople) |
| SB | Products | SB1 (Products), SB2 (Stock Balances), SB5 (Supplements) |
| SC | Purchasing | SC1 (Purchase Requests), SC5 (Sales Orders Header), SC6 (Sales Orders Items), SC7 (Purchase Orders) |
| SD | Documents | SD1 (Incoming Invoices Items), SD2 (Outgoing Invoices Items), SD3 (Internal Movements) |
| SE | Financial | SE1 (Accounts Receivable), SE2 (Accounts Payable), SE5 (Cash Movements) |
| SF | Invoices | SF1 (Incoming Invoices Header), SF2 (Outgoing Invoices Header) |
| SX | Data Dictionary | SX1 (Parameters), SX2 (Tables), SX3 (Fields), SX5 (Lookup Tables), SX6 (System Parameters), SX7 (Triggers), SIX (Indexes) |
| ZZ | Custom | ZZ1-ZZZ (Custom tables created by customer, also Z01-Z99, ZA0-ZAZ, etc.) |
The physical table name in the database appends the company code:
| Alias | Physical Name | Rule |
|---|---|---|
| SA1 | SA1010 | Alias + Company ("01") + Branch padding ("0") |
| SD1 | SD1010 | Same pattern |
Use RetSQLName("SA1") to get the correct physical table name dynamically.
Fields follow the pattern XX_FIELD where XX matches the table alias prefix:
| Table | Field | Meaning |
|---|---|---|
| SA1 | A1_COD | Customer code |
| SA1 | A1_NOME | Customer name |
| SD1 | D1_DOC | Invoice document number |
| SD1 | D1_TOTAL | Invoice item total |
| SF2 | F2_DOC | Outgoing invoice number |
Every query against Protheus tables MUST include these filters:
| Field | Filter | Purpose |
|---|---|---|
D_E_L_E_T_ | = ' ' (single space) | Soft-delete flag. Records with '*' are logically deleted |
XX_FILIAL | = cFilAnt or = FWxFilial("XXX") | Multi-branch filter |
-- ALWAYS include both filters
SELECT A1_COD, A1_NOME
FROM SA1010 SA1
WHERE SA1.D_E_L_E_T_ = ' '
AND SA1.A1_FILIAL = '01'Warning: Omitting
D_E_L_E_T_will return deleted records. Omitting the branch filter will return records from all branches, which is usually incorrect and a security risk.
This skill supports five query patterns. Read references/query-patterns-and-examples.md for the full code templates.
| Pattern | Approach | When to Use |
|---|---|---|
| 1 — Simple Select (Workarea) | DbSelectArea + DbSeek | Single record lookup by existing index, record-by-record operations |
| 2 — Simple Select (Embedded SQL) | FWExecStatement + OpenAlias / ExecScalar | Aggregations, complex filters, no suitable index for Workarea |
| 3 — Multi-Table Join | Embedded SQL with INNER JOIN | Cross-table reporting, invoice details with product names |
| 4 — INSERT/UPDATE (TCSqlExec) | FWExecStatement + TCSqlExec | Direct SQL writes (bypasses data dictionary triggers) |
| 5 — Counting Records | FWExecStatement:ExecScalar() on SELECT COUNT(*) | Record counts with filters |
Important: Pattern 4 (TCSqlExec) bypasses data dictionary validations and triggers. Prefer Workarea
RecLock/MsUnlockfor standard CRUD operations.
| Criterion | Workarea (DBSeek) | Embedded SQL (FWExecStatement) |
|---|---|---|
| Single record lookup by key | Best choice | Acceptable |
| Sequential scan by index | Best choice | Acceptable |
| Complex multi-table joins | Poor (requires nested seeks) | Best choice |
| Aggregations (SUM, COUNT) | Very poor | Best choice |
| Large result sets | Better memory control | Good (but watch alias handling) |
| Record locking for update | Required | Use FWExecStatement + TCSqlExec (bypasses triggers) |
| Performance (key-based) | Fastest | Slight overhead |
| Data dictionary trigger execution | Automatic | Not triggered |
| Index requirement | Must have suitable SIX index | Any column |
| Code readability for complex queries | Poor | Best choice |
Rule of thumb: Use Workarea for CRUD operations on single records. Use Embedded SQL for reporting, aggregation, and complex joins.
Protheus indexes are defined in the SIX table. The first index of each table (order 1) is typically the primary key.
| Table | Order | Key Expression | Use Case |
|---|---|---|---|
| SA1 | 1 | A1_FILIAL + A1_COD + A1_LOJA | Primary key — customer lookup |
| SA1 | 3 | A1_FILIAL + A1_CGC | Find customer by tax ID |
| SA2 | 1 | A2_FILIAL + A2_COD + A2_LOJA | Primary key — vendor lookup |
| SB1 | 1 | B1_FILIAL + B1_COD | Primary key — product lookup |
| SD1 | 1 | D1_FILIAL + D1_DOC + D1_SERIE + D1_FORNECE + D1_LOJA + D1_COD + D1_ITEM | Incoming invoice item |
| SD2 | 1 | D2_FILIAL + D2_DOC + D2_SERIE + D2_CLIENTE + D2_LOJA + D2_COD + D2_ITEM | Outgoing invoice item |
| SE1 | 1 | E1_FILIAL + E1_PREFIXO + E1_NUM + E1_PARCELA + E1_TIPO | Accounts receivable |
| SF2 | 1 | F2_FILIAL + F2_DOC + F2_SERIE | Outgoing invoice header |
For SQL Server, use the %nolock% DBAccess macro on read queries. This macro translates to WITH (NOLOCK) on MSSQL and is silently ignored on PostgreSQL/Oracle (MVCC), making it safe to use in cross-database code:
SELECT A1_COD, A1_NOME
FROM SA1010 SA1 WITH (%nolock%)
WHERE SA1.D_E_L_E_T_ = ' '
AND SA1.A1_FILIAL = '01'
AND SA1.A1_COD = '000001'
AND SA1.A1_LOJA = '01'Tip: Always order WHERE clauses to match the index key expression order for the query optimizer.
Never concatenate user input directly into SQL strings. Use FWExecStatement to parameterize all dynamic values.
The safe pattern:
? placeholders for every dynamic value (filter, branch, deletion flag).ChangeQuery() for cross-database compatibility.FWExecStatement():New(cQuery) (or FWPreparedStatement on libs older than 20211116).SetString(), SetNumeric(), SetDate(), SetBoolean(), SetIn().cAlias := oStatement:OpenAlias([cAlias][, cLifeTime, cTimeout])xValue := oStatement:ExecScalar(cColumn[, cLifeTime, cTimeout])TCSqlExec(oStatement:GetFixQuery())(cAlias)->(DBCloseArea())) and call oStatement:Destroy().For LIKE clauses, build the % wildcard on the AdvPL side ("%" + cSearch + "%") and bind the whole string as a single ? parameter — this avoids cross-DB concat operator differences.
Do not use
SetUnsafe()with user input. It bypasses bind safety and reintroduces SQL injection risk; reserve it for identifiers built from constants.
Cache (optional):
OpenAlias/ExecScalaracceptcLifeTimeandcTimeout(seconds, as character) to reuse a cached result from DBAccess for hot, repeatedly executed queries.
Read references/query-patterns-and-examples.md for complete safe/unsafe code examples, the full method reference, and LIKE-clause examples.
| Anti-Pattern | Problem | Fix |
|---|---|---|
Missing D_E_L_E_T_ filter | Returns deleted records | Always add WHERE D_E_L_E_T_ = ' ' |
| Missing branch filter | Returns records from all branches | Always add AND XX_FILIAL = '...' |
SELECT * on Protheus tables | Returns dozens of system fields, slow | List only the fields you need |
| Full table scan on SD1/SD2 | Millions of rows, very slow | Use indexed columns in WHERE |
Not using %nolock% | Lock contention on read queries | Add WITH (%nolock%) to SELECT tables — cross-DB safe (ignored on PostgreSQL/Oracle) |
D_E_L_E_T_ filter on JOINs missing | Joined table returns deleted records | Add D_E_L_E_T_ = ' ' to every table in JOIN |
| Hardcoded company/branch codes | Breaks in multi-company environments | Use FWxFilial(), RetSQLName() |
Not closing query aliases / FWExecStatement | Memory leak, alias exhaustion | Always call (cAlias)->(DBCloseArea()) and oStatement:Destroy() |
| Macro execution in SQL | SQL injection risk | Use FWExecStatement for parameterized values |
Missing RetSQLName() | Wrong physical table name in multi-company | Always use RetSQLName("XXX") |
| Creating procedures in source | Prohibited by SonarQube | Use SPManager for procedure management |
| Using IIF in SQL expressions | Prohibited — use CASE WHEN or If/Else in AdvPL logic | Replace IIF() with If/Else/EndIf or SQL CASE WHEN |
| Direct access to SIX/SX2/SX3 via DbSelectArea | Prohibited metadata access | Use RetSqlName() for SX2, FWSX3Util() for SX3, standard APIs for SIX |
| GetMV/ExistBlock inside loops | Performance degradation | Cache result in a variable before the loop |
D_E_L_E_T_ = ' ' included for every table in the queryXX_FILIAL) included for every tableRetSQLName("XXX")FWExecStatement (preferred over raw TCQuery)GetNextAlias() and opened via FWExecStatement:OpenAlias()DBCloseArea() in all code paths (including errors) and FWExecStatement:Destroy() is calledSELECT *)%nolock% hint used for SQL Server read queries&cExpr) in SQL stringsGetArea()/RestArea()IIF() in query construction or expressions — use If/Else/EndIf or SQL CASE WHENCREATE PROCEDURE in source — use SPManagerGetMV()/ExistBlock() results cached before use in loopsRefer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference.
Protheus supports PostgreSQL, MSSQL Server, and Oracle. All generated SQL must work across all three, or use framework tools to handle differences:
ChangeQuery(cQuery) — translates SQL syntax to the active database dialect (TOP → LIMIT, etc.). BeginSQL/EndSQL calls it automatically.TCGetDB() — returns "MSSQL", "ORACLE", or "POSTGRES" for DB-specific branching when ChangeQuery() is insufficient.%nolock%, %notDel%, %table:XXX%, %Order:XXX% — translated per database in SQL strings.COALESCE, CASE WHEN, CONCAT, FETCH FIRST) or rely on ChangeQuery().Read references/cross-database-compatibility.md for full code examples, the DBAccess macros table, and the cross-database function equivalents reference (MSSQL vs PostgreSQL vs Oracle).
D_E_L_E_T_ filter: All Protheus queries must include D_E_L_E_T_ = ' ' (or equivalent %notDel%) to exclude logically deleted records. Omitting this returns deleted rows.RetSQLName('alias') to get the physical table name. Hardcoded names like SA1010 will break across environments with different company codes.WHERE clause column order matches the SIX index key expression. Use %nolock% hint for SQL Server read-only queries to avoid lock contention.FWxFilial('alias') for the branch filter. Hardcoding branch codes causes cross-branch data leakage.&(cExpr) to build SQL strings. Use FWExecStatement to parameterize all dynamic values in queries.© totvs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in skills/advpl-tlpp/query-builder of totvs/engpro-advpl-tlpp-skills.
Open the folder on GitHubat commit 3908e4e
Query Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Query Builder this skilltotvs/engpro-advpl-tlpp-skills | 141 | — | ~4.7k | Automated safety check: Pass | MIT | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None | |
| Optimizing Ef Core Queriesdotnet/skills | 5.6k | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Migrationkortix-ai/suna | 20k | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Frappe Core DatabaseImpertio-Studio/Frappe_Claude_Skill_Package | 187 | — | ~3.8k | Automated safety check: Pass | MIT | |
| SQL ReviewArchive228/loopkit | 755 | — | ~217 | Automated safety check: Pass | MIT |
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
dotnet/skills
Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster.
kortix-ai/suna
How to change the database schema in this repo. An agent skill from kortix-ai/suna.
Impertio-Studio/Frappe_Claude_Skill_Package
A skill your agent uses when performing database operations in ERPNext/Frappe v14-v16.
Archive228/loopkit
Review SQL and ORM queries for correctness, safety, and performance before they ship.
seb1n/awesome-ai-agent-skills
Diagnose and optimize existing slow SQL queries using execution plans, indexing strategies, query rewriting, and ORM tuning.
totvs/engpro-advpl-tlpp-skills
Converts AdvPL and TLPP source files from UTF-8 to Windows-1252 in place after code generation, because the Protheus compiler accepts only CP1252 files.
totvs/engpro-advpl-tlpp-skills
Compiles AdvPL and TLPP sources from VS Code with the TOTVS Developer Studio extension, handling server setup, connection and compile result reporting.
totvs/engpro-advpl-tlpp-skills
Plans and builds Protheus AdvPL/TLPP features through Specify, Design, Tasks and Execute phases whose depth scales with the size of the change.
totvs/engpro-advpl-tlpp-skills
Reviews AdvPL and TLPP source against SonarQube rules, ProtheusDOC requirements, security, performance and Protheus conventions, and reports findings by severity.
totvs/engpro-advpl-tlpp-skills
Queries the TOTVS Protheus ERP data dictionary for tables, fields, indexes, parameters, triggers and lookups, including impact checks during refactoring.
totvs/engpro-advpl-tlpp-skills
Generates Protheus MVC screens in ADVPL/TLPP, with ModelDef, ViewDef, MenuDef and Browse functions for single-entity and master-detail layouts.
Works with
Categories
Build optimized and safe SQL queries for Protheus tables. An agent skill from totvs/engpro-advpl-tlpp-skills. Query Builder is an agent skill from totvs/engpro-advpl-tlpp-skills. Build optimized and safe SQL queries for Protheus tables.
Query Builder fits situations like: user says build query; SQL for Protheus table; FWExecStatement; workarea vs SQL.
Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a claude-code`. Or copy the skill folder (skills/advpl-tlpp/query-builder in totvs/engpro-advpl-tlpp-skills) into .claude/skills/query-builder in your project. Claude Code loads it when a task matches its description.
Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a codex`. Or copy the skill folder (skills/advpl-tlpp/query-builder in totvs/engpro-advpl-tlpp-skills) into .agents/skills/query-builder in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add totvs/engpro-advpl-tlpp-skills --skill query-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/query-builder, .gemini/skills/query-builder, .github/skills/query-builder and .opencode/skills/query-builder in your project.
SKILL.md names no scripts, command-line tools or credentials: Query Builder is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Query Builder is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.7k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Query Builder: DB Migrations (kurealnum/dotfiles, 290 stars), Optimizing Ef Core Queries (dotnet/skills, 5.6k stars), Migration (kortix-ai/suna, 20k stars) and Frappe Core Database (Impertio-Studio/Frappe_Claude_Skill_Package, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
totvs (a GitHub organization) maintains it in totvs/engpro-advpl-tlpp-skills, which has 141 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.
Source: totvs/engpro-advpl-tlpp-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.