Agent skill

Metadata Storage Source Of Truth Desync

by divinevideo in divinevideo/divine-mobile

Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem).

MPL-2.0Auto-check passedBackend & APIs

Install Metadata Storage Source Of Truth Desync

skills CLI
$ npx skills add divinevideo/divine-mobile --skill metadata-storage-source-of-truth-desync -a claude-code

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

GitHub CLI
$ gh skill install divinevideo/divine-mobile metadata-storage-source-of-truth-desync --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/metadata-storage-source-of-truth-desync .claude/skills/metadata-storage-source-of-truth-desync && 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
metadata-storage-source-of-truth-desync
GitHub stars
266
Token cost
~1.2k tokens
SKILL.md length
408 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem).

  • Works in 4 steps: Storage is the source of truth — if the… → Auto-repair metadata — when you find a… → Log desyncs — track how often metadata… → …
  • Content exists in storage but API returns processing
  • SKILL.md covers Problem, Context / Trigger Conditions, Solution and Verification, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Metadata Storage Source Of Truth Desync is an agent skill from divinevideo/divine-mobile. Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem). Use when: (1) Content exists in storage but API returns "processing" or "not ready", (2) Webhook callbacks that update metadata failed silently, (3) Backfill scripts generated content but didn't update status records, (4) HLS/transcoded content exists but transcodestatus is not "Complete", (5) Handler checks metadata status BEFORE checking if content actually exists in storage.

Its SKILL.md is about 1.2k 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 Backend & APIs, covering Webhooks and File uploads and storage. The licence is MPL-2.0.

When your agent uses it

  • Content exists in storage but API returns processing
  • Webhook callbacks that update metadata failed silently
  • Backfill scripts generated content but didnt update status records
  • HLS/transcoded content exists but transcodestatus is not Complete

Example prompts

  • “processing”
  • “not ready”
  • “Complete”
  • “/metadata-storage-source-of-truth-desync”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Storage is the source of truth — if the file exists, serve it regardless of metadata
  2. Auto-repair metadata — when you find a desync, fix it inline (best-effort, don't fail if update fails)
  3. Log desyncs — track how often metadata is wrong to find the root cause
  4. Don't block on metadata — metadata status should be advisory, not a gate

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).

    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

Metadata Storage Source Of Truth Desync loads about 1.2k tokens when it runs. Until then it costs about 138 tokens; SKILL.md has 408 words of instructions outside code blocks.

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

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 c3d6f7e, republished under its MPL-2.0 licence (© divinevideo). 408 words, ~1,179 tokens.

Download SKILL.mdSave it as .claude/skills/metadata-storage-source-of-truth-desync/SKILL.md (or your agent's skills folder).
name
metadata-storage-source-of-truth-desync
description
Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem). Use when: (1) Content exists in storage but API returns "processing" or "not ready", (2) Webhook callbacks that update metadata failed silently, (3) Backfill scripts generated content but didn't update status records, (4) HLS/transcoded content exists but transcode_status is not "Complete", (5) Handler checks metadata status BEFORE checking if content actually exists in storage.
author
Claude Code
version
1.0.0
date
2026-02-27

Metadata-Storage Source of Truth Desync

Problem

When a system has both metadata (KV store, database status field) and actual content in object storage, the metadata can become stale. If the serving handler gates on metadata status before checking storage, content that exists becomes inaccessible.

Common causes:

  • Webhook callbacks (transcode complete, migration done) failed silently
  • Backfill scripts created content but didn't update metadata
  • Race conditions between metadata write and storage write
  • Manual operations that bypassed the normal status update flow

Context / Trigger Conditions

  • API returns "processing" or "202 Accepted" for content that actually exists in storage
  • transcode_status is Processing/Pending/None but HLS files exist in GCS
  • Content works when accessed directly via storage URL but not through the API
  • Backfill script ran successfully (content in bucket) but metadata wasn't updated
  • Webhook endpoint had downtime or returned errors during batch processing

Solution

Pattern: Storage-First with Metadata Auto-Repair

Check storage (source of truth) BEFORE checking metadata status. If content exists, serve it and fix metadata as a side effect.

