/duckless:troubleshootingfrom DuckLess
Diagnoses failed, stuck, or slow DuckLess jobs using status, logs, and result commands. Covers init errors, capacity issues, OOM, IAM propagation, and BigQuery permission problems.
Ships in DuckLess. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
duckless status <job-id> # state, runner, machine, events, runner metrics (peak rss, spill)
duckless logs <job-id> # runner logs (add -f to follow)
duckless result <job-id> # last SELECT of a SQL job
The events in status come from the platform (Batch or Cloud Run): scheduling, image pull,
exit code. The logs come from the runner: duckdb_connected (threads, memory, spill dir),
one statement_done per statement, then job_done or job_failed with the error.
| Symptom | Cause | Fix |
|---|---|---|
init ends BLOCKED | an organization policy forbids something | read the failing check; fix the policy or the region; nothing was created |
init fails on IAM right after creating an account | IAM propagation | run init again (it is idempotent) |
Stays QUEUED/SCHEDULED on Batch | no capacity or quota for the machine (Spot especially) | duckless preflight -m …; another size or family, or drop --spot |
| Fails in seconds, no runner logs, event mentions image pull | runner account cannot read the image | grant roles/artifactregistry.reader on the image's repository |
| Exit code from Batch with a preemption event | Spot VM reclaimed | it is retried; use on-demand for deadline jobs |
Out of Memory / killed | working set larger than memory, or spill disk full | bigger highmem machine; more --local-ssd; on Cloud Run use --on batch |
gs:// errors about credentials or HTTP | httpfs installed or loaded by the job | remove it: the runner serves gs:// with the gcs extension |
| First GCS call very slow on Cloud Run | gRPC to GCS from Cloud Run | already HTTP by default there; do not set DUCKLESS_GCS_GRPC=true |
Too many open files | old runner image | runner ≥ 0.2.0 raises the limit |
DuckLake ATTACH fails | catalog unreachable | see the ducklake skill: network, .envrc lines, Cloud Run VPC egress |
| Slow read of one big CSV/JSON (~100 MB/s) | one file fetched by few streams | stage_locally('gs://…') then read locally; or split the file upstream |
| Slow writes to GCS | single Parquet writer | PER_THREAD_OUTPUT, FILE_SIZE_BYTES '256MB' |
BigQuery Permission Denied | dataset not granted, or a query (ATTACH, bigquery_query) without --bigquery-jobs | duckless init --bigquery-dataset <dataset> (--bigquery-jobs for queries); datasets of other projects: their owners grant roles/bigquery.dataViewer |
to_bigquery Permission Denied / Access Denied | the dataset is not a write dataset | duckless init --bigquery-write-dataset <dataset>; other projects: their owners grant roles/bigquery.dataEditor |
to_bigquery refused before writing | a guard: duplicate or NULL keys, NULL partition values, columns the table lacks, an ingestion-time table for replace_partitions | the message names the rows or columns: fix the data, or the mode |
Query exceeded limit for bytes billed | max_bytes_billed reached; the table is unchanged | an unpruned merge: partition column in key or prune=True; or raise the cap |
| Slow BigQuery read | large table on Cloud Run | --on batch, select fewer columns, add a filter |
| Slow Python | row-by-row UDF | vectorized (Arrow) UDF or SQL |
Reproduce small: same job on a sample with -m n2-standard-4 (Cloud Run, ~30 s round trip),
then scale back up. Check status metrics before blaming the machine: no spill and low peak
RSS mean the time goes elsewhere (GCS reads, many small files, a Python loop).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tosun-si/duckless --plugin duckless5 skills in this plugin
/ducklakeUse DuckLake tables with DuckLess - a Cloud SQL catalog attached as `lake` in every job, data as Parquet on GCS, snapshots and time travel. Use when someone wants tables instead of loose Parquet files, incremental loads, updates/deletes, time travel, or when a DuckLake attach fails./setupSet DuckLess up in a GCP project, either with its Terraform module in the team's own Terraform and CI/CD (recommended for teams) or with `duckless init` (quick start), then wire the .envrc. Use when someone starts with DuckLess, adds it to a project, integrates the module into Terraform or Terragrunt, upgrades it, or removes it./sizingChoose the machine, Spot, local SSD and runner (Cloud Batch or Cloud Run Jobs) for a DuckLess job, and resize it from the metrics of a previous run. Use when deciding `-m`, `--spot`, `--local-ssd` or `--on` for `duckless run`/`exec`, or when a job is slow, spills, runs out of memory or costs too much./writing-jobsWrite DuckLess jobs (SQL files, Python scripts with duckless_runtime, or custom images with `duckless exec`) that read and write Parquet on GCS fast. Use when creating, reviewing or porting a data job for DuckLess, or when a job is slow on GCS writes or Python UDFs.Other plugins' skills for the same job