Agent skill

Relational Query Processor

by FoundationDB in FoundationDB/fdb-record-layer

Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner.

Apache-2.0Auto-check passedDatabases

Install Relational Query Processor

skills CLI
$ npx skills add FoundationDB/fdb-record-layer --skill relational-query-processor -a claude-code

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

GitHub CLI
$ gh skill install FoundationDB/fdb-record-layer relational-query-processor --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/FoundationDB/fdb-record-layer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/relational-query-processor .claude/skills/relational-query-processor && 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
relational-query-processor
GitHub stars
675
Token cost
~1k tokens
SKILL.md length
397 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner.

  • Works in 4 steps: Logical rules transform the logical plan… → Physical rules convert logical operators… → Match candidates (e.g.,… → …
  • Debugging query plans
  • SKILL.md covers Key entry points, SQL execution path (normal case), Reading EXPLAIN output and Writing a yaml test that…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Relational Query Processor is an agent skill from FoundationDB/fdb-record-layer. Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner. Use when debugging query plans, writing planner rules, or understanding the SQL execution path. Some example usages: "Why is this query doing a full table scan?" "Explain this EXPLAIN output" "How do I write a new Cascades rule?" "Why is my query not using the index?"

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering SQL, Query optimization and Debugging. It works with SQL. The repository describes itself as: A relational database with SQL support built on FoundationDB. The licence is Apache-2.0.

When your agent uses it

  • Debugging query plans
  • Writing planner rules
  • Understanding the SQL execution path

Example prompts

  • “Why is this query doing a full table scan?”
  • “Explain this EXPLAIN output”
  • “How do I write a new Cascades rule?”
  • “/relational-query-processor”

Workflow steps

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

  1. Logical rules transform the logical plan (e.g., push predicates into index scans).
  2. Physical rules convert logical operators to physical plans (e.g., select index vs. scan).
  3. Match candidates (e.g., PrimaryScanMatchCandidate, ValueIndexScanMatchCandidate)
  4. Simplification runs Derivations.simplifyLocalValues() — only on cold cache misses.

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql and yaml).

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

  • Network

    No URLs in SKILL.md.

    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

Relational Query Processor loads about 1k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 397 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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 passed

The automated check found no risky patterns in SKILL.md.

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from FoundationDB/fdb-record-layer at commit 20a2376, republished under its Apache-2.0 licence (© FoundationDB). 397 words, ~1,026 tokens.

