Agent skill

Multi Cluster API Data Mismatch

by divinevideo in divinevideo/divine-mobile

Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC).

MPL-2.0Auto-check passedDevOps & Cloud

Install Multi Cluster API Data Mismatch

skills CLI
$ npx skills add divinevideo/divine-mobile --skill multi-cluster-api-data-mismatch -a claude-code

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

GitHub CLI
$ gh skill install divinevideo/divine-mobile multi-cluster-api-data-mismatch --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/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/multi-cluster-api-data-mismatch .claude/skills/multi-cluster-api-data-mismatch && 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
multi-cluster-api-data-mismatch
GitHub stars
265
Token cost
~1.3k tokens
SKILL.md length
365 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC).

  • Works in 5 steps: Verify which cluster serves the domain → Check all available contexts → Switch to the correct cluster → …
  • REST API returns records that direct database queries cant find
  • SKILL.md covers Problem, Context / Trigger Conditions, Solution and Verification, plus 3 more sections
  • Calls kubectl and gcloud; reaches z1hzyismdt.us-central1.gcp.clickhouse.cloud

What it does

Multi Cluster API Data Mismatch is an agent skill from divinevideo/divine-mobile. Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC). Use when: (1) REST API returns records that direct database queries can't find, (2) Data counts match approximately but specific records don't overlap, (3) kubectl context points to a different cluster than the one serving the public domain, (4) ClickHouse/Postgres queries return stale or different data than the API, (5) "completely different datasets" despite same table names and schemas…

Its SKILL.md is about 1.3k 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 DevOps & Cloud, covering Container orchestration, Data warehousing and Root cause analysis. It works with Kubernetes, ClickHouse and PostgreSQL. The licence is MPL-2.0.

When your agent uses it

  • REST API returns records that direct database queries cant find
  • Data counts match approximately but specific records dont overlap
  • Kubectl context points to a different cluster than the one serving the public domain
  • ClickHouse/Postgres queries return stale

Example prompts

  • “API returns data that doesn”
  • “t find, (2) Data counts match approximately but specific records don”
  • “completely different datasets”
  • “/multi-cluster-api-data-mismatch”

Workflow steps

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

  1. Verify which cluster serves the domain
  2. Check all available contexts
  3. Switch to the correct cluster
  4. Verify the database connection
  5. Also check for ExternalSecrets when updating secrets

What it can do on your machine

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

    • kubectl
    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • z1hzyismdt.us-central1.gcp.clickhouse.cloud

    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

Multi Cluster API Data Mismatch loads about 1.3k tokens when it runs. Until then it costs about 150 tokens; SKILL.md has 365 words of instructions outside code blocks.

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

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 divinevideo/divine-mobile at commit 8d5fbf2, republished under its MPL-2.0 licence (© divinevideo). 365 words, ~1,281 tokens.

Download SKILL.mdSave it as .claude/skills/multi-cluster-api-data-mismatch/SKILL.md (or your agent's skills folder).
name
multi-cluster-api-data-mismatch
description
Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC). Use when: (1) REST API returns records that direct database queries can't find, (2) Data counts match approximately but specific records don't overlap, (3) kubectl context points to a different cluster than the one serving the public domain, (4) ClickHouse/Postgres queries return stale or different data than the API, (5) "completely different datasets" despite same table names and schemas. Root cause: querying the wrong cluster's database.
author
Claude Code
version
1.0.0
date
2026-03-02

Multi-Cluster API Data Mismatch

Problem

When investigating why an API returns data that doesn't match direct database queries, the root cause may be that your kubectl context points to a different cluster (e.g., POC) than the one actually serving the public API (e.g., production). Both clusters have the same schemas and similar data volumes, making the mismatch non-obvious.

Context / Trigger Conditions

  • API returns records that direct database queries (kubectl exec ... clickhouse-client) can't find
  • Data counts are similar (e.g., both have ~20k records) but specific records differ
  • You're debugging a data pipeline that "should work" but labels/counts never update
  • Multiple kubectl contexts exist (production, staging, POC, test)
  • The API response header shows server: nginx but no ingress exists in the current cluster's namespace

Solution

Step 1: Verify which cluster serves the domain
bash
# Check DNS for the public API domain
dig relay.divine.video +short
# → 34.58.27.79

