srizdebnath/tigergraphskills/ai-llm-query-generation

Claude Code and agent skill by srizdebnath/tigergraphskills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate GSQL queries safely using LLMs. Use when configuring AI agents that translate natural language queries to database GSQL.

Install

npx vskill@latest install srizdebnath/tigergraphskills/ai-llm-query-generation

SKILL.md

The same SKILL.md was published earlier as srizdebnath/tigergraphskills/ai-llm-query-generation.

LLM-Assisted GSQL Query Generation

When to use this

Use when building Natural Language to GSQL (NL2GSQL) agents that generate and execute GSQL queries dynamically from user questions.

Token-Efficient Schema Prompting Technique

Dumping complete DDL schema statements into LLM system prompts wastes thousands of tokens. Use compact graph signature notation to reduce prompt token consumption by up to 85%:

text
# Token-Heavy DDL Format (~450 tokens):
CREATE VERTEX User (PRIMARY_ID id STRING, name STRING, age INT, email STRING, created_at DATETIME) WITH stats="OUTDEGREE_BY_EDGETYPE";
CREATE DIRECTED EDGE friend (FROM User, TO User, since DATETIME) WITH REVERSE_EDGE="friend_of";
# Token-Efficient Compact Notation (~60 tokens):
Vertices: User(id, name, age)
Edges: User -[friend]-> User

Prerequisites

Steps

  1. Extract Compact Schema: Convert your database schema into compact notation (Vertex(attr1, attr2) and Source -[Edge]-> Target).
  2. Construct System Prompt: Pass the compact schema along with GSQL accumulator syntax rules (SumAccum, @local, @@global) to the LLM.
  3. Generate GSQL Query: Request the LLM to output a CREATE QUERY block or INTERPRET QUERY block.
  4. Safety & Security Validation: Scan the generated GSQL code for forbidden DDL keywords (DROP, DELETE, ALTER, CREATE SCHEMA_CHANGE) before execution.
  5. Execute Interpreted Query: Run the query safely via conn.runInterpretedQuery(...) using a read-only token.

Common mistakes

  • Unvalidated Execution: Running raw LLM-generated code without checking for data-modifying DDL commands.
  • SQL Syntax Fallback: Not providing the LLM with GSQL accumulator syntax examples, causing it to hallucinate standard relational SQL GROUP BY syntax instead of ACCUM / POST-ACCUM.

Sources

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/srizdebnath/tigergraphskills/ai-llm-query-generation/badge)](https://verified-skill.com/skills/srizdebnath/tigergraphskills/ai-llm-query-generation)

Something wrong with this skill or its page? Tell us.