rust
// BAD: Metadata-first (blocks access when metadata is stale)
match metadata.transcode_status {
    Some(Complete) => { /* serve from storage */ }
    Some(Processing) => { return 202; }  // Blocks even if content exists!
    _ => { trigger_transcoding(); return 202; }
}

// GOOD: Storage-first with auto-repair
match download_from_storage(&path) {
    Ok(content) => {
        // Content exists — serve it and fix metadata if needed
        if metadata.transcode_status != Some(Complete) {
            eprintln!("[FIX] {} has content but status was {:?}", id, metadata.transcode_status);
            update_status(id, Complete);  // Auto-repair
        }
        serve(content)
    }
    Err(NotFound) => {
        // Content truly doesn't exist — now check metadata for status
        match metadata.transcode_status {
            Some(Processing) => return 202,
            _ => { trigger_processing(); return 202; }
        }
    }
}
Key Principles
  1. Storage is the source of truth — if the file exists, serve it regardless of metadata
  2. Auto-repair metadata — when you find a desync, fix it inline (best-effort, don't fail if update fails)
  3. Log desyncs — track how often metadata is wrong to find the root cause
  4. Don't block on metadata — metadata status should be advisory, not a gate
Apply to HEAD requests too

HEAD handlers often have the same bug. Apply the same storage-first pattern:

rust
// HEAD: Check storage, not just metadata
match check_storage_exists(&path) {
    Ok(true) => {
        if metadata.status != Complete {
            update_status(id, Complete);
        }
        return 200;
    }
    Ok(false) | Err(_) => {
        // Fall back to metadata-based response
    }
}
Show full SKILL.md (164 more words)Show less

Verification

  1. Request content that previously returned 202 — should now return 200 with content
  2. Check logs for "[FIX]" messages showing auto-repair in action
  3. After warming traffic, verify metadata has been corrected

Example

In Divine Blossom, the HLS handler checked transcode_status in KV before GCS:

  • ~57,000 objects in GCS bucket, most with HLS transcodes
  • Many had transcode_status: None or Processing in KV (webhooks failed during backfill)
  • Handler returned "202 transcoding in progress" for content that was already in GCS
  • Fix: Check GCS first, serve if exists, auto-repair KV metadata as side effect

Notes

  • The auto-repair is best-effort — if the metadata update fails, don't fail the request
  • This pattern works well with caching layers (CDN, VCL) because the repair only runs on cache misses, and subsequent requests hit the cache
  • Consider running a batch metadata-repair script to fix all desynced records at once, rather than relying solely on on-demand repair
  • Root cause should still be investigated (why did webhooks fail?) to prevent future desyncs

© 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/metadata-storage-source-of-truth-desync of divinevideo/divine-mobile.

Open the folder on GitHubat commit c3d6f7e

Compare with similar skills

Metadata Storage Source Of Truth Desync 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.

Metadata Storage Source Of Truth Desync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Metadata Storage Source Of Truth Desync this skilldivinevideo/divine-mobile266—~1.2kAutomated safety check: PassMPL-2.0
Convex HTTP Actionswaynesutton/builder-skills406—~2.6kAutomated safety check: PassApache-2.0
Neon Functionsneondatabase/agent-skills100—~12kAutomated safety check: NotesApache-2.0
Wecomcli SmartsheetWecomTeam/wecom-cli3.2k1 repos~1.9kAutomated safety check: PassMIT
Frappe Errors APIImpertio-Studio/Frappe_Claude_Skill_Package189—~4kAutomated safety check: PassMIT
Convex RuntimeIgorWarzocha/Opencode-Workflows122—~1.1kAutomated safety check: PassNone

Similar skills

  • Convex HTTP Actions

    waynesutton/builder-skills

    Adds HTTP endpoints in convex/http.ts: webhook receivers with signature checks, REST style routes, CORS, auth headers, streaming responses, and file uploads over HTTP.

    406 GitHub stars~2.6k tokensUpdated 13 days ago
    Backend & APIsAuto-check passed
  • Neon Functions

    neondatabase/agent-skills

    Official

    Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASEURL injected automatically and compute that runs next to your data.

    100 GitHub stars~12k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes
  • Wecomcli Smartsheet

    WecomTeam/wecom-cli

    企业微信智能表格内容操作技能——专注于智能表格(smartsheet)的数据、结构与样式管理:读取表结构与记录、管理子表/字段/记录/视图/图表,以及修改行列样式(填色/高亮);记录新增或更新遇到 851003 / no authority 时通过 Webhook 兜底写入。触发条件:用户提到智能表格、企微表格、smartsheet 的内容操作或样式修改,或链接形如…

    3.2k GitHub starsUsed in 1 repo~1.9k tokens
    Backend & APIsAuto-check passed
  • Frappe Errors API

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when debugging or handling API errors in Frappe/ERPNext v14/v15/v16.

    189 GitHub stars~4k tokensUpdated 24 days ago
    Backend & APIsAuto-check passed
  • Convex Runtime

    IgorWarzocha/Opencode-Workflows

    Implement Convex runtime features: HTTP actions, file storage, search (full text + vector), scheduling (crons + scheduled functions), and RAG patterns.

    122 GitHub stars~1.1k tokensUpdated 8 mo ago
    Backend & APIsAuto-check passed
  • Security Review

    trycompai/comp

    Check code for the most common, high-risk security vulnerabilities (broken access control, tenant isolation, injection, secrets, SSRF, auth/session, unsafe file handling, mass assignment) before it…

    2k GitHub stars~853 tokensUpdated yesterday
    SecurityAuto-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".

    266 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.

    266 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.

    266 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.

    266 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.

    266 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).

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