# Check your current cluster's gateway/ingress IP
kubectl get gateway -A  # or kubectl get ingress -A
# → 35.184.10.63  (different IP = different cluster!)
Step 2: Check all available contexts
bash
kubectl config get-contexts
# Look for production vs staging vs POC contexts
Step 3: Switch to the correct cluster
bash
kubectl config use-context <production-context-name>
Step 4: Verify the database connection
bash
# Check what database the API actually connects to
kubectl get secret -n <namespace> <db-credentials> -o jsonpath='{.data.DATABASE_URL}' | base64 -d
# Production might use managed services (ClickHouse Cloud, Cloud SQL)
# POC might use in-cluster pods
Step 5: Also check for ExternalSecrets when updating secrets

If secrets are managed by ExternalSecrets operator:

bash
# Check if ExternalSecrets manages the secret
kubectl get externalsecret -n <namespace>

# If yes, update the SOURCE (e.g., GCP Secret Manager), not the k8s secret
gcloud secrets versions add <secret-name> --project=<project> --data-file=-

# Force sync after updating
kubectl annotate externalsecret <name> -n <namespace> force-sync=$(date +%s) --overwrite

# Verify the k8s secret updated
kubectl get secret <name> -n <namespace> -o jsonpath='{.data.<key>}' | base64 -d

Verification

After switching to the correct cluster:

  1. Re-run the same database query — the "missing" records should now appear
  2. The latest timestamp in the database should match recent API activity
  3. kubectl get pods -n <namespace> should show the same pods the API logs reference
Show full SKILL.md (153 more words)Show less

Key Indicators You're On the Wrong Cluster

SymptomExplanation
API video count ~21k, DB count ~20kSimilar but not identical = different datasets
Latest DB record is days oldAPI is receiving writes on a different cluster
No ingress/gateway routes match the public domainTraffic routes elsewhere
Managed DB URL (e.g., ClickHouse Cloud) vs in-cluster podProduction vs POC architecture
API pod logs show only health checks, no real trafficReal traffic goes to another cluster

Example

bash
# You query POC ClickHouse and find 20,371 videos, latest from Feb 26
# But the API at relay.divine.video returns videos from today
# The API returns a video with d_tag that doesn't exist in your ClickHouse

# Fix: switch to production
kubectl config use-context connectgateway_dv-platform-prod_...

# Now query production ClickHouse Cloud
CH_URL=$(kubectl get secret -n funnelcake funnelcake-clickhouse-credentials \
  -o jsonpath='{.data.CLICKHOUSE_URL}' | base64 -d)
# → https://z1hzyismdt.us-central1.gcp.clickhouse.cloud:8443
# (managed service, not in-cluster pod)

# Query returns 21,221 videos with latest from minutes ago — matches the API

Notes

  • Production often uses managed database services (ClickHouse Cloud, Cloud SQL) while POC/staging use in-cluster pods — same schemas, different data
  • The similar-but-not-identical record counts are the most misleading symptom
  • Always check max(created_at) or max(indexed_at) — if it's days old on a live service, you're querying the wrong instance
  • When updating k8s secrets in production, check for ExternalSecrets first — manual kubectl create secret will be immediately overwritten by the operator syncing from GCP Secret Manager / AWS Secrets Manager / Vault

© divinevideo, MPL-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 .agents/skills/multi-cluster-api-data-mismatch of divinevideo/divine-mobile.

Open the folder on GitHubat commit 8d5fbf2

Compare with similar skills

Multi Cluster API Data Mismatch 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.

Multi Cluster API Data Mismatch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Multi Cluster API Data Mismatch this skilldivinevideo/divine-mobile265—~1.3kAutomated safety check: PassMPL-2.0
Opensourcefaqdigoal/blog8.6k—~966Automated safety check: PassGPL-2.0
Cloud SaaS Modechmonitor/chmonitor298—~2.5kAutomated safety check: NotesGPL-3.0
Backend Dev Guidelineslitefuse/litefuse1001 repos~5.8kAutomated safety check: PassCustom licence
Querying Tempotempoxyz/tidx107—~3.1kAutomated safety check: PassMIT
Archestra Dev Investigatearchestra-ai/archestra4.3k—~831Automated safety check: PassCustom licence

