Toolverse
All skills

sql-check

by openclaw

Analyze SQL queries for performance and security issues

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
openclaw
Category
Security

About this skill

Analyze SQL queries for performance and security issues

How to use

  1. Upewnij się, że masz zainstalowany Node.js w wersji 18 lub wyższej oraz ustawioną zmienną środowiskową OPENAI_API_KEY z kluczem API OpenAI.

  2. Uruchom narzędzie bezpośrednio z linii poleceń, przekazując zapytanie SQL jako argument: npx ai-sql-check "SELECT * FROM users WHERE name LIKE '%john%'". Narzędzie natychmiast przeanalizuje zapytanie i wyświetli problemy z wydajnością oraz zagrożenia bezpieczeństwa.

  3. Aby analizować zapytania z pliku, użyj flagi --file: npx ai-sql-check --file ./queries/report.sql. Narzędzie wczyta zawartość pliku i przeprowadzi analizę.

  4. Jeśli chcesz uzyskać bardziej dokładną analizę, dostarczysz schemat bazy danych za pomocą flagi --schema: npx ai-sql-check --file query.sql --schema ./schema.sql. Dzięki temu narzędzie będzie mogło sprawdzić, czy kolumny w klauzuli WHERE są indeksowane.

  5. Przejrzyj wyniki, które zawierają trzy sekcje: problemy wydajności (takie jak SELECT *, brakujące indeksy, LIKE z symbolem wieloznacznym na początku), ostrzeżenia bezpieczeństwa (wzorce SQL injection) oraz konkretne sugestie optymalizacji.

  6. Zastosuj rekomendacje w swoim kodzie, takie jak wybieranie tylko potrzebnych kolumn, dodawanie indeksów na kolumnach używanych w WHERE oraz unikanie Cartesian joins.

Related skills

obsidian

by gapmiss

Comprehensive guidelines for Obsidian.md plugin development including all 27 ESLint rules, TypeScript best practices, memory management, API usage (requestUrl vs fetch), UI/UX standards, and submission requirements. Use when working with Obsidian plugins, main.ts files,

Security
14111

brand-voice

by anthropics

Apply and enforce brand voice, style guide, and messaging pillars across content. Use when reviewing content for brand consistency, documenting a brand voice, adapting tone for different audiences, or checking terminology and style guide compliance.

Security
48158

typescript-review

by metabase

Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.

Security
17133

qmd

by tobi

Search personal markdown knowledge bases, notes, meeting transcripts, and documentation using QMD - a local hybrid search engine. Combines BM25 keyword search, vector semantic search, and LLM re-ranking. Use when users ask to search notes, find documents, look up information in

Security
1951

gmail-manager

by jeffvincent

Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.

Security
17128

openapi-spec-generation

by wshobson

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

Security
18109