Agent skill

Mz Query Perf

by MaterializeInc in MaterializeInc/materialize

Analyze and optimize a Console/catalog SQL query in user space — diagnose its plan on real relations, then measure candidate rewrites with a faithful synthetic-fleet sweep.

Custom licenceAuto-check passedDatabases

Install Mz Query Perf

skills CLI
$ npx skills add MaterializeInc/materialize --skill mz-query-perf -a claude-code

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

GitHub CLI
$ gh skill install MaterializeInc/materialize mz-query-perf --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/MaterializeInc/materialize.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mz-query-perf .claude/skills/mz-query-perf && 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
mz-query-perf
GitHub stars
6.4k
Token cost
~2.1k tokens
SKILL.md length
1,142 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
Custom licence

At a glance

Analyze and optimize a Console/catalog SQL query in user space — diagnose its plan on real relations, then measure candidate rewrites with a faithful synthetic-fleet sweep.

  • Works in 2 steps: diagnose the plan on the REAL relations… → measure magnitude with a FAITHFUL…
  • Asked to find performance improvements for a query that reads mzcatalog / mzinternal relations
  • SKILL.md covers Phase 1 — diagnose the plan on…, Phase 2 — measure magnitude…, Pitfalls (learned the hard way) and Harness shape (for the Phase-2…, plus 1 more section
  • Calls psql

What it does

Mz Query Perf is an agent skill from MaterializeInc/materialize. Analyze and optimize a Console/catalog SQL query in user space — diagnose its plan on real relations, then measure candidate rewrites with a faithful synthetic-fleet sweep. Use when asked to find performance improvements for a query that reads mzcatalog / mzinternal relations.

Its SKILL.md is about 2.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. It works with SQL and PostgreSQL. The repository describes itself as: The live data layer for apps and AI agents. Create up-to-the-second views into your business, just using SQL.

When your agent uses it

  • Asked to find performance improvements for a query that reads mzcatalog / mzinternal relations
  • Tasks that involve SQL

Example prompts

  • “/mz-query-perf”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. diagnose the plan on the REAL relations (cheap, do this first)
  2. measure magnitude with a FAITHFUL synthetic sweep (only for candidates)

What it can do on your machine

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

    • psql

    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

Mz Query Perf loads about 2.1k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 1,142 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~2.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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,142 words (~2,145 tokens).

“A repeatable method for finding and validating performance improvements to a SQL query that reads system catalog / introspection relations (the kind the Console runs against mz_catalog_server). Developed on the cluster-utilization queries.”

— opening of SKILL.md by MaterializeInc, Custom licence
name
mz-query-perf

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/mz-query-perf of MaterializeInc/materialize.

Open the folder on GitHubat commit b760ecc

Compare with similar skills

Mz Query Perf 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.

Mz Query Perf compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mz Query Perf this skillMaterializeInc/materialize6.4k—~2.1kAutomated safety check: PassCustom licence
Safe SQL Executionsupabase/supabase111k—~4.2kAutomated safety check: PassApache-2.0
Sql2erystemsrx/sql_to_ER1881 repos~1.1kAutomated safety check: PassAGPL-3.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Schema Explorationtimescale/pg-aiguide1.9k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Schema Exploration

    timescale/pg-aiguide

    Explore an existing PostgreSQL database before answering questions about its data or writing SQL.

    1.9k GitHub stars~1.1k tokensUpdated today
    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

More from MaterializeInc/materialize

All 15 skills in this repo
  • Mz Release Signoff

    MaterializeInc/materialize

    Verify a release candidate on the Grafana dashboards and sign off in release.

    6.4k GitHub stars~7.2k tokensUpdated today
    Auto-check passed
  • Mz Benchmark

    MaterializeInc/materialize

    Add/modify/debug Materialize perf benchmark scenarios. An agent skill from MaterializeInc/materialize.

    6.4k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Mz Commit

    MaterializeInc/materialize

    Trigger: "commit", "prepare commit", "create PR", "push", "open pull request", or mentions committing, pre-commit checks, pull requests in Materialize.

    6.4k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Mz Dbt Release

    MaterializeInc/materialize

    Cut a dbt-materialize PyPI release: bump the version in version.py and setup.py, date the Unreleased CHANGELOG entry, and open the release PR with a Ship: <url body.

    6.4k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Mz Debug CI

    MaterializeInc/materialize

    Investigate CI failures on PR via gh + Buildkite MCP or bk CLI.

    6.4k GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Mz Limits Test

    MaterializeInc/materialize

    Add/modify/debug limits test. An agent skill from MaterializeInc/materialize.

    6.4k GitHub stars~808 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Mz Query Perf

What does Mz Query Perf do?

Analyze and optimize a Console/catalog SQL query in user space — diagnose its plan on real relations, then measure candidate rewrites with a faithful synthetic-fleet sweep. Mz Query Perf is an agent skill from MaterializeInc/materialize. Analyze and optimize a Console/catalog SQL query in user space — diagnose its plan on real relations, then measure candidate rewrites with a faithful synthetic-fleet sweep.

When should I use Mz Query Perf?

Mz Query Perf fits situations like: asked to find performance improvements for a query that reads mzcatalog / mzinternal relations; tasks that involve SQL.

How do I install Mz Query Perf in Claude Code?

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

How do I install Mz Query Perf in Codex?

Run `npx skills add MaterializeInc/materialize --skill mz-query-perf -a codex`. Or copy the skill folder (.agents/skills/mz-query-perf in MaterializeInc/materialize) into .agents/skills/mz-query-perf in your project. Codex loads it when a task matches its description.

Can I use Mz Query Perf 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 MaterializeInc/materialize --skill mz-query-perf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mz-query-perf, .gemini/skills/mz-query-perf, .github/skills/mz-query-perf and .opencode/skills/mz-query-perf in your project.

What does Mz Query Perf need to run?

Going by SKILL.md and its folder, Mz Query Perf needs the command-line tools its instructions call (psql). Our summary lists: Python 3.

Does Mz Query Perf 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 Mz Query Perf 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 Mz Query Perf use?

Mz Query Perf has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Mz Query Perf use?

About 2.1k tokens (SKILL.md is roughly 8.6k 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 Mz Query Perf?

Skills that share tags, products or a category with Mz Query Perf: Safe SQL Execution (supabase/supabase, 111k stars), Sql2er (ystemsrx/sql_to_ER, 188 stars), SQL Database Support for pREST (prest/prest, 4.6k stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mz Query Perf?

MaterializeInc (a GitHub organization) maintains it in MaterializeInc/materialize, which has 6,377 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 8, 2026.

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