
Skill
bydbql
generate and execute BanyanDB BydbQL queries
Description
Generate, validate, and optionally execute read-only BanyanDB BydbQL for STREAM, MEASURE, TRACE, and PROPERTY resources. Use when the user asks to query BanyanDB, translate natural language to BydbQL, inspect BanyanDB schema or data, validate BydbQL, or fetch raw BanyanDB records.
SKILL.md
BanyanDB BydbQL
Use this skill when the user asks to query BanyanDB, generate BydbQL, translate natural language to BydbQL, inspect BanyanDB data, validate BydbQL, or run read-only BanyanDB queries.
Workflow
- Read
references/safety.mdbefore generating, validating, or executing BydbQL. - Read
references/syntax.mdwhen query syntax is needed. - Read
references/examples.mdwhen mapping natural language to BydbQL. - Identify the BanyanDB resource type:
STREAM,MEASURE,TRACE, orPROPERTY. - If the group, resource name, or resource type is missing or ambiguous, use
list_groups_schemas. - If the request involves sorting or ranking (
ORDER BY,SHOW TOP, or wording such as "latest", "top", "highest", "lowest", "first", "last"), or you have already fetched schema, callget_generate_bydbql_promptand follow its index-rule guidance. This is required:get_generate_bydbql_promptis the only component that injects the indexed-field list and enforcesORDER BYfield substitution/omission.validate_bydbqlis parse-only, soORDER BY <non-indexed-field>validatestruebut fails at execution. - Generate exactly one read-only BydbQL statement. When it contains
ORDER BY, only sort by a field from the indexed-field list returned byget_generate_bydbql_prompt; substitute the closest indexed field, or omitORDER BYwhen no indexed field matches. - Call
validate_bydbqlbefore execution. - Execute with
list_resources_bydbqlonly when the user asks to run, query, fetch, show, or inspect raw BanyanDB data. - If
validate_bydbqlreturnsvalid=false, fix the query and validate again before any execution. - If execution fails due to a missing group, resource, or schema, use
list_groups_schemasto discover the correct names and retry only when the correction is clear.
Tool Use
Use the existing BanyanDB MCP tools:
list_groups_schemas: discover groups and resource names for streams, measures, traces, and properties.get_generate_bydbql_prompt: return the generation prompt text, including the live indexed-field list and theORDER BYindex-rule substitution/omission rules. It is the only source of index-ruleORDER BYsafety.validate_bydbql: run read-only safety checks and parse-only BydbQL syntax validation. This does not verify group, resource, tag, field, or index-rule existence.list_resources_bydbql: execute a validated BydbQL statement when data retrieval is requested.
The host model performs natural language to BydbQL translation using these references and live schema discovery. Promote get_generate_bydbql_prompt to a required step whenever ranking or sorting is involved (or once schema has been fetched), because it carries the only index-rule ORDER BY check; validate_bydbql is parse-only and cannot catch a sort on a non-indexed field.
Output
For generation-only BydbQL requests, return the single BydbQL statement and state that it was not executed.
For BydbQL execution requests, show the BydbQL statement, then summarize the returned data or error concisely.
More skills from the skywalking-banyandb repository
View all 4 skillsMore from Apache Software Foundation
View publisherdatafusion-python
write Apache DataFusion Python code
datafusion-python
Jul 12Data AnalysisPythonSQLcayenne-cgen
generate Cayenne entity Java classes
cayenne
Jul 12Data ModelingJavaORMcayenne-db-import
import database schema into Cayenne DataMaps
cayenne
Jul 19DatabaseJavaORMSQLcayenne-full-db-sync
synchronize Cayenne projects with database
cayenne
Jul 19DatabaseJavaORMcayenne-model-naming
clean up Cayenne object-layer names
cayenne
Jul 22Data ModelingDatabaseJavaORMcayenne-modeler
manage Cayenne projects with CayenneModeler
cayenne
Jul 12Data ModelingJavaORM