db-queries

Format SQL queries with a verification SELECT followed by UPDATE or DELETE.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/paulovictor237/PeveAgent --skill db-queries-paulovictor237
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-queries
Source: https://github.com/paulovictor237/PeveAgent/tree/main/.agents/skills/db-queries
Command: npx skills add https://github.com/paulovictor237/PeveAgent --skill db-queries-paulovictor237

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill formats SQL queries for read and modification operations with an ultra-minimalista and standardized structure. It should be used whenever the user requests a SQL query to simulate changes, verify data before changing, or write UPDATE, DELETE, or any SQL that mutates data. It should also be triggered when the user says "monta o SQL", "gera o SQL de alteração", "cria um UPDATE para", "faz um DELETE onde", "quero conferir antes de alterar", "me dá o SQL pra mudar", "simula a alteração", or any variation of requesting SQL that reads or alters data in a database. In doubt, use this skill — the cost of using it when not necessary is minimal, and the cost of not using it is the user receiving an incorrect format.

Core Features & Use Cases

  • Gera um único bloco SQL com a operação de conferência (SELECT) seguido de UPDATE/DELETE.
  • Suporta múltiplas operações com seções separadas por -- ======.
  • Segue regras de saída estritas: SELECT com id como primeira coluna; liste apenas as colunas que serão alteradas; WHERE id idêntico ao UPDATE/DELETE.
  • Segurança: força WHERE em UPDATE/DELETE para evitar alterações acidentais.

Quick Start

Informe o id e as alterações desejadas para que eu retorne um único bloco SQL pronto para execução.

Frequently Asked Questions about db-queries

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

FAQPage Schema
How do I generate a safe SQL UPDATE statement with a verification query?

To generate a safe SQL UPDATE statement, format a single SQL block containing a verification SELECT followed by the UPDATE mutation. This standardized structure enforces a WHERE clause identical to the SELECT to prevent accidental data modifications.

What is the standard structure for SQL data modification queries to prevent accidental updates?

The standard structure for SQL data modification queries enforces a single SQL block where a verification SELECT precedes the UPDATE or DELETE statement. It mandates listing the id as the first column and requires a WHERE clause to prevent accidental data mutations.

How do I format a SQL DELETE query to verify data before removal?

To format a SQL DELETE query to verify data before removal, generate a combined SQL block that includes a SELECT statement to check the data followed by the DELETE operation. Both statements must use an identical WHERE clause to ensure only the intended records are targeted.

Can I simulate database changes across multiple operations in a single SQL block?

Yes, you can simulate database changes across multiple operations by generating separate sections divided by a comment line. Each section outputs a single SQL block with a verification SELECT and the corresponding UPDATE or DELETE mutation, maintaining strict formatting rules.

Why does my SQL UPDATE query require a WHERE clause identical to the SELECT statement?

Your SQL UPDATE query requires a WHERE clause identical to the SELECT statement to enforce safety and prevent accidental data modifications. This standardized structure ensures the verification step reviews the exact rows that the mutation will alter, guaranteeing data integrity.