agentleFS
DataArtDataArt/artisyn-log-hub/.claude/skills/sql-review/SKILL.md

sql-review

Skill12 starsChanged 7 days agoMITView on GitHub

This is manually activated command, never load it unless run explicitly

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-review and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If execution plan has full scan - suggest to add index, return suggestion from subagent

    line 45

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

IMPORTANT: Never read sql log server/logs/sql-*.log file directly. SQL log is huge JSONL, use JS script to explore it structure.

Steps:

Step 1

check if exists script scripts\api-2-sql-summary.sql, if not create it script should read all sql-* files files from server/logs all record with "endpoint":"..." and build md file see example below


## api: /api/endpoint
min duration: 10ms
max duration: 100ms
avg duration: 50ms
sql calls min: 1
sql calls max: 10

List of distinct sql calls:

| sql call | count |
| --- | --- |
| SELECT * FROM table | 10 |
| INSERT INTO table VALUES (?, ?, ?) | 5 |
| UPDATE table SET column = ? WHERE id = ? | 3 |

script should treat in API endpoints like /api/v1/teams/3/members

3 as parameter - do it by reaplacing any path element which is number OR uuid with $

JS script shuold generate MD file directly from script. Check that script capture enough data to generate MD file.

Step 2

For each API call in subagent for each SQL statement - check using postgresql MCP if this statement if using index If execution plan has full scan - suggest to add index, return suggestion from subagent

Step 3

collect on info on suggested indices into doc\suggested-indices-<timestamp>.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.