Download SKILL.mdSave it as .claude/skills/relational-query-processor/SKILL.md (or your agent's skills folder).
name
relational-query-processor
description
Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner. Use when debugging query plans, writing planner rules, or understanding the SQL execution path. Some example usages: "Why is this query doing a full table scan?" "Explain this EXPLAIN output" "How do I write a new Cascades rule?" "Why is my query not using the index?"

This skill provides context for working in fdb-relational-core, the SQL processing layer of the Record Layer — covering the parser, plan generator, and Cascades planner.

Key entry points

ClassRole
EmbeddedRelationalStatementMain SQL statement implementation. executeGet → point read via source.get(); executeScan → range scan via source.openScan().
RelationalDirectAccessStatementBypasses the SQL planner entirely — goes directly to FDB.
RecordLayerEngineEngine setup; manages the connection between JDBC and the record layer.
RelationalPlanCacheCaches compiled query plans. Must be initialized for SQL performance — RelationalPlanCache.buildWithDefaults(). Without it, every query runs the full Cascades planner.

SQL execution path (normal case)

JDBC call
  → EmbeddedRelationalStatement
    → SQL parse + Cascades planner (on cache miss)
      → LogicalQueryPlan.optimize()
        → Simplification.executeRuleSetIteratively()   ← only on cold miss
    → RelationalPlanCache (warm hit: wraps existing plan)
      → PhysicalQueryPlan.withExecutionContext()
        → executePhysicalPlan()
          → FDB read

On a warm cache hit, simplification is skipped entirely. The planner overhead is ~0.3–0.5 ms per call.

Reading EXPLAIN output

Run EXPLAIN <query> via JDBC or in a yaml test:

sql
EXPLAIN SELECT * FROM t WHERE id = 1

Common plan shapes:

  • COVERING(idx_name [EQUALS ?] → [...]) — index-only scan, no fetch needed.
  • FETCH(COVERING(...)) — index scan followed by a record fetch.
  • SCAN(<,>) | FILTER ... — full table scan with a post-scan filter. This usually means the planner could not match a primary key or index scan candidate.
  • MAP (_.col AS col) — projection step.

Writing a yaml test that checks the plan

yaml
- query: explain select * from t where id = 1
  explain: "COVERING(idx_id [EQUALS ?] → [id: KEY[0], name: VALUE[0]])"

Use @MaintainYamlTestConfig(YamlTestConfigFilters.CORRECT_EXPECTATIONS) on the test method to have the framework fill in the explain: value automatically on first run.

Debugging a plan interactively

Add @DebugPlanner to the @YamlTest method to launch PlannerRepl, which lets you step through the Cascades optimization phases.

Show full SKILL.md (178 more words)Show less

Cascades planner overview

The planner is a Cascades-style rule-based optimizer:

  1. Logical rules transform the logical plan (e.g., push predicates into index scans).
  2. Physical rules convert logical operators to physical plans (e.g., select index vs. scan).
  3. Match candidates (e.g., PrimaryScanMatchCandidate, ValueIndexScanMatchCandidate) determine which access paths are available for a given predicate.
  4. Simplification runs Derivations.simplifyLocalValues() — only on cold cache misses.

If a query is doing a full table scan when you expect an index scan, common causes:

  • The predicate is on a non-indexed column.
  • The index exists but the match candidate is not recognizing the predicate shape (check that the column names and types match exactly).
  • The RelationalPlanCache is not initialized (every call looks like a cold miss).

Transaction lifecycle in tests

With autoCommit=true, ensureTransactionActive() rolls back and restarts the transaction on every statement, clearing per-transaction caches. Both SQL and direct-access paths share this overhead in benchmarks.

Schema templates

Schema templates persist in FDB across JVM runs. If you see unexpected state in tests, the template may be stale. Creation code should be idempotent (drop-then-create pattern).

© FoundationDB, 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

Just SKILL.md in .claude/skills/relational-query-processor of FoundationDB/fdb-record-layer.

Open the folder on GitHubat commit 20a2376

Compare with similar skills

Relational Query Processor 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.

Relational Query Processor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Relational Query Processor this skillFoundationDB/fdb-record-layer675—~1kAutomated safety check: PassApache-2.0
Tidewave Integrationoliver-kriska/claude-elixir-phoenix564—~1.3kAutomated safety check: PassMIT
Code Nest Project Specxiaou61/Code-Nest770—~1.3kAutomated safety check: PassMIT
Kolokoloai/kolo525—~1.2kAutomated safety check: PassNone
SQL Optimization Patternsynulihao/AgentSkillOS61710 repos~3.3kAutomated safety check: PassNone
PostgreSQL Documentation Reference2025Emma/vibe-coding-cn23k1 repos~19kAutomated safety check: PassMIT

Similar skills

  • Tidewave Integration

    oliver-kriska/claude-elixir-phoenix

    Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs.

    564 GitHub stars~1.3k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Code Nest Project Spec

    xiaou61/Code-Nest

    Code-Nest 多模块全栈项目协作规范与落点导航。Use when modifying this repository for feature development, bug fixing, refactor, API change, SQL migration, or frontend-backend联调 so changes land in the correct module…

    770 GitHub stars~1.3k tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Kolo

    koloai/kolo

    Kolo is a text-based Python debugger that captures every executed function, return value, local variable, HTTP request, and SQL query into greppable trace files.

    525 GitHub stars~1.2k tokensUpdated 5 mo ago
    DatabasesAuto-check passed
  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    617 GitHub starsUsed in 10 repos~3.3k tokens
    DatabasesAuto-check passed
  • PostgreSQL Documentation Reference

    2025Emma/vibe-coding-cn

    PostgreSQL database documentation - SQL queries, database design, administration, performance tuning, and advanced features. Use when working with PostgreSQL…

    23k GitHub starsUsed in 1 repo~19k tokens
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    240 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed

More from FoundationDB/fdb-record-layer

All 10 skills in this repo
  • Using Gradle

    FoundationDB/fdb-record-layer

    A skill your agent uses when you need to build the project, compile code, or run tests.

    675 GitHub stars~705 tokensUpdated today
    Auto-check passed
  • Context Resumption

    FoundationDB/fdb-record-layer

    Rebuild working context after a session restart. An agent skill from FoundationDB/fdb-record-layer.

    675 GitHub stars~467 tokensUpdated today
    Auto-check passed
  • Docs Writer

    FoundationDB/fdb-record-layer

    Write or update documentation in docs/sphinx/source/. An agent skill from FoundationDB/fdb-record-layer.

    675 GitHub stars~925 tokensUpdated today
    Auto-check passed
  • Frl Coding Standard

    FoundationDB/fdb-record-layer

    Coding standards for all Java code in fdb-record-layer. An agent skill from FoundationDB/fdb-record-layer.

    675 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Frl Test Coding Standard

    FoundationDB/fdb-record-layer

    Standards for writing tests in fdb-record-layer. An agent skill from FoundationDB/fdb-record-layer.

    675 GitHub stars~792 tokensUpdated today
    Auto-check passed
  • Stacked PRs

    FoundationDB/fdb-record-layer

    Create and manage stacked pull requests on FoundationDB/fdb-record-layer using the gh stack CLI extension.

    675 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Relational Query Processor

What does Relational Query Processor do?

Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner. Relational Query Processor is an agent skill from FoundationDB/fdb-record-layer. Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner.

When should I use Relational Query Processor?

Relational Query Processor fits situations like: debugging query plans; writing planner rules; understanding the SQL execution path.

How do I install Relational Query Processor in Claude Code?

Run `npx skills add FoundationDB/fdb-record-layer --skill relational-query-processor -a claude-code`. Or copy the skill folder (.claude/skills/relational-query-processor in FoundationDB/fdb-record-layer) into .claude/skills/relational-query-processor in your project. Claude Code loads it when a task matches its description.

How do I install Relational Query Processor in Codex?

Run `npx skills add FoundationDB/fdb-record-layer --skill relational-query-processor -a codex`. Or copy the skill folder (.claude/skills/relational-query-processor in FoundationDB/fdb-record-layer) into .agents/skills/relational-query-processor in your project. Codex loads it when a task matches its description.

Can I use Relational Query Processor 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 FoundationDB/fdb-record-layer --skill relational-query-processor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/relational-query-processor, .gemini/skills/relational-query-processor, .github/skills/relational-query-processor and .opencode/skills/relational-query-processor in your project.

What does Relational Query Processor need to run?

SKILL.md names no scripts, command-line tools or credentials: Relational Query Processor is instructions for the agent only.

Does Relational Query Processor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Relational Query Processor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Relational Query Processor use?

Relational Query Processor 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 Relational Query Processor use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Relational Query Processor?

Skills that share tags, products or a category with Relational Query Processor: Tidewave Integration (oliver-kriska/claude-elixir-phoenix, 564 stars), Code Nest Project Spec (xiaou61/Code-Nest, 770 stars), Kolo (koloai/kolo, 525 stars) and SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Relational Query Processor?

FoundationDB (a GitHub organization) maintains it in FoundationDB/fdb-record-layer, which has 675 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: FoundationDB/fdb-record-layer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.