agentleFS
redpanda-dataredpanda-data/skills/skills/sql-debugging/SKILL.md

sql-debugging

Skill9 starsChanged 4 months agoApache-2.0View on GitHub

Diagnoses Redpanda SQL problems on Redpanda Cloud from the SQL endpoint, and looks up the system tables, error causes, and recovery steps in the Redpanda docs. Use when a Redpanda SQL query is slow, stuck, or canceled for memory, when SHOW NODES reports a degradation error, when a topic-backed table returns decode errors or fewer rows than the topic holds, or when a query over an Iceberg-enabled topic returns stale history or fails to plan. For writing queries, see `/redpanda:sql`. For enabling, scaling, or disabling the SQL engine, see `/redpanda:sql-admin-api`. For catalogs and table mappings, see `/redpanda:sql-federated-queries`.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look up the runtime system tables (system.nodes, system.queries, system.execs), who can read them, error messages and their recovery steps, …

    line 37
  2. Distinctive:

    CREATE TABLE (topic mapping options): https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/create-table/

    line 48
  3. Distinctive:

    When a problem needs node-level diagnostics, the user opens a case with Redpanda Support and includes the cluster ID, the time window, the …

    line 53
  4. Very specific:

    If the Docs MCP server refuses for quota and you can't fetch the page, tell the user to sign in through /mcp rather than answering from …

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Redpanda SQL: Debugging

Redpanda SQL is the analytical SQL engine on Redpanda Cloud. Users diagnose it through SQL on the cluster's SQL endpoint and through the Cloud Console; node logs, engine configuration, and engine metrics are collected by Redpanda Support. This skill keeps only the product-specific procedure below. Look up everything else in the docs (last section).

How to work

When a topic-backed table returns fewer rows than the topic holds, or decode errors, read the table's mapping before guessing. Query system.kafka_sources for the table and check its error_handling_policy, schema subject, and Protobuf message name. A table mapped with DROP_RECORD skips every record that fails to decode, with no error. To see those records, map the same topic again with error_handling_policy = 'FILL_NULL' and select the rows whose redpanda_raw is not null; the redpanda column gives each one's partition and offset.

Before deleting an Iceberg-enabled topic, keep its Iceberg table if anyone still needs the history. By default, deleting a topic also deletes its Iceberg table. If the user wants the history kept, set redpanda.iceberg.delete=false on the topic first, then delete it. If you can't tell whether the history is still needed, ask before deleting.

Use the docs for everything else

Look up the runtime system tables (system.nodes, system.queries, system.execs), who can read them, error messages and their recovery steps, CREATE TABLE mapping options, EXPLAIN, and Iceberg topic properties in the Redpanda docs instead of from memory. Follow /redpanda:redpanda-docs, and pass platform: "cloud" to ask_redpanda_question: Redpanda SQL runs in Redpanda Cloud. Use get_config_property for one cluster or topic property. Start from:

When a problem needs node-level diagnostics, the user opens a case with Redpanda Support and includes the cluster ID, the time window, the exact error text, and any query IDs.

If the Docs MCP server refuses for quota and you can't fetch the page, tell the user to sign in through /mcp rather than answering from memory.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.