Agent skill

Query Plan Snapshot CLI

by eclipse-rdf4j in eclipse-rdf4j/rdf4j

Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs.

BSD-3-ClauseAuto-check passedDatabases

Install Query Plan Snapshot CLI

skills CLI
$ npx skills add eclipse-rdf4j/rdf4j --skill query-plan-snapshot-cli -a claude-code

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

GitHub CLI
$ gh skill install eclipse-rdf4j/rdf4j query-plan-snapshot-cli --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/eclipse-rdf4j/rdf4j.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/query-plan-snapshot-cli .claude/skills/query-plan-snapshot-cli && 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
query-plan-snapshot-cli
GitHub stars
420
Token cost
~1.5k tokens
SKILL.md length
541 words
Files
4 (incl. scripts, references)
Skills in repo
6
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs.

  • Works in 4 steps: Capture raw benchmark output into a… → Analyze the newest dated run against… → Drill into the fastest known runs for a… → …
  • Users ask about optimizer impact
  • SKILL.md covers Fast workflow, History triage, Fast regression test loop… and Snapshot diff workflow, plus 2 more sections
  • Runs Python and Shell scripts from its folder; calls mvn and python3

What it does

Query Plan Snapshot CLI is an agent skill from eclipse-rdf4j/rdf4j. Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs. Trigger when users ask about optimizer impact, query-plan drift, join algorithm changes, or query performance regressions in testsuites/benchmark.

Its SKILL.md is about 1.5k 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/workflow.md`, `scripts/interpret_query_plan_regression.py` and `scripts/run_query_plan_snapshot.sh`).

It sits in Databases, covering Query optimization. It works with Java. The repository describes itself as: Eclipse RDF4J: scalable RDF for Java. The licence is BSD-3-Clause.

When your agent uses it

  • Users ask about optimizer impact
  • Query-plan drift
  • Join algorithm changes
  • Query performance regressions in testsuites/benchmark

Example prompts

  • “/query-plan-snapshot-cli”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

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

  1. Capture raw benchmark output into a normalized result file when needed.
  2. Analyze the newest dated run against historical results.
  3. Drill into the fastest known runs for a specific theme/query.
  4. If needed, capture baseline/candidate plan snapshots and diff them semantically.

What it can do on your machine

Read from SKILL.md and the folder at commit fdbf6e5. 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

    Ships 2 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • mvn
    • python3

    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

Query Plan Snapshot CLI loads about 1.5k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 541 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from eclipse-rdf4j/rdf4j at commit fdbf6e5, republished under its BSD-3-Clause licence (© eclipse-rdf4j). 541 words, ~1,536 tokens.

Download SKILL.mdSave it as .claude/skills/query-plan-snapshot-cli/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
query-plan-snapshot-cli
description
Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs. Trigger when users ask about optimizer impact, query-plan drift, join algorithm changes, or query performance regressions in testsuites/benchmark.

query-plan-snapshot-cli

Use this skill to run reproducible query-plan captures, triage historical theme-query benchmark results, and classify likely regression/improvement signals.

Fast workflow

  1. Capture raw benchmark output into a normalized result file when needed.
  2. Analyze the newest dated run against historical results.
  3. Drill into the fastest known runs for a specific theme/query.
  4. If needed, capture baseline/candidate plan snapshots and diff them semantically.

History triage

Result files live in:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results

Normalize raw JMH output into a new result file:

  • pbpaste | scripts/theme-query-benchmark-results.sh capture
  • scripts/theme-query-benchmark-results.sh capture raw-jmh.txt

Analyze only the queries that are more than 20% slower than history:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results/analyze-theme-query-history.sh

Sort regressions from biggest to smallest:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results/analyze-theme-query-history.sh --sort-regressions

Only print the top N regressions:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results/analyze-theme-query-history.sh --top 10

Analyze every latest query, including current-run wins over previous best:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results/analyze-theme-query-history.sh --all

Drill into the three fastest known runs for one theme/query and print optimized plan/query when present:

  • core/sail/lmdb/src/test/java/org/eclipse/rdf4j/sail/lmdb/benchmark/theme-query-benchmark-results/analyze-theme-query-history.sh --theme PHARMA --query-index 10

Interpretation:

  • Default mode: newest dated file only for the “latest” baseline; compares against all other results-*.md, including results-develop.md and results-main-branch.md, but prints only queries where latest is more than 20% slower than historical best.
  • --sort-regressions: flat regression list, biggest slowdown first.
  • --top N: top N regressions only; implies regression sorting.
  • --all: prints every latest query; if latest is a new best it prints how much faster it is than the previous best.
  • Query detail mode: top three runs sorted by score ascending; ties prefer richer files with plan/query content.
  • plan no | query yes: optimized query rendered, no physical plan block in that result file.
  • plan no | query no: summary-only run or no per-query capture in that file.

Use this path when the goal is optimizer-loop work: find the fastest known plan/query for a theme/query, then compare new runs back to that history before touching production logic.

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

Fast regression test loop (persistent LMDB theme stores)

Theme regression/snapshot tests in core/sail/lmdb now support reusing a prepared LMDB store across runs.

  • Enable persistent reuse:
    • -Drdf4j.lmdb.themeRegression.persistentStore.enabled=true
  • Optional custom root directory:
    • -Drdf4j.lmdb.themeRegression.persistentStore.root=persistent-lmdb-theme-store
  • Default root directory:
    • persistent-lmdb-theme-store

Behavior:

  • If the store has expected triples/data.mdb and values/data.mdb sizes (from expected-db-file-sizes.properties), tests reuse it and skip rebuild/ingest.
  • If sizes mismatch or the marker file is missing/invalid, tests rebuild the store, then refresh the expected-size file.

Example focused run:

  • mvn -o -Dmaven.repo.local=.m2_repo -pl core/sail/lmdb -Dtest=LmdbThemeQueryRegressionTest#socialMediaFiveCycleInterleavesValuesWithFollowsEdges -Drdf4j.lmdb.themeRegression.persistentStore.enabled=true test

Snapshot diff workflow

Use this when you need semantic plan diffs between two controlled captures of the same query.

  1. Capture baseline run (main/reference commit).
  2. Capture candidate run (changed commit) with same query selector + --query-id.
  3. Produce semantic diff (--compare-existing).
  4. Interpret runtime + diff together.

Commands

Use wrapper (enforces pre-install and optional logging):

  • Baseline:
    • ./.codex/skills/query-plan-snapshot-cli/scripts/run_query_plan_snapshot.sh --log /tmp/qps-baseline.log -- --store memory --theme MEDICAL_RECORDS --query-index 0 --query-id med-q0
  • Candidate:
    • ./.codex/skills/query-plan-snapshot-cli/scripts/run_query_plan_snapshot.sh --log /tmp/qps-candidate.log -- --store memory --theme MEDICAL_RECORDS --query-index 0 --query-id med-q0 --compare-latest --diff-mode structure+estimates
  • Compare existing snapshots explicitly:
    • mvn -o -Dmaven.repo.local=.m2_repo -pl testsuites/benchmark -DskipTests exec:java@query-plan-snapshot -Dexec.args="--compare-existing --query-id med-q0 --compare-indices 1,0 --no-interactive --diff-mode structure+estimates" | tee /tmp/qps-compare.log
  • Summarize improvement/regression signal:
    • python3 ./.codex/skills/query-plan-snapshot-cli/scripts/interpret_query_plan_regression.py --baseline-log /tmp/qps-baseline.log --candidate-log /tmp/qps-candidate.log --comparison-log /tmp/qps-compare.log

Interpretation rule-of-thumb

  • averageMillis down with stable resultCount: improvement signal.
  • averageMillis up with stable resultCount: regression signal.
  • actualResultSizes=diff: semantic/data-shape risk; perf conclusion low confidence.
  • joinAlgorithms=diff or structure=diff: optimizer behavior changed; correlate with runtime delta.
  • estimates=diff only: model/statistics shift; validate with repeated runs.

For more detailed reading patterns and triage prompts, use references/workflow.md.

© eclipse-rdf4j, BSD-3-Clause. 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 .agent/skills/query-plan-snapshot-cli of eclipse-rdf4j/rdf4j.

  • SKILL.md
  • references/workflow.md
  • scripts/interpret_query_plan_regression.py
  • scripts/run_query_plan_snapshot.sh

Open the folder on GitHubat commit fdbf6e5

Compare with similar skills

Query Plan Snapshot CLI 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.

Query Plan Snapshot CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Query Plan Snapshot CLI this skilleclipse-rdf4j/rdf4j420—~1.5kAutomated safety check: PassBSD-3-Clause
Code OptimizerArabelaTso/Skills-4-SE253—~3.1kAutomated safety check: PassApache-2.0
SQL Optimization Patternsynulihao/AgentSkillOS61711 repos~3.3kAutomated safety check: PassNone
Cloud Trace Queryinggoogle/skills21k—~1.7kAutomated safety check: PassApache-2.0
Query Engine Designrevfactory/claude-code-harness120—~474Automated safety check: PassNone
Wp Acf And Content Modelingjorgerosal/wordpress-skills101—~3.2kAutomated safety check: PassMIT

Similar skills

  • Code Optimizer

    ArabelaTso/Skills-4-SE

    Analyzes and optimizes code for better performance, memory usage, and efficiency.

    253 GitHub stars~3.1k tokensUpdated 1 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 11 repos~3.3k tokens
    DatabasesAuto-check passed
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed
  • Query Engine Design

    revfactory/claude-code-harness

    SQL query engine design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~474 tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • Wp Acf And Content Modeling

    jorgerosal/wordpress-skills

    WordPress ACF and content modeling review. An agent skill from jorgerosal/wordpress-skills.

    101 GitHub stars~3.2k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Jpa Patterns

    affaan-m/ECC

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    275k GitHub starsUsed in 5 repos~1.2k tokens
    DatabasesAuto-check passed

More from eclipse-rdf4j/rdf4j

  • Docker Jfr Benchmark Loop

    eclipse-rdf4j/rdf4j

    Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling.

    420 GitHub stars~945 tokensUpdated today
    Auto-check passed
  • Jmh Benchmark Compare

    eclipse-rdf4j/rdf4j

    Parse JMH result text by finding the first header line that starts with Benchmark and contains Mode and Score, build a structured table for all columns/rows, compare overlapping benchmarks across 2+…

    420 GitHub stars~804 tokensUpdated today
    Auto-check passed
  • Mvnf

    eclipse-rdf4j/rdf4j

    Run Maven tests in this repo with a consistent workflow (module test-artifact cleanup, root -Pquick install to refresh .m2repo, then module verify or a single test class/method).

    420 GitHub stars~971 tokensUpdated today
    Auto-check passed
  • Debug Surefire

    eclipse-rdf4j/rdf4j

    Debug Maven Surefire unit tests by running them in JDWP "wait for debugger" mode (-Dmaven.surefire.debug) and attaching to the forked test JVM using jdb (preferred for CLI/agent debugging)…

    420 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Gh Read Inspector

    eclipse-rdf4j/rdf4j

    Retrieve GitHub issues, pull requests, and milestones with read-only, whitelisted gh commands only.

    420 GitHub stars~950 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Query Plan Snapshot CLI

What does Query Plan Snapshot CLI do?

Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs. Query Plan Snapshot CLI is an agent skill from eclipse-rdf4j/rdf4j. Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs.

When should I use Query Plan Snapshot CLI?

Query Plan Snapshot CLI fits situations like: users ask about optimizer impact; query-plan drift; join algorithm changes; query performance regressions in testsuites/benchmark.

How do I install Query Plan Snapshot CLI in Claude Code?

Run `npx skills add eclipse-rdf4j/rdf4j --skill query-plan-snapshot-cli -a claude-code`. Or copy the skill folder (.agent/skills/query-plan-snapshot-cli in eclipse-rdf4j/rdf4j) into .claude/skills/query-plan-snapshot-cli in your project. Claude Code loads it when a task matches its description.

How do I install Query Plan Snapshot CLI in Codex?

Run `npx skills add eclipse-rdf4j/rdf4j --skill query-plan-snapshot-cli -a codex`. Or copy the skill folder (.agent/skills/query-plan-snapshot-cli in eclipse-rdf4j/rdf4j) into .agents/skills/query-plan-snapshot-cli in your project. Codex loads it when a task matches its description.

Can I use Query Plan Snapshot CLI 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 eclipse-rdf4j/rdf4j --skill query-plan-snapshot-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/query-plan-snapshot-cli, .gemini/skills/query-plan-snapshot-cli, .github/skills/query-plan-snapshot-cli and .opencode/skills/query-plan-snapshot-cli in your project.

What does Query Plan Snapshot CLI need to run?

Going by SKILL.md and its folder, Query Plan Snapshot CLI needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (mvn and python3). Our summary lists: Python 3; A Bash shell.

Does Query Plan Snapshot CLI 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 Query Plan Snapshot CLI 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Query Plan Snapshot CLI use?

Query Plan Snapshot CLI is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Query Plan Snapshot CLI use?

About 1.5k tokens (SKILL.md is roughly 6.1k 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 650 tokens, read only when the agent opens those files.

What are the alternatives to Query Plan Snapshot CLI?

Skills that share tags, products or a category with Query Plan Snapshot CLI: Code Optimizer (ArabelaTso/Skills-4-SE, 253 stars), SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), Cloud Trace Querying (google/skills, 21k stars) and Query Engine Design (revfactory/claude-code-harness, 120 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Query Plan Snapshot CLI?

eclipse-rdf4j (a GitHub organization) maintains it in eclipse-rdf4j/rdf4j, which has 420 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.

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