Categories

Questions about Metadata Storage Source Of Truth Desync

What does Metadata Storage Source Of Truth Desync do?

Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem). Metadata Storage Source Of Truth Desync is an agent skill from divinevideo/divine-mobile. Fix content serving failures caused by metadata (KV store, database) being out of sync with actual storage (GCS, S3, filesystem).

When should I use Metadata Storage Source Of Truth Desync?

Metadata Storage Source Of Truth Desync fits situations like: content exists in storage but API returns processing; webhook callbacks that update metadata failed silently; backfill scripts generated content but didnt update status records; HLS/transcoded content exists but transcodestatus is not Complete.

How do I install Metadata Storage Source Of Truth Desync in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill metadata-storage-source-of-truth-desync -a claude-code`. Or copy the skill folder (.agents/skills/metadata-storage-source-of-truth-desync in divinevideo/divine-mobile) into .claude/skills/metadata-storage-source-of-truth-desync in your project. Claude Code loads it when a task matches its description.

How do I install Metadata Storage Source Of Truth Desync in Codex?

Run `npx skills add divinevideo/divine-mobile --skill metadata-storage-source-of-truth-desync -a codex`. Or copy the skill folder (.agents/skills/metadata-storage-source-of-truth-desync in divinevideo/divine-mobile) into .agents/skills/metadata-storage-source-of-truth-desync in your project. Codex loads it when a task matches its description.

Can I use Metadata Storage Source Of Truth Desync 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 metadata-storage-source-of-truth-desync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/metadata-storage-source-of-truth-desync, .gemini/skills/metadata-storage-source-of-truth-desync, .github/skills/metadata-storage-source-of-truth-desync and .opencode/skills/metadata-storage-source-of-truth-desync in your project.

What does Metadata Storage Source Of Truth Desync need to run?

SKILL.md names no scripts, command-line tools or credentials: Metadata Storage Source Of Truth Desync is instructions for the agent only.

Does Metadata Storage Source Of Truth Desync 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 Metadata Storage Source Of Truth Desync 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 Metadata Storage Source Of Truth Desync use?

Metadata Storage Source Of Truth Desync 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 Metadata Storage Source Of Truth Desync use?

About 1.2k tokens (SKILL.md is roughly 4.7k 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 Metadata Storage Source Of Truth Desync?

Skills that share tags, products or a category with Metadata Storage Source Of Truth Desync: Convex HTTP Actions (waynesutton/builder-skills, 406 stars), Neon Functions (neondatabase/agent-skills, 100 stars), Wecomcli Smartsheet (WecomTeam/wecom-cli, 3.2k stars) and Frappe Errors API (Impertio-Studio/Frappe_Claude_Skill_Package, 189 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Metadata Storage Source Of Truth Desync?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 10, 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.