srizdebnath/tigergraphskills/ai-llm-query-generation
Claude Code and agent skill by srizdebnath/tigergraphskills
- community
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-generationSKILL.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%:
Prerequisites
- Access to TigerGraph schema via pyTigerGraph.
- LLM provider (OpenAI, Anthropic, Gemini, etc.).
- Reference: TigerGraph GraphRAG Repository
Steps
- Extract Compact Schema: Convert your database schema into compact notation (
Vertex(attr1, attr2)andSource -[Edge]-> Target). - Construct System Prompt: Pass the compact schema along with GSQL accumulator syntax rules (
SumAccum,@local,@@global) to the LLM. - Generate GSQL Query: Request the LLM to output a
CREATE QUERYblock orINTERPRET QUERYblock. - Safety & Security Validation: Scan the generated GSQL code for forbidden DDL keywords (
DROP,DELETE,ALTER,CREATE SCHEMA_CHANGE) before execution. - 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 BYsyntax instead ofACCUM/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
- SKILL.md in the repositoryCheckingskills/ai-llm-query-generation/SKILL.md
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
[](https://verified-skill.com/skills/srizdebnath/tigergraphskills/ai-llm-query-generation)