Agent skill

Autorag Query

by NomaDamas in NomaDamas/AutoRAG-Research

Query AutoRAG-Research pipeline results using natural language.

Apache-2.0Auto-check: notesAI & LLM Engineering

Install Autorag Query

skills CLI
$ npx skills add NomaDamas/AutoRAG-Research --skill autorag-query -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NomaDamas/AutoRAG-Research autorag-query --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NomaDamas/AutoRAG-Research.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/autorag-query .claude/skills/autorag-query && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
autorag-query
GitHub stars
149
Token cost
~1.6k tokens
SKILL.md length
385 words
Files
4 (incl. scripts, references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Query AutoRAG-Research pipeline results using natural language.

  • Works in 4 steps: Read references/schema.sql (understand… → Generate SQL → Execute: uv run python… → …
  • Pipeline comparison
  • SKILL.md covers Quick Example, Workflow, Key Tables and Common Queries, plus 6 more sections
  • Runs Python scripts from its folder; calls uv

What it does

Autorag Query is an agent skill from NomaDamas/AutoRAG-Research. Query AutoRAG-Research pipeline results using natural language. Converts questions to SQL, executes safely (SELECT-only), returns formatted results. Auto-detects DB connection from configs/db.yaml or env vars. Use for pipeline comparison, metrics analysis, token usage.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/common-queries.md` and `scripts/query_executor.py`).

It sits in AI & LLM Engineering, covering SQL. It works with SQL. The repository describes itself as: Automate your RAG research. The licence is Apache-2.0.

When your agent uses it

  • Pipeline comparison
  • Metrics analysis

Example prompts

  • “/autorag-query”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read references/schema.sql (understand tables)
  2. Generate SQL
  3. Execute: uv run python .agents/skills/autorag-query/scripts/query_executor.py --query "..."
  4. Present: "hybrid_search_v2 has best BLEU: 0.85"

What it can do on your machine

Read from SKILL.md and the folder at commit a473cf0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Autorag Query loads about 1.6k tokens when it runs, and up to ~6.5k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from NomaDamas/AutoRAG-Research at commit a473cf0, republished under its Apache-2.0 licence (© NomaDamas). 385 words, ~1,552 tokens.

Download SKILL.mdSave it as .claude/skills/autorag-query/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
autorag-query
description
Query AutoRAG-Research pipeline results using natural language. Converts questions to SQL, executes safely (SELECT-only), returns formatted results. Auto-detects DB connection from configs/db.yaml or env vars. Use for pipeline comparison, metrics analysis, token usage.
allowed-tools
Bash, Read

AutoRAG-Query: Text2SQL Agent Skill

Query AutoRAG pipeline results with natural language. Converts to SQL, executes safely, returns tables/JSON/CSV.

Quick Example

User: "Which pipeline has the best BLEU score?"

Agent:

  1. Read references/schema.sql (understand tables)
  2. Generate SQL:
    sql
    SELECT p.name, s.metric_result
    FROM summary s
    JOIN pipeline p ON s.pipeline_id = p.id
    JOIN metric m ON s.metric_id = m.id
    WHERE m.name = 'bleu'
    ORDER BY s.metric_result DESC LIMIT 1;
  3. Execute: uv run python .agents/skills/autorag-query/scripts/query_executor.py --query "..."
  4. Present: "hybrid_search_v2 has best BLEU: 0.85"

Workflow

  1. Parse intent: What data? (metrics/pipelines/queries) What operation? (rank/aggregate/filter)
  2. Load schema: Read references/schema.sql - key tables:
    • summary: Aggregated pipeline metrics (best for rankings)
    • evaluation_result: Per-query scores (detailed analysis)
    • executor_result: Generation outputs with token_usage JSONB
    • chunk_retrieved_result: Retrieval scores/ranks
  3. Generate SQL following rules:
    • ✅ SELECT-only, ⛔ Never: INSERT/UPDATE/DELETE/DROP/CREATE
    • ⛔ Exclude vector columns: embedding, embeddings, bm25_tokens (cause type errors)
    • Add LIMIT 100 if not specified
    • Use JOINs: query_id → query.id, pipeline_id → pipeline.id, metric_id → metric.id
    • JSONB: token_usage->>'field' (text) or (token_usage->>'field')::int (cast)
  4. Execute: uv run python .agents/skills/autorag-query/scripts/query_executor.py --query "..." [--format json|csv|table]
  5. Present: Summarize findings, show table, highlight insights

Key Tables

TablePurposeKey Columns
pipelinePipeline definitionsid, name, pipeline_type
metricMetric definitionsid, name, metric_type (retrieval/generation)
querySearch queriesid, query, ground_truths, dataset_name
executor_resultGeneration outputsquery_id, pipeline_id, generation_result, token_usage (JSONB), execution_time
evaluation_resultPer-query scoresquery_id, pipeline_id, metric_id, metric_result
summaryAggregated metricspipeline_id, metric_id, metric_result
chunk_retrieved_resultRetrieval outputsquery_id, pipeline_id, chunk_id, score, rank

Relationships: query_id → query.id, pipeline_id → pipeline.id, metric_id → metric.id, chunk_id → chunk.id

Common Queries

See references/common-queries.md for 20+ templates.

Pipeline ranking:

sql
SELECT p.name, s.metric_result
FROM summary s
JOIN pipeline p ON s.pipeline_id = p.id
JOIN metric m ON s.metric_id = m.id
WHERE m.name = 'bleu'
ORDER BY s.metric_result DESC;

Token usage:

sql
SELECT p.name,
       SUM((exe.token_usage->>'total_tokens')::int) AS total_tokens,
       AVG((exe.token_usage->>'total_tokens')::int) AS avg_per_query
FROM executor_result exe
JOIN pipeline p ON exe.pipeline_id = p.id
WHERE exe.token_usage IS NOT NULL
GROUP BY p.name
ORDER BY total_tokens DESC;

Retrieval results:

sql
SELECT c.content, crr.score, crr.rank
FROM chunk_retrieved_result crr
JOIN chunk c ON crr.chunk_id = c.id
WHERE crr.query_id = :query_id AND crr.pipeline_id = :pipeline_id
ORDER BY crr.rank LIMIT 10;
Show full SKILL.md (164 more words)Show less

JSONB Extraction

executor_result.token_usage:

json
{"prompt_tokens": 150, "completion_tokens": 50, "total_tokens": 200}

Extract:

  • Text: token_usage->>'prompt_tokens' → "150"
  • Integer: (token_usage->>'total_tokens')::int → 200
  • JSON: token_usage->'embedding_tokens' → preserves type

pipeline.config: config->>'model' → "gpt-4"

Critical Rules

  1. ⛔ Always exclude: embedding, embeddings, bm25_tokens columns (cause type errors)
  2. ✅ SELECT-only: Script validates and rejects DDL/DML
  3. 📏 Add LIMIT: Prevent large result sets
  4. 🔗 Use JOINs: Connect via foreign keys
  5. ⚡ Timeout: 10s default (add WHERE filters if slow)

Script Usage

bash
uv run python .agents/skills/autorag-query/scripts/query_executor.py \
  --query "SELECT ..." \
  --format table|json|csv \
  --timeout 10 \
  --limit 10000 \
  --database autorag_research  # optional

Connection: Auto-loads from configs/db.yaml or POSTGRES_* env vars using DBConnection class.

Output formats:

  • table: ASCII table (default)
  • json: JSON array
  • csv: CSV with headers

Row count: Printed to stderr: (N rows)

Error Handling

ErrorCauseFix
"Forbidden keyword"Non-SELECT queryUse SELECT-only
"Vector type error"Selected vector columnsExclude embedding, embeddings, bm25_tokens from SELECT
"Query timeout"Query too slowAdd WHERE/LIMIT
"Connection failed"Missing credentialsCheck configs/db.yaml or set env vars

Advanced: Window Functions & Pivots

Ranking:

sql
SELECT p.name, m.name, s.metric_result,
       RANK() OVER (PARTITION BY m.name ORDER BY s.metric_result DESC) AS rank
FROM summary s
JOIN pipeline p ON s.pipeline_id = p.id
JOIN metric m ON s.metric_id = m.id;

Pivot:

sql
SELECT p.name,
       MAX(CASE WHEN m.name = 'bleu' THEN s.metric_result END) AS bleu,
       MAX(CASE WHEN m.name = 'rouge' THEN s.metric_result END) AS rouge
FROM summary s
JOIN pipeline p ON s.pipeline_id = p.id
JOIN metric m ON s.metric_id = m.id
GROUP BY p.name;

References

  • Schema: references/schema.sql - full DB schema with comments
  • Templates: references/common-queries.md - 20+ query examples
  • Executor: scripts/query_executor.py - safe SQL execution script

Installation: Works from .agents/skills/autorag-query/ (auto-detected by agents).

© NomaDamas, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in .agents/skills/autorag-query of NomaDamas/AutoRAG-Research.

  • SKILL.md
  • references/common-queries.md
  • references/schema.sql
  • scripts/query_executor.py

Open the folder on GitHubat commit a473cf0

Compare with similar skills

Autorag Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Autorag Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Autorag Query this skillNomaDamas/AutoRAG-Research149—~1.6kAutomated safety check: NotesApache-2.0
Query Finelogmarin-community/marin3.9k—~1.1kAutomated safety check: PassApache-2.0
Darwinian EvolverLuciole-Studio/Misaka-Agent1582 repos~2.1kAutomated safety check: WarnMIT
Aliyun Opensearch Searchcinience/alicloud-skills397—~1.1kAutomated safety check: PassMIT
Tanyuan Searchinfometa/workbuddyskills346—~1.2kAutomated safety check: PassNone
Snowflake Cortex AIMindrally/skills269—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Query Finelog

    marin-community/marin

    Query Finelog logs and telemetry for Iris tasks, workers, profiles, training, vLLM, and cross-cluster forwarding.

    3.9k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Darwinian Evolver

    Luciole-Studio/Misaka-Agent

    Evolve prompts/regex/SQL/code with Imbue's evolution loop. An agent skill from Luciole-Studio/Misaka-Agent.

    158 GitHub starsUsed in 2 repos~2.1k tokens
    AI & LLM EngineeringAuto-check: warnings
  • Aliyun Opensearch Search

    cinience/alicloud-skills

    A skill your agent uses when working with OpenSearch vector search edition via the Python SDK (ha3engine) to push documents and run HA/SQL searches.

    397 GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Tanyuan Search

    infometa/workbuddyskills

    腾讯探元文博检索工具集(Agentic RAG)。封装两个 HTTP API 为 Node.js 脚本,由 Agent 依据问题特征选择工具并构造 query: - search-relics(文物/世界遗产数据库 NL→SQL):适合结构化事实的详情、列表、统计与排行查询 -…

    346 GitHub stars~1.2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Snowflake Cortex AI

    Mindrally/skills

    Reference for Snowflake Cortex AI Functions (AICOMPLETE, AICLASSIFY, AIEXTRACT, AIFILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake.

    269 GitHub stars~2.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Ravendb

    ravendb/docs

    Read this before writing any RavenDB query, client call or /databases/ request.

    115 GitHub stars~2.3k tokensUpdated today
    DatabasesAuto-check passed

More from NomaDamas/AutoRAG-Research

  • Create Generation Plugin

    NomaDamas/AutoRAG-Research

    Guide developers through creating a custom generation pipeline plugin for AutoRAG-Research.

    149 GitHub stars~871 tokensUpdated 2 mo ago
    Auto-check: notes
  • Create Ingestor Plugin

    NomaDamas/AutoRAG-Research

    Guide developers through creating a custom data ingestor plugin for AutoRAG-Research.

    149 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Create Metric Plugin

    NomaDamas/AutoRAG-Research

    Guide developers through creating a custom evaluation metric plugin for AutoRAG-Research.

    149 GitHub stars~859 tokensUpdated 2 mo ago
    Auto-check: notes
  • Create Retrieval Plugin

    NomaDamas/AutoRAG-Research

    Guide developers through creating a custom retrieval pipeline plugin for AutoRAG-Research.

    149 GitHub stars~728 tokensUpdated 2 mo ago
    Auto-check: notes
  • Refactor

    NomaDamas/AutoRAG-Research

    Orchestrate a 3-agent PR code review debate using Claude Code Teams.

    149 GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check: notes
  • Resolve Conversation

    NomaDamas/AutoRAG-Research

    Process [APPROVE] and [IGNORE] replies on /refactor review threads.

    149 GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check: notes

Works with

Questions about Autorag Query

What does Autorag Query do?

Query AutoRAG-Research pipeline results using natural language. Autorag Query is an agent skill from NomaDamas/AutoRAG-Research. Query AutoRAG-Research pipeline results using natural language.

When should I use Autorag Query?

Autorag Query fits situations like: pipeline comparison; metrics analysis.

How do I install Autorag Query in Claude Code?

Run `npx skills add NomaDamas/AutoRAG-Research --skill autorag-query -a claude-code`. Or copy the skill folder (.agents/skills/autorag-query in NomaDamas/AutoRAG-Research) into .claude/skills/autorag-query in your project. Claude Code loads it when a task matches its description.

How do I install Autorag Query in Codex?

Run `npx skills add NomaDamas/AutoRAG-Research --skill autorag-query -a codex`. Or copy the skill folder (.agents/skills/autorag-query in NomaDamas/AutoRAG-Research) into .agents/skills/autorag-query in your project. Codex loads it when a task matches its description.

Can I use Autorag Query in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NomaDamas/AutoRAG-Research --skill autorag-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/autorag-query, .gemini/skills/autorag-query, .github/skills/autorag-query and .opencode/skills/autorag-query in your project.

What does Autorag Query need to run?

Going by SKILL.md and its folder, Autorag Query needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read.

Does Autorag Query access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Autorag Query safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Autorag Query use?

Autorag Query is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Autorag Query use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to Autorag Query?

Skills that share tags, products or a category with Autorag Query: Query Finelog (marin-community/marin, 3.9k stars), Darwinian Evolver (Luciole-Studio/Misaka-Agent, 158 stars), Aliyun Opensearch Search (cinience/alicloud-skills, 397 stars) and Tanyuan Search (infometa/workbuddyskills, 346 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Autorag Query?

NomaDamas (a GitHub organization) maintains it in NomaDamas/AutoRAG-Research, which has 149 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on August 9, 2026.

Source: NomaDamas/AutoRAG-Research on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.