Similar skills

  • Opensourcefaq

    digoal/blog

    解答与开源产品有关的深度技术问题,输出图文并茂的 Markdown 技术文章。触发条件:用户提出与开源项目(如 PostgreSQL、Redis、Kafka、Kubernetes、ClickHouse、Flink 等)相关的技术问题,并提供源码目录或 URL、deepwiki repo 名称。即使用户只说"帮我解答这个开源问题"或"分析一下这个项目的某个机制",也应使用本…

    8.6k GitHub stars~966 tokensUpdated 10 days ago
    DatabasesAuto-check passed
  • Cloud SaaS Mode

    chmonitor/chmonitor

    Work on chmonitor's Cloud (SaaS) vs self-hosted (OSS) behaviour from ONE codebase.

    298 GitHub stars~2.5k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Backend Dev Guidelines

    litefuse/litefuse

    Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.

    100 GitHub starsUsed in 1 repo~5.8k tokens
    Backend & APIsAuto-check passed
  • Querying Tempo

    tempoxyz/tidx

    Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.

    107 GitHub stars~3.1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Archestra Dev Investigate

    archestra-ai/archestra

    A skill your agent uses when investigating Archestra bugs or incidents — staging issues, backend 50x errors, Drizzle failed queries, DB connection pressure, deploy regressions, or Kubernetes/runtime…

    4.3k GitHub stars~831 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Gke Cost Analysis

    google/skills

    Official

    Answer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics.

    21k GitHub stars~1.5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    265 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    265 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    265 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    265 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    265 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    265 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Multi Cluster API Data Mismatch

What does Multi Cluster API Data Mismatch do?

Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC). Multi Cluster API Data Mismatch is an agent skill from divinevideo/divine-mobile. Debug "API returns data that doesn't exist in database" when multiple Kubernetes clusters exist (production, staging, POC).

When should I use Multi Cluster API Data Mismatch?

Multi Cluster API Data Mismatch fits situations like: REST API returns records that direct database queries cant find; data counts match approximately but specific records dont overlap; kubectl context points to a different cluster than the one serving the public domain; clickHouse/Postgres queries return stale.

How do I install Multi Cluster API Data Mismatch in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill multi-cluster-api-data-mismatch -a claude-code`. Or copy the skill folder (.agents/skills/multi-cluster-api-data-mismatch in divinevideo/divine-mobile) into .claude/skills/multi-cluster-api-data-mismatch in your project. Claude Code loads it when a task matches its description.

How do I install Multi Cluster API Data Mismatch in Codex?

Run `npx skills add divinevideo/divine-mobile --skill multi-cluster-api-data-mismatch -a codex`. Or copy the skill folder (.agents/skills/multi-cluster-api-data-mismatch in divinevideo/divine-mobile) into .agents/skills/multi-cluster-api-data-mismatch in your project. Codex loads it when a task matches its description.

Can I use Multi Cluster API Data Mismatch 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 divinevideo/divine-mobile --skill multi-cluster-api-data-mismatch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/multi-cluster-api-data-mismatch, .gemini/skills/multi-cluster-api-data-mismatch, .github/skills/multi-cluster-api-data-mismatch and .opencode/skills/multi-cluster-api-data-mismatch in your project.

What does Multi Cluster API Data Mismatch need to run?

Going by SKILL.md and its folder, Multi Cluster API Data Mismatch needs the command-line tools its instructions call (kubectl and gcloud).

Does Multi Cluster API Data Mismatch access the network?

SKILL.md names 1 domain. In commands or code: z1hzyismdt.us-central1.gcp.clickhouse.cloud; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Multi Cluster API Data Mismatch 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 Multi Cluster API Data Mismatch use?

Multi Cluster API Data Mismatch is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Multi Cluster API Data Mismatch use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 Multi Cluster API Data Mismatch?

Skills that share tags, products or a category with Multi Cluster API Data Mismatch: Opensourcefaq (digoal/blog, 8.6k stars), Cloud SaaS Mode (chmonitor/chmonitor, 298 stars), Backend Dev Guidelines (litefuse/litefuse, 100 stars) and Querying Tempo (tempoxyz/tidx, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Multi Cluster API Data Mismatch?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 265 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 7, 2026.

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