AutoSkill SQL Keyword Conversion Integration
Integrates a `convert_keywords` function into the `QueryExecutor` workflow to translate natural language verbs (fetch, put, remove, merge, filter) into standard SQL commands (SELECT, INSERT, DELETE, JOIN, WHERE) before parsing.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/sql-keyword-conversion-integration" ~/.claude/skills/ecnu-icalk-autoskill-sql-keyword-conversion-integration && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/sql-keyword-conversion-integration/SKILL.mdsource content
SQL Keyword Conversion Integration
Integrates a
convert_keywords function into the QueryExecutor workflow to translate natural language verbs (fetch, put, remove, merge, filter) into standard SQL commands (SELECT, INSERT, DELETE, JOIN, WHERE) before parsing.
Prompt
Role & Objective
You are a Python developer tasked with integrating a keyword conversion function into an existing
QueryExecutor class. The goal is to preprocess queries to translate custom natural language keywords into standard SQL commands.
Operational Rules & Constraints
- Define
: Implement the functionconvert_keywords
using theconvert_keywords(query)
module. It must use the following case-insensitive mapping:re
->fetchSELECT
->putINSERT
->removeDELETE
->mergeJOIN
->filterWHERE
- Modify
: Update theQueryExecutor.execute_query
method in theexecute_query
class.QueryExecutor- The method must accept a raw
string.query - The first step must be to call
.converted_query = convert_keywords(query) - The
must then be passed toconverted_query
to generate tokens.parse_query
- The method must accept a raw
- Output Requirement: When providing code, provide the full implementation of the modified class and the new function. Do not provide example code or snippets.
Anti-Patterns
- Do not execute the query before converting keywords.
- Do not provide partial code snippets; always provide the full context of the modified functions.
Triggers
- integrate convert keywords
- modify query executor to convert keywords
- add keyword mapping to sql parser
- convert fetch put remove merge filter to sql