スキル一覧に戻る
koriym

sql-quality-check

by koriym

MySQL query analyzer that detects potential performance issues in SQL files.

3🍴 2📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: sql-quality-check description: Analyze SQL files for performance issues like full table scans, ineffective joins, and inefficient queries. Reports findings in a CI-friendly format without modifying files. Detects critical issues (FullTableScan, IneffectiveJoin) and warnings (IneffectiveSort, TemporaryTableGrouping).

SQL Quality Check

Analyze SQL files for performance issues. Suitable for CI pipelines.

Arguments

  • $ARGUMENTS: SQL directory and params file (e.g., "tests/sql tests/params/sql_params.php")

Steps

1. Run Analysis

php bin/sql-quality analyze \
  --sql-dir="$(echo $ARGUMENTS | cut -d' ' -f1)" \
  --params="$(echo $ARGUMENTS | cut -d' ' -f2)" \
  --format=json

2. Report Results

Parse the JSON output and report:

Summary Table:

SQL FileCostIssues
file.sql497.95FullTableScan, IneffectiveSort

Issue Severity:

  • CRITICAL: FullTableScan, IneffectiveJoin (block release)
  • WARNING: IneffectiveSort, TemporaryTableGrouping (review recommended)
  • INFO: Other issues (minor impact)

3. Exit Status for CI

  • Exit 0: No critical issues found
  • Exit 1: Critical issues detected (FullTableScan, IneffectiveJoin)

Report format for CI:

SQL Quality Check: FAILED
- 3 critical issues found
- 2 warnings found

Critical:
  1_full_table_scan.sql: FullTableScan (cost: 497.95)
  4_no_index_on_join.sql: IneffectiveJoin (cost: 234.50)

Run '/sql-quality-fix' to auto-fix these issues.

4. Output

DO NOT modify any files. Only report findings.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です