
Claude Skills by divinevideo
github.com/divinevideoFix .well-known files (apple-app-site-association, assetlinks.json) being served as HTML by the @fastly/compute-js-static-publish SPA fallback instead of JSON. Use when: (1) iOS Universal Links or Android App Links are broken because the verification files return text/html instead of application/json, (2) PublisherServer with spaFile config intercepts /.well-known/ paths and returns index.html (200, text/html) instead of 404 for missing files, (3) apple-app-site-association (no file extension...
Fix "Fastly error: unknown domain" 500 errors when custom domains return "Domain Not Found" despite being created with domain-v1 CLI. Use when: (1) fastly domain-v1 create succeeds but domain returns 500, (2) Domain shows activated:false in API response, (3) Classic domain API returns "deprecated" error, (4) Custom domain works on edgecompute.app but not on your domain. Covers Fastly Compute domain setup post-September 2025.
Fix intermittent 500 errors with "Failed to store" in Fastly KV Store during concurrent writes. Use when: (1) Batch operations fail with ~10-20% error rate, (2) Error contains "Failed to store list" or similar KV write failures, (3) Multiple requests updating the same KV key simultaneously, (4) Read-modify-write pattern without locking. The fix is adding a retry loop that re-reads before each write attempt.
Debug Fastly Compute services where code changes don't affect behavior due to multi-service routing architecture. Use when: (1) deployed changes have no effect, (2) unexpected redirects persist after code updates, (3) DNS resolves to Fastly but responses don't match deployed code, (4) `fastly service list` shows multiple related services. The root cause is often a routing/gateway service intercepting requests before they reach your content service.
Fix wildcard subdomain routing for Fastly Compute@Edge services when subdomains resolve but return 500 "Domain Not Found" or empty responses. Use when: (1) TLS subscription "issued" but edge serves default certificate (CN=j.sni-644-default), (2) Fastly domain-v1 create succeeds but subdomain returns 500, (3) Static publisher/PublisherServer returns empty content for subdomain requests, (4) DNS wildcard CNAME resolves to wrong target. Covers TLS configuration SNI endpoint selection (x.sni vs j...
Fix Flutter macOS app crash at launch due to FFmpeg Kit library loading failure. Use when: (1) macOS app builds successfully but crashes immediately on launch, (2) Crash log shows "Library not loaded: libfontconfig.1.dylib" or similar homebrew library, (3) Error mentions "code signature not valid for use in process" with "different Team IDs", (4) Using ffmpeg_kit_flutter_new (Full GPL variant). The Full GPL variant has external dependencies on homebrew libraries that fail macOS code signing. ...
Analyze Figma designs and translate them into Flutter code using existing divine_ui components and VineTheme. Use when implementing UI from Figma mockups or when checking if a component already exists before building new. Invoke with /figma-designer.
Fix flaky Flutter/Dart tests that fail in CI but pass locally due to unhandled Future rejections. Use when: (1) Test passes locally but fails in CI with cryptic errors, (2) Test creates Futures that will throw errors (e.g., network calls to fake URLs), (3) Even with .catchError() at the end, test still fails, (4) Error message shows test name but truncated error like "ROR]" or "[ERROR]". Solution: Avoid creating Futures that will reject; test state machine behavior with synchronous operations...
Fix "setState() or markNeedsBuild() called during build" error triggered from deactivate(). Use when: (1) Error occurs during widget disposal or navigation away, (2) Stack trace shows deactivate -> some notifier -> ValueListenableBuilder._valueChanged, (3) Video/audio player pause() or stop() calls in deactivate() cause the error. The fix is deferring state-modifying operations to addPostFrameCallback.
Fix Flutter test failure "A Timer is still pending even after the widget tree was disposed". Use when: (1) Widget tests fail with timer pending error, (2) dispose() contains Future(), Future.delayed(), or Timer calls, (3) Riverpod provider modifications in dispose(). The fix is to use deactivate() instead of dispose() for cleanup that might trigger async work.
Fix Flutter TabController crash when dynamically showing/hiding tabs. Use when: (1) TabController rebuild causes "SingleTickerProviderStateMixin but multiple tickers were created", (2) Tabs need to appear/disappear based on feature flags or async state, (3) TabController.length changes at runtime based on provider state. The fix is to use TickerProviderStateMixin instead of SingleTickerProviderStateMixin.
Fix Flutter macOS build failure caused by duplicate camera plugins. Use when: (1) macOS build fails with "Ambiguous use of 'CameraMacosPlugin.register(with:)'" error, (2) Both camera_macos and camera_macos_plus are in pubspec.yaml, (3) Build worked before adding a new camera package. The plugins define the same class name causing Swift registration conflicts.
Fix silent camera/microphone failure on Flutter macOS when using permission_handler plugin. Use when: (1) Camera screen shows placeholder but no error on macOS, (2) CameraPermissionError state is emitted but cause is unclear, (3) permission_handler checkCameraStatus() or checkMicrophoneStatus() throws exceptions on macOS desktop, (4) Camera works on iOS/Android but fails silently on macOS. The permission_handler plugin doesn't work reliably on macOS - bypass it and let macOS handle permission...
Fix black camera/microphone preview in Flutter macOS apps launched via `flutter run` from a terminal emulator (cmux, iTerm, Terminal.app, VS Code integrated terminal, Cursor, etc.). Use when: (1) camera plugin reports initialized but preview is black with no frames, (2) logs show "initialization completed via timeout" or similar first-frame timeout fallback, (3) AVCaptureSession.startRunning() returns without error but zero frames arrive, (4) the app's Info.plist has NSCameraUsageDescription ...
Fix Flutter PageView "snap back" or scroll position reset issues on provider/state rebuilds. Use when: (1) PageView scrolls then snaps back to previous page after state update, (2) Scroll position resets when Riverpod/Provider rebuilds, (3) Feed scrolls back to top on data refresh, (4) PageView loses position after orientation change or widget rebuild.
Fix infinite rebuild loop in Flutter when using PageView with URL-based routing (GoRouter) and reactive state management (Riverpod/BLoC). Use when: (1) RAPID REBUILD warnings appear in console (#20+), (2) "setState() or markNeedsBuild() called during build" errors from ValueListenableBuilder, (3) Video feed or list-based PageView is frozen and won't swipe, (4) Overlay or UI elements flicker between visible/invisible rapidly, (5) Logs show item "moved from index X to Y" repeatedly. Caused by t...
Fix slow Flutter app startup caused by blocking network operations during initialization. Use when: (1) App takes several seconds to show first frame, (2) Startup logs show sequential network operations (WebSocket connections, API calls), (3) Services initialize during startup that aren't needed until user authenticates. Covers: converting sequential network ops to parallel with Future.wait(), deferring service initialization until actually needed (lazy init), and identifying blocking operati...
Fix invisible or poorly visible SVG icons in Flutter when using flutter_svg package. Use when: (1) SVG icons appear invisible despite correct colors in the SVG file, (2) Using Opacity widget to change icon visibility/state but icons don't render properly, (3) Tab bar or navigation icons disappear or have wrong colors, (4) Icons with fill="white" don't show on dark backgrounds. The fix is to use ColorFilter.mode() instead of Opacity widget for SVG icon state styling.
Deploy funnelcake (api + relay) to ANY environment (production, staging, poc) on GKE via ArgoCD. Use when: (1) Deploying new funnelcake commits, (2) Building Docker images for GKE (amd64), (3) Running ClickHouse migrations, (4) Troubleshooting ImagePullBackOff errors, (5) Syncing staging/poc after production deployment. Covers complete workflow with PRE-FLIGHT CHECKLIST to prevent common deployment failures.
Fix false-positive Cloud Run deploys where `gcloud builds submit --tag` silently fails but the follow-up `gcloud run services update --image :latest` succeeds against a stale image, producing a confident "Deploying... Done" message with pre-fix code still live. Use when: (1) gcloud builds submit prints "ERROR: (gcloud.builds.submit) Invalid value for [source]: Dockerfile required when specifying --tag" but the shell scrolls past it, (2) code changes verified locally aren't visible in producti...
Fix "DownloadObjectRequest not found" error in google-cloud-storage Rust crate. Use when: (1) Trying to download objects from GCS using the Rust SDK, (2) Looking for a download request type in http::objects::download module, (3) Compile error about missing type. The download_object method uses GetObjectRequest from the get module, not a separate DownloadObjectRequest type.
Fix S3 "InvalidArgument" errors when using Google Cloud Storage S3-compatible API with ObjectCannedAcl::PublicRead or x-amz-acl headers. Use when: (1) put_object or upload_blob fails with InvalidArgument on GCS, (2) Using aws-sdk-s3 Rust crate with GCS endpoint (storage.googleapis.com), (3) Bucket has uniform bucket-level access enabled (GCS default since 2023), (4) S3 operations work on MinIO/AWS but fail on GCS. GCS rejects per-object ACLs when uniform bucket-level access is enabled.
Separate a messy working tree with multiple tangled features into clean, focused PRs. Use when: (1) Working tree has uncommitted changes from multiple features mixed together, (2) Need to create a PR for just one feature from a mixed working tree, (3) "git stash pop" fails with "already exists, no checkout" for untracked files, (4) Pre-commit hooks block commits due to unrelated untracked files with errors, (5) Interface changes in one feature break consumer files from another feature in the ...
Fix git pre-commit hook failures in Flutter projects when using git worktrees. Use when: (1) Pre-commit hook with `flutter analyze` fails during `git commit` but passes when run manually, (2) Hook output shows "Resolving dependencies..." then immediately fails with no actual analysis errors, (3) Working in a git worktree (created via `git worktree add`). Root cause: git sets GIT_DIR to a worktree-style path during hook execution, which breaks `flutter pub get` (called internally by `flutter a...
Create well-structured GitHub issues following the Epic > Feature > Task/Bug hierarchy. Uses GitHub issue types (not labels) and relationships to connect related issues. Invoke with /github-issue.
Fix Gorse 0.5.x recommendation engine silently disabled or degraded due to config incompatibility with 0.4. Use when: (1) Gorse 0.5 recommendations are poor/empty despite having data, (2) collaborative filtering appears disabled even though [recommend.collaborative] section exists, (3) migrating Gorse config from 0.4 to 0.5, (4) old config keys like [recommend.popular], [recommend.neighbors], [recommend.online], [recommend.offline] are being used with Gorse 0.5. Critical: type="mf" must be ex...
Fix Gorse recommendation engine failing to connect to ClickHouse Cloud with EOF errors. Use when: (1) Gorse pods crash with "failed to connect data database" and "EOF" error, (2) Using ClickHouse Cloud (*.clickhouse.cloud) as Gorse data store, (3) TLS connection works (verified with openssl) but Gorse still fails, (4) Tried secure=true, different ports (8443, 9440), timeout params without success. The Gorse ClickHouse driver is incompatible with ClickHouse Cloud's native protocol.
Fix Gorse recommendation engine pods crashing with "user: unknown userid 65532" error. Use when: (1) Gorse master/server/worker pods show CrashLoopBackOff or Error status, (2) Logs show "failed to get user directory" with unknown userid, (3) Running gorse containers with runAsNonRoot security context and custom UID. The gorse images call os.UserHomeDir() at startup which requires the UID to exist in /etc/passwd.
Fix Gorse worker pods stuck in not-ready state due to failing health probes. Use when: (1) gorse-worker pods show 0/1 Ready but Running status, (2) Readiness probe using pgrep fails silently, (3) Worker logs show normal operation but pod never becomes ready, (4) Using zhenghaoz/gorse-worker image. The gorse-worker container is a minimal image without pgrep or ps commands, so exec-based probes using these fail.
Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response. Use when: (1) Error 1101 on a specific hostname but not others sharing the same worker, (2) "the Promise did not resolve to 'Response'" in wrangler dev logs, (3) Hono sub-app route handler uses bare `return` to skip handling for non-matching hostnames or conditions. The fix is to add `next` parameter and call `return next()` instead of bare `return` in ro...
Fix "Failed to load video" errors when network requests succeed (200/206 status). Use when: (1) Video element shows error but DevTools shows successful requests, (2) Videos download correctly via curl but fail in browser, (3) Range requests work but video won't play, (4) Building CDN/media server for video streaming. The root cause is often missing Accept-Ranges header which browsers need for video seeking and streaming.
Fix JavaScript regex failures when matching CJK (Chinese/Japanese/Korean) text using \b word boundaries. Use when: (1) Regex pattern with \b silently fails to match Japanese, Chinese, or Korean text, (2) Pattern works for Latin/ASCII text but not CJK, (3) hasDriverLicenceCue or similar text-detection function returns false for CJK input despite correct characters, (4) inferIssuerFromTitleText or pattern-matching functions fail on non-Latin scripts. Root cause: JavaScript \b only recognizes [a...
Use database cache when external APIs aren't reliably idempotent. Use when: (1) External API claims idempotency but returns different values for same input, (2) Re-running a script creates duplicate resources, (3) Need stable identifiers across runs but external service generates new ones. Pattern: check database cache first, only call external API for genuinely new items, cache the result.
Fix macOS app hard crashes (EXC_CRASH / SIGKILL) caused by accessing TCC-protected APIs without the matching Info.plist usage description key. Use when: (1) App crashes immediately when touching Photos, Contacts, Calendar, Reminders, Location, Microphone, Camera, Screen Recording, etc., (2) Crash report shows `Exception: EXC_CRASH (SIGKILL)` with `Termination namespace: TCC`, (3) Crash stack includes `TCC.__TCC_CRASHING_DUE_TO_PRIVACY_VIOLATION__`, (4) Termination details contain "This app ha...
Fix Flutter macOS app crash at launch due to media_kit library loading failure. Use when: (1) macOS app builds successfully but crashes immediately on launch, (2) Crash log shows "Library not loaded: @rpath/Ass.framework" or similar media_kit framework, (3) Error says "code signature not valid for use in process: Trying to load an unsigned library", (4) Problem appears after flutter clean or fresh clone, (5) Codesign script exists in Podfile but frameworks are still unsigned after build - che...
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 exis...
Debug 404 errors for API endpoints in microservice architectures where code exists but routing sends requests to wrong service. Use when: (1) API endpoint returns 404 despite code being deployed, (2) Multiple services share same hostname via HTTPRoute/Ingress, (3) Service logs show "Health server" but you expected API endpoints, (4) Monorepo deploys multiple images and endpoint might be in different service than expected. Covers: verifying which service handles which paths, HTTPRoute path pre...
Fix test failures when adding retry/fallback logic causes mock call count mismatches. Use when: (1) Test fails with "Expected: <1>, Actual: <2>" or similar call count errors after adding retry or fallback mechanisms, (2) MissingStubError appears for methods in new fallback code paths, (3) Mockito verify().called(N) assertions fail after behavior changes. Applies to Dart/Flutter with Mockito, but pattern is universal.
Fix misleading Flutter/Dart test failures where expected data is empty ([]) or default values instead of the mocked response, caused by stale Mockito generated mocks or missing stubs being silently swallowed by try/catch in provider/repository code. Use when: (1) Test expects non-empty data but gets [], (2) Mock stubs for a method are set up but the code under test returns fallback/empty results, (3) A PR added new methods to a service class and tests that previously passed now fail with misl...
Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics). Use when: (1) All sub-group predictions converge to the same date despite different remaining counts, (2) Proportional throughput scaling produces flat/identical results, (3) Applying overall scope rate to individual sub-groups causes simulations to hit max_weeks cap and never converge, (4) Building project forecasting tools that predict completion for sub-groups of a l...
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...
Optimize Nostr relay queries using NDK batch fetching. Use when: (1) Checking existence of many events one-by-one is slow, (2) Loop with individual fetchEvents calls causing N+1 query problem, (3) Need to verify multiple addressable events (Kind 30000+) exist. NDK's fetchEvents accepts arrays for tag filters (#d, #p, #e, authors), enabling batch queries that reduce hundreds of round-trips to a single request.
Fix NDK (Nostr Dev Kit) operations hanging indefinitely when relay connections stall. Use when: (1) App freezes during fetchEvents or publish calls, (2) No timeout errors despite network issues, (3) Relay connection appears stuck, (4) Using NDK with unstable or slow relays. NDK operations have no built-in timeout - wrap with Promise.race.
Fix NIP-46 nostrconnect:// URLs not being recognized by signer apps (Amber, nsec.app, nsecBunker). Use when: (1) QR code or URL paste fails in signer app despite valid-looking URL, (2) Using metadata JSON object instead of separate query params, (3) Implementing client-initiated NIP-46 connections. The NIP-46 spec requires name/url/image as separate query parameters, not a metadata JSON object.
Fix NIP-98 HTTP authentication 401 errors caused by URL mismatch between the `u` tag and what the server expects. Use when: (1) NIP-98 auth returns 401 with "URL mismatch" error, (2) Token creation succeeds but server rejects authentication, (3) Server logs show expected vs actual URL difference. CRITICAL: Server implementations vary - some strip query params, some don't. Check the actual error message to determine which behavior applies.
Fix duplicate Nostr events (Kind 30000+ parameterized replaceable events) caused by missing d-tag. Use when: (1) Same content appears multiple times on relay for same pubkey, (2) Events aren't being replaced/updated as expected, (3) Publishing NIP-71 video events (Kind 34236) or other addressable events and seeing duplicates. The d-tag is REQUIRED for addressability - without it, each publish creates a new non-replaceable event.
Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999). Use when: (1) REST API shows engagement count > 0 but WebSocket query returns empty, (2) Comments/reactions exist but app shows "No comments yet" or similar, (3) Working with NIP-22 comments, NIP-25 reactions, or NIP-18 reposts on Kind 34235/34236 video events or other addressable events. Root cause: clients may reference addressable ...
Fix silent data loss when mutating Nostr replaceable events (Kind 0 profile, Kind 3 contact/follow list, Kind 10002 relay list, etc.) in client apps. Use when: (1) Following someone wipes the user's entire follow list, (2) Updating profile metadata loses existing fields, (3) Fresh browser session or mobile login causes data loss on first action, (4) Replaceable event mutation uses stale or null cached state. Root cause: Nostr replaceable events are full-replace (no partial update), so publish...
Fix features broken by REST API responses that flatten Nostr events, losing tag data. Use when: (1) A feature works for WebSocket-loaded events but not REST API-loaded ones, (2) A model field (like sha256, textTrackRef) is null for REST API data but set for WebSocket data, (3) REST API returns denormalized fields (d_tag, video_url) but omits raw tags array, (4) hasSubtitles/hasFeature returns false for REST-loaded videos. Common in Nostr clients that use both REST APIs (for analytics/bulk que...
Fix OAuth PKCE "Session not found" or "No code verifier" errors in SPAs after redirect from external auth server. Use when: (1) OAuth callback fails with session/verifier not found despite flow starting correctly, (2) PKCE code_verifier stored in sessionStorage is missing after redirect back from auth server, (3) Error only happens in production or cross-origin redirects, not in local dev. Root cause: sessionStorage is lost when the browser opens a new tab, changes browsing context, or certai...