Whodb
xiaoyuge886/aigc
Database operations including querying, schema exploration, and data analysis.
Fix "content disappears after publishing" bugs caused by REST API indexing lag.
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-condition --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .claude/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.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/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .claude/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-conditionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-condition --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .agents/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .agents/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-condition --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .cursor/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .cursor/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/divinevideo/divine-mobile.git --path .agents/skills/rest-api-optimistic-update-race-condition--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-condition --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .gemini/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .gemini/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-conditionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .github/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .github/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install divinevideo/divine-mobile rest-api-optimistic-update-race-condition --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/rest-api-optimistic-update-race-condition .opencode/skills/rest-api-optimistic-update-race-condition && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rest-api-optimistic-update-race-condition" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/rest-api-optimistic-update-race-condition into .opencode/skills/rest-api-optimistic-update-race-condition/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rest-api-optimistic-update-race-condition", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rest-api-optimistic-update-race-conditionFix "content disappears after publishing" bugs caused by REST API indexing lag.
REST API Optimistic Update Race Condition is an agent skill from divinevideo/divine-mobile. Fix "content disappears after publishing" bugs caused by REST API indexing lag. Use when: (1) User publishes content but it doesn't appear in their feed/profile, (2) REST API returns stale data immediately after write operations, (3) Async indexing backends (ClickHouse, Elasticsearch, etc.) haven't processed new events, (4) Content shows briefly then vanishes on refresh. Applies to any system with separate write path (WebSocket/direct DB) and read path (REST API with async indexing).
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 Backend & APIs, covering REST APIs, Async programming and Search implementation. It works with ClickHouse and Elasticsearch. The licence is MPL-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6487b05. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
apollographql.commartinfowler.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
REST API Optimistic Update Race Condition loads about 1.3k tokens when it runs. Until then it costs about 133 tokens; SKILL.md has 330 words of instructions outside code blocks.
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.
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.
The full file from divinevideo/divine-mobile at commit 6487b05, republished under its MPL-2.0 licence (© divinevideo). 330 words, ~1,299 tokens.
.claude/skills/rest-api-optimistic-update-race-condition/SKILL.md (or your agent's skills folder).When an application uses a dual architecture with:
Content can "disappear" after publishing because the read path hasn't indexed the new content yet, but the UI re-fetches from the REST API expecting fresh data.
Log pattern example:
✅ Event successfully published to relays
📊 Fetching from REST API: found 59 videos // Expected 60!Instead of re-fetching from REST API after publishing, optimistically add the new content directly to the local state:
// BEFORE (broken): Re-fetch from potentially stale API
void onNewContentPublished(Content newContent) {
refreshFromRestApi(); // API hasn't indexed yet = stale data
}
// AFTER (fixed): Optimistic local update
void onNewContentPublished(Content newContent) {
final currentItems = state.items;
// Skip if duplicate
if (currentItems.any((item) => item.id == newContent.id)) return;
// Add to front of list (most recent first)
final updatedItems = [newContent, ...currentItems];
state = state.copyWith(
items: updatedItems,
lastUpdated: DateTime.now(),
);
}For long-lived sessions, periodically reconcile local state with REST API:
void onNewContentPublished(Content newContent) {
// Immediate: optimistic update
_addToLocalState(newContent);
// Delayed: reconcile with API after indexing lag
Future.delayed(Duration(seconds: 30), () {
_reconcileWithRestApi();
});
}If your REST API supports it, use write-through caching:
// POST to API returns the created item, cache it immediately
final response = await api.createContent(content);
_cache.put(response.id, response);After implementing the fix:
Real-world case: OpenVine video upload
// ProfileFeedProvider - fixed version
final unregisterNew = videoEventService.addNewVideoListener((
newVideo,
authorPubkey,
) {
if (authorPubkey == userId && ref.mounted) {
// CRITICAL FIX: Optimistically add the new video to state immediately
// instead of re-fetching from REST API which may have stale data.
_addNewVideoToState(newVideo);
}
});
void _addNewVideoToState(VideoEvent newVideo) {
final currentState = state.asData?.value;
if (currentState == null) return;
// Check for duplicates
if (currentState.videos.any((v) => v.id == newVideo.id)) return;
// Add new video to the front of the list
final updatedVideos = <VideoEvent>[newVideo, ...currentState.videos];
state = AsyncData(VideoFeedState(
videos: updatedVideos,
hasMoreContent: currentState.hasMoreContent,
isLoadingMore: false,
lastUpdated: DateTime.now(),
));
}© 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
Just SKILL.md in .agents/skills/rest-api-optimistic-update-race-condition of divinevideo/divine-mobile.
Open the folder on GitHubat commit 6487b05
REST API Optimistic Update Race Condition 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| REST API Optimistic Update Race Condition this skilldivinevideo/divine-mobile | 266 | — | ~1.3k | Automated safety check: Pass | MPL-2.0 | |
| Whodbxiaoyuge886/aigc | 198 | — | ~894 | Automated safety check: Pass | MIT | |
| Backend Dev Guidelineslangfuse/langfuse | 36k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Backend Dev Guidelineslitefuse/litefuse | 100 | 1 repos | ~5.8k | Automated safety check: Pass | Custom licence | |
| iOS Networkingdpearson2699/swift-ios-skills | 1.2k | — | ~4.2k | Automated safety check: Pass | Custom licence | |
| Profiling Slow API EndpointsPostHog/posthog | 40k | — | ~1k | Automated safety check: Pass | Custom licence |
xiaoyuge886/aigc
Database operations including querying, schema exploration, and data analysis.
langfuse/langfuse
Build or review Langfuse backend code. An agent skill from langfuse/langfuse.
litefuse/litefuse
Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.
dpearson2699/swift-ios-skills
Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patterns.
PostHog/posthog
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
tempoxyz/tidx
Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.
divinevideo/divine-mobile
Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".
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.
divinevideo/divine-mobile
Fix "Null check operator used on a null value" errors when an object is set to null during an async await.
divinevideo/divine-mobile
Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.
divinevideo/divine-mobile
Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.
divinevideo/divine-mobile
Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).
Works with
Categories
Fix "content disappears after publishing" bugs caused by REST API indexing lag. REST API Optimistic Update Race Condition is an agent skill from divinevideo/divine-mobile. Fix "content disappears after publishing" bugs caused by REST API indexing lag.
REST API Optimistic Update Race Condition fits situations like: user publishes content but it doesnt appear in their feed/profile; REST API returns stale data immediately after write operations; async indexing backends (ClickHouse; etc.) havent processed new events.
Run `npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a claude-code`. Or copy the skill folder (.agents/skills/rest-api-optimistic-update-race-condition in divinevideo/divine-mobile) into .claude/skills/rest-api-optimistic-update-race-condition in your project. Claude Code loads it when a task matches its description.
Run `npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a codex`. Or copy the skill folder (.agents/skills/rest-api-optimistic-update-race-condition in divinevideo/divine-mobile) into .agents/skills/rest-api-optimistic-update-race-condition in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add divinevideo/divine-mobile --skill rest-api-optimistic-update-race-condition -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rest-api-optimistic-update-race-condition, .gemini/skills/rest-api-optimistic-update-race-condition, .github/skills/rest-api-optimistic-update-race-condition and .opencode/skills/rest-api-optimistic-update-race-condition in your project.
SKILL.md names no scripts, command-line tools or credentials: REST API Optimistic Update Race Condition is instructions for the agent only.
SKILL.md names 2 domains. As links in the text: apollographql.com and martinfowler.com. This is read from the text; nothing was executed.
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.
REST API Optimistic Update Race Condition 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.
About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with REST API Optimistic Update Race Condition: Whodb (xiaoyuge886/aigc, 198 stars), Backend Dev Guidelines (langfuse/langfuse, 36k stars), Backend Dev Guidelines (litefuse/litefuse, 100 stars) and iOS Networking (dpearson2699/swift-ios-skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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 9, 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.