One-click install
npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill sql-code-review-totvs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-code-review
Source: https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/sql-code-review
Command: npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill sql-code-review-totvs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you review SQL code for security vulnerabilities, performance bottlenecks, and maintainability problems before they reach production.

Core Features & Use Cases

  • Comprehensive SQL review workflow: checks security, performance, code quality, and schema design with prioritized findings (CRITICAL/HIGH/MEDIUM/LOW).
  • Database-agnostic guidance with engine specifics: supports PostgreSQL, SQL Server, and Oracle patterns while also including Protheus/ADVPL SQL considerations (e.g., ChangeQuery and Protheus-specific access patterns).
  • Actionable, template-driven remediation: produces issues with location, risk, performance impact, and before/after SQL recommendations.

Quick Start

Ask the agent to review the SQL you provide for injection risk, anti-patterns, indexing, formatting, and schema best practices.

Frequently Asked Questions about sql-code-review

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

FAQPage Schema
How do I review SQL code for security vulnerabilities and performance issues?

SQL code review identifies security flaws, performance bottlenecks, and maintainability problems using a prioritized checklist. It analyzes SQL injection risks, access control, index correctness, and query structure, providing actionable before and after remediation recommendations.

What is the best way to check SQL queries for anti-patterns and injection risks?

Checking SQL queries for anti-patterns involves a checklist-based analysis covering SQL injection prevention, data protection, and join correctness. The review outputs prioritized findings categorized by risk level, detailing location, performance impact, and remediation steps.

Can I use this SQL review process for PostgreSQL, SQL Server, and Oracle?

SQL review supports database-agnostic guidance with engine specifics for PostgreSQL, SQL Server, and Oracle. It verifies database portability and standards while applying dialect translation patterns to ensure compatibility across different database engines.

Does Protheus ADVPL SQL require special code review considerations?

Protheus ADVPL SQL requires specific code review considerations including ChangeQuery usage and Protheus-specific access patterns. The review process integrates these requirements to ensure query maintainability and proper dialect translation within the Protheus environment.

How do I audit SQL access control and data protection before production deployment?

Auditing SQL access control and data protection involves reviewing permissions and encryption within the SQL code. The review identifies missing access controls and data exposure risks, categorizing them as CRITICAL or HIGH priority issues requiring immediate remediation.