Agent skill

Pure Lsp SQL E2E

by finos in finos/legend-engine

Runs cases from the legend-engine SQL e2e parity corpus (TestPostgresParity, ~2300 SQL cases compared against a real Postgres) through the warm interpreted Pure LSP with pure-sql-e2e, so edits to…

Apache-2.0Auto-check passedTesting & QA

Install Pure Lsp SQL E2E

skills CLI
$ npx skills add finos/legend-engine --skill pure-lsp-sql-e2e -a claude-code

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

GitHub CLI
$ gh skill install finos/legend-engine pure-lsp-sql-e2e --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/finos/legend-engine.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sql-e2e .claude/skills/pure-lsp-sql-e2e && 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
pure-lsp-sql-e2e
GitHub stars
112
Token cost
~1.8k tokens
SKILL.md length
803 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Runs cases from the legend-engine SQL e2e parity corpus (TestPostgresParity, ~2300 SQL cases compared against a real Postgres) through the warm interpreted Pure LSP with pure-sql-e2e, so edits to…

  • Working on Legend SQL - Pure translation
  • SKILL.md covers ⚠️ The rule that matters most, Commands, Setup and Corpus traps, plus 1 more section
  • Calls mvn
  • The postgresSql parser/router

What it does

Pure Lsp SQL E2E is an agent skill from finos/legend-engine. Runs cases from the legend-engine SQL e2e parity corpus (TestPostgresParity, ~2300 SQL cases compared against a real Postgres) through the warm interpreted Pure LSP with pure-sql-e2e, so edits to fromPure.pure and other SQL-translation Pure sources are testable in seconds instead of a 15-25 min Maven rebuild. Use when working on Legend SQL - Pure translation, sqlToPure, the postgresSql parser/router, or when the user asks to run/iterate on SQL e2e or parity tests, investigate a parity divergence, or check whether…

Its SKILL.md is about 1.8k 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 Testing & QA, covering End-to-end testing, SQL and Translation. It works with SQL and PostgreSQL. The licence is Apache-2.0.

When your agent uses it

  • Working on Legend SQL - Pure translation
  • The postgresSql parser/router
  • The user asks to run/iterate on SQL e2e
  • Investigate a parity divergence

Example prompts

  • “/pure-lsp-sql-e2e”

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • mvn

    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

Pure Lsp SQL E2E loads about 1.8k tokens when it runs. Until then it costs about 186 tokens; SKILL.md has 803 words of instructions outside code blocks.

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

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 finos/legend-engine at commit 00108b7, republished under its Apache-2.0 licence (© finos). 803 words, ~1,808 tokens.

Download SKILL.mdSave it as .claude/skills/pure-lsp-sql-e2e/SKILL.md (or your agent's skills folder).
name
pure-lsp-sql-e2e
description
Runs cases from the legend-engine SQL e2e parity corpus (TestPostgresParity, ~2300 SQL cases compared against a real Postgres) through the warm interpreted Pure LSP with `pure-sql-e2e`, so edits to fromPure.pure and other SQL-translation Pure sources are testable in seconds instead of a 15-25 min Maven rebuild. Use when working on Legend SQL -> Pure translation, sqlToPure, the postgresSql parser/router, or when the user asks to run/iterate on SQL e2e or parity tests, investigate a parity divergence, or check whether a SQL construct or function is supported. CRITICAL: interpreted results are hypotheses, not findings - every finding must be confirmed with a compiled -Dtest.filter run before being treated as a real bug.

SQL e2e parity corpus: interpreted dev loop

Iterate on Legend's SQL→Pure translation against the real parity corpus without rebuilding. The corpus, the FROM-rewrite and the reference Postgres execution stay in Java, behind three natives — resolveCaseRefs, executeSQLE2ETest, executeAdhocSQL. Everything the Legend side does — SQL parse, sqlToPure, routing, plan-gen, dialect SQL emission — runs in Pure, so .pure edits are picked up by a warm LSP session immediately.

pure-sql-e2e invokes those natives directly with a case id and a mode. Nothing is generated into framework.pure and no file is edited to run a case.

Never curl the bridge — the CLIs are the only reliable client (see references/lsp-devloop-usage-rules.md).

⚠️ The rule that matters most

A result found here is a hypothesis, never a finding. The Pure interpreter diverges from compiled on constructs that are completely fine in production. In one full-corpus sweep, every divergence investigated in depth turned out to be an artifact — of the corpus, the comparator, or the interpreter. Zero product bugs.

Always confirm against the compiled suite before filing or fixing anything:

bash
mvn test -pl legend-engine-xts-sql/legend-engine-xt-sql-e2e-tests \
    -Dtest=TestPostgresParity -Dtest.filter=<substring-of-test-id>

Two known interpreter defects account for most false results — pair type-variable capture (breaks = ANY / > ALL / IN (subquery)) and reactivate not constant-folding (breaks LIMIT/OFFSET and ORDER BY ... NULLS FIRST/LAST). Mechanisms and fixes are in the suite README; you rarely need them, you just need to not trust the result.

And do not trust a wrong-answer (FAIL) result either: the interpreter can silently compute a different value, e.g. NULL = NULL → true interpreted vs NULL compiled.

Commands

bash
pure-sql-e2e ids   <filter>...            [--mode tds|relation|both]
pure-sql-e2e run   <case-id-or-filter>... [--mode ...] [--serial] [--json]
pure-sql-e2e case  <case-id>              [--mode ...]
pure-sql-e2e adhoc "<sql>"                [--mode both]

A filter is an exact case id, a category (structural/joins), a prefix*, or '' for everything. Several can be named at once and are unioned. --mode is a single input applied to every case in the run and defaults to both.

bash
pure-sql-e2e ids   structural/null_semantics
pure-sql-e2e run   null_equals_null null_not_equals --mode tds
pure-sql-e2e run   structural/null_semantics --mode tds
pure-sql-e2e case  null_equals_null --mode tds
pure-sql-e2e adhoc "SELECT (NULL = NULL) AS result FROM dates WHERE id = 1" --mode both

run reports each case as a test entry with its own status, duration and message, streamed as the run proceeds, with a runId that Ctrl-C actually cancels. The daemon owns and bounds the fan-out at executionConcurrency (derived 0.75 × cores; check it with pure-lsp status) — do not hand-chunk to match a pool size.

Green means matched Postgres, nothing else

A case is green only when it produced the same rows as the reference Postgres. ERROR, FAIL, BUG and SKIP all read red, and the corpus's recorded baseline is not consulted at all. So a whole-category run is a status report, not a regression check: the ~1,100 legitimately-unsupported ERROR-baselined cases and the 62 skip: cases are red by construction. Each entry's console output carries a STATUS|<id>|<mode>|<status>|<ms> line distinguishing them, and the compiled suite remains the authority on whether a status is a regression.

30-entry cap

run refuses more than 30 entries and prints the compiled command instead — the same ceiling, for the same reason, as an explicit function list in pure-lsp execute-parallel: a run holds the graph read lock for its whole duration, so every compile queues behind it and the session serves stale code until it finishes. At tens of seconds of interpreted plan-gen per case, a whole category outlives the edit-test loop this exists to serve.

Narrow with --mode tds, or use ids (uncapped) to pick a runnable subset. --mode both counts as two entries per case.

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

Setup

The normal discovery route works — legend-engine-pure-ide-light-http-server declares both legend-engine-xt-sql-e2e-pure and -tests, so pure-lsp-classpath picks them up:

bash
pure-lsp-launch-engine        # passes -Dsql.e2e.corpus.dir so corpus edits are live

If pure-sql-e2e fails with "The function '<mangled_id>' is not supported by this execution platform", the classpath predates those declarations — refresh it with pure-lsp-classpath legend-engine --force (~17s) and relaunch. That error means a missing jar, not an unregistered native.

A running daemon has already loaded the natives/extensions into memory at JVM startup. After any Java-side change in legend-engine-xt-sql-e2e-pure (not just .pure edits), kill and relaunch the daemon — a check alone will not pick up a rebuilt jar.

On first corpus access the harness starts a Testcontainers Postgres, seeds the schema, and caches everything for the JVM's lifetime — so the container cost is paid once per daemon. Resolving a case also warms its reference-Postgres result, which is why the first ids/run against a wide filter is slower than later ones.

Corpus traps

These are documented once, in the suite's README (below) — read it before investigating any failure. In brief: a query with no table reference never reaches Legend (it is answered by Postgres and passes vacuously); any sql: value containing # must be quoted or YAML truncates it; and surefire:test skips process-resources/test-compile, so refresh target/ after editing corpus YAML or the test class.

Corpus edits are live when the daemon was launched with -Dsql.e2e.corpus.dir=<engine>/legend-engine-xts-sql/legend-engine-xt-sql-e2e-tests/src/main/resources (the launcher passes this). No rebuild, no restart — the runner re-reads on mtime change. Editing schema.yaml is the exception and still needs a restart.

Further reading (in legend-engine)

  • legend-engine-xts-sql/legend-engine-xt-sql-e2e-tests/README.md — the one SQL e2e doc, and it sits with the suite: how to run compiled, baseline statuses, the traps, known-unsupported areas, harness configuration, and how the interpreted loop is built. Read before investigating any failure.

© finos, 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 plugins/pure-dev/skills/pure-lsp-sql-e2e of finos/legend-engine.

Open the folder on GitHubat commit 00108b7

Compare with similar skills

Pure Lsp SQL E2E 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.

Pure Lsp SQL E2E compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pure Lsp SQL E2E this skillfinos/legend-engine112—~1.8kAutomated safety check: PassApache-2.0
Efcore Query Performanceatherio-danp/cde-dotnetcc109—~1.1kAutomated safety check: NotesNone
SQL TranslationMicrock/ordinary-claude-skills403—~1.3kAutomated safety check: PassCustom licence
Rust Sqlx Postgres Servicehashgraph-online/awesome-codex-plugins1.2k—~938Automated safety check: PassMIT
Safe SQL Executionsupabase/supabase111k—~4.2kAutomated safety check: PassApache-2.0
Sql2erystemsrx/sql_to_ER1881 repos~1.1kAutomated safety check: PassAGPL-3.0

Similar skills

  • Efcore Query Performance

    atherio-danp/cde-dotnetcc

    Optimize EF Core (Npgsql/PostgreSQL) queries in the .NET API — fix N+1, choose tracking modes, use compiled queries, split queries, and avoid translation traps.

    109 GitHub stars~1.1k tokensUpdated 2 mo ago
    DatabasesAuto-check: notes
  • SQL Translation

    Microck/ordinary-claude-skills

    Guide for adding SQL function translations to dbplyr backends.

    403 GitHub stars~1.3k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Rust Sqlx Postgres Service

    hashgraph-online/awesome-codex-plugins

    A skill your agent uses when adding, changing, testing, or reviewing Postgres persistence in Rust services that use sqlx, especially when designing migrations, query!

    1.2k GitHub stars~938 tokensUpdated today
    Testing & QAAuto-check passed
  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated today
    DatabasesAuto-check passed
  • Sql2er

    ystemsrx/sql_to_ER

    A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…

    188 GitHub starsUsed in 1 repo~1.1k tokens
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed

More from finos/legend-engine

All 15 skills in this repo
  • Pure Backend Start

    finos/legend-engine

    Starts (or confirms) the standalone legend-engine backend - engine Server + H2 + local metadata server on fixed ports 9095/9092 - so a Pure LSP started with -Dlegend.test.

    112 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Pure Chain Update

    finos/legend-engine

    Procedure for git-syncing and rebuilding a local legend-pure + legend-engine checkout, in dependency order, with pinned dependency versions resynced.

    112 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Pure Code Style

    finos/legend-engine

    Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on…

    112 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Pure Lsp Check

    finos/legend-engine

    Compiles/checks a single .pure file against the already-running Legend Pure LSP bridge and reports diagnostics (errors/warnings) in under a second, as a fast alternative to a full mvn test/mvn…

    112 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Pure Lsp Connect

    finos/legend-engine

    Attaches the pure-lsp HTTP bridge to an LSP daemon that is ALREADY running (e.g.

    112 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Pure Lsp Execute

    finos/legend-engine

    Runs exactly ONE existing Pure function by path (signature, mangled id or bare path) through the running Legend Pure LSP bridge, without a go() wrapper, and returns its typed value in returnValue.

    112 GitHub stars~883 tokensUpdated today
    Auto-check passed

Works with

Questions about Pure Lsp SQL E2E

What does Pure Lsp SQL E2E do?

Runs cases from the legend-engine SQL e2e parity corpus (TestPostgresParity, ~2300 SQL cases compared against a real Postgres) through the warm interpreted Pure LSP with pure-sql-e2e, so edits to…. Pure Lsp SQL E2E is an agent skill from finos/legend-engine.pure and other SQL-translation Pure sources are testable in seconds instead of a 15-25 min Maven rebuild.

When should I use Pure Lsp SQL E2E?

Pure Lsp SQL E2E fits situations like: working on Legend SQL - Pure translation; the postgresSql parser/router; the user asks to run/iterate on SQL e2e; investigate a parity divergence.

How do I install Pure Lsp SQL E2E in Claude Code?

Run `npx skills add finos/legend-engine --skill pure-lsp-sql-e2e -a claude-code`. Or copy the skill folder (plugins/pure-dev/skills/pure-lsp-sql-e2e in finos/legend-engine) into .claude/skills/pure-lsp-sql-e2e in your project. Claude Code loads it when a task matches its description.

How do I install Pure Lsp SQL E2E in Codex?

Run `npx skills add finos/legend-engine --skill pure-lsp-sql-e2e -a codex`. Or copy the skill folder (plugins/pure-dev/skills/pure-lsp-sql-e2e in finos/legend-engine) into .agents/skills/pure-lsp-sql-e2e in your project. Codex loads it when a task matches its description.

Can I use Pure Lsp SQL E2E 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 finos/legend-engine --skill pure-lsp-sql-e2e -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pure-lsp-sql-e2e, .gemini/skills/pure-lsp-sql-e2e, .github/skills/pure-lsp-sql-e2e and .opencode/skills/pure-lsp-sql-e2e in your project.

What does Pure Lsp SQL E2E need to run?

Going by SKILL.md and its folder, Pure Lsp SQL E2E needs the command-line tools its instructions call (mvn).

Does Pure Lsp SQL E2E 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 Pure Lsp SQL E2E 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 Pure Lsp SQL E2E use?

Pure Lsp SQL E2E 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 Pure Lsp SQL E2E use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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 Pure Lsp SQL E2E?

Skills that share tags, products or a category with Pure Lsp SQL E2E: Efcore Query Performance (atherio-danp/cde-dotnetcc, 109 stars), SQL Translation (Microck/ordinary-claude-skills, 403 stars), Rust Sqlx Postgres Service (hashgraph-online/awesome-codex-plugins, 1.2k stars) and Safe SQL Execution (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pure Lsp SQL E2E?

finos (a GitHub organization) maintains it in finos/legend-engine, which has 112 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

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