agentsclimarketplace

Tds sqlkit

Skill brunosps/tds-protheus-tools/skills/tds-sqlkit

Build, optimize, and review SQL for Protheus and relational databases (PostgreSQL, SQL Server, Oracle). Builds safe queries with mandatory filters (D_E_L_E_T_, branch xFilial), suggests SIX-based indexes, generates Embedded SQL (preferring FWExecStatement) and Workarea (DBSelectArea/DBSeek) versions; optimizes slow queries (execution plans, indexing, pagination, batch ops); reviews SQL for injection, anti-patterns, and quality. Use when the user says 'build query', 'SQL for Protheus table', 'FWExecStatement', 'TCQuery', 'optimize SQL', 'slow query', 'index strategy', 'execution plan', 'review SQL', 'SQL security audit', 'SQL anti-patterns'.From its SKILL.md

Install
npx -y skills add brunosps/tds-protheus-tools --skill tds-sqlkit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.4 KB, as published. Nobody here has run it

TDS SqlKit — Build, Optimize & Review SQL

Three SQL jobs in one skill. Identify the intent first:

  • Build a new query for Protheus tables → Part 1.
  • Optimize a slow/expensive query → Part 2.
  • Review existing SQL for security/quality → Part 3.

Part 1 — Build (Protheus-aware)

Generate safe, correct queries for Protheus tables. Always inject the mandatory filters and prefer parameter binding:

  • Soft-delete filter D_E_L_E_T_ = ' ' on every table.
  • Branch scope via xFilial()/FWxFilial().
  • Prefer FWExecStatement() with bind parameters (?) over string concatenation (avoids the [CA2050] SQL-injection rule).
  • Suggest the right index from SIX patterns; offer both Embedded SQL and Workarea (DBSelectArea/DBSeek) versions when relevant.
ReferenceRead when
references/query-patterns-and-examples.mdQuery templates and worked examples (FWExecStatement, TCQuery, Workarea).
references/cross-database-compatibility.mdWriting portable SQL across PostgreSQL / SQL Server / Oracle (functions, paging, dates).

Part 2 — Optimize

Tune query performance: execution-plan analysis, indexing strategy, pagination, batch operations, and monitoring across PostgreSQL, SQL Server, and Oracle.

ReferenceRead when
references/sql-optimization.mdThe optimization workflow and decision guide.
references/sql-optimization-patterns.mdConcrete before/after tuning patterns (indexes, joins, paging, batching).

Part 3 — Review

Audit SQL for SQL-injection prevention, access control, code standards, and anti-patterns.

ReferenceRead when
references/sql-security-patterns.mdInjection prevention, parameterization, access control.
references/sql-performance-and-quality-patterns.mdAnti-pattern detection and maintainability checks.
references/database-specific-best-practices.mdEngine-specific best practices (PostgreSQL / SQL Server / Oracle).

Related Skills

  • tds-codex — the data dictionary (tables/fields/indexes) behind the queries.
  • tds-forge — quality-gate flags raw SQL concatenation ([CA2050]), missing D_E_L_E_T_ ([TDS-DELET]) and missing xFilial ([TDS-FILIAL]).

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.