/vivreal-knowledge:vivreal-social-syncfrom vivreal-knowledge
Use when a task touches how an owner's Instagram, Facebook or TikTok posts get INTO Vivreal and onto their site, or what happens when a channel is disconnected or the app is removed platform-side. Covers the hourly scheduled sync in VR_CMS_API (why LinkedIn and X are excluded), the sync adapters, picture re-hosting, fetch health, expired-account back-off, the approval gate and switch, the disconnect purge, the Meta deauthorize HAZARD (one removal purges synced posts across up to ten groups), and known failure log signatures. Triggers on: social sync, scheduled sync, hourly sync, integration-sync-sweep, scheduledSocialSync, socials not updating, posts not showing on my site, social band, rehost, fetch health, frozen channel, account expired, markSocialAccountExpired, purgeAccount, disconnect channel, deauthorize, data deletion, remove Vivreal from Facebook, Business Integrations, reel cover, deprecate_post_aggregated_fields, not a storable image type, approval gate, approvalRequired.
Trending skills
7-day visitors to each skill page
Ships in vivreal-knowledge. 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.
Cross-repo flows, decisions and maps: the vivreal-hq dev docs under ${VIVREAL_REPOS}/vivreal-hq/docs/dev-docs/, starting at 03-use-cases/U35-the-hourly-social-sync.md, 03-use-cases/U36-disconnecting-a-social-channel.md; npm run docs:route -- "social sync" from vivreal-hq names the rest. This skill and the repo's CLAUDE.md own the repo's internals.
Last synced: 2026-10-04. Sources: VR_CMS_API origin/main (v2.14.3 on stable that day),
VR_Secure_API v2.20.1, VR_Main_API, VR_Client_API v2.15.0, and the evidence rows in
vivreal-hq/docs/projects/shipped-ledger.md (2026-10-04 sections). No source CLAUDE.md covers
this yet; every claim below cites the code.
ScheduledSocialSyncSchedule, an AWS::Scheduler::Schedule declared ONCE in
VR_CMS_API/cloudformation/create-update-integrations.yaml (about :464-500): rate(1 hour),
named ${StackName}-scheduled-social-sync (live: VR-CMS-API-scheduled-social-sync), target the
shared FIFO queue (<ssm-prefix>/shared/fifo-sqs-arn), input {"messageType":"integration-sync-sweep"},
constant MessageGroupId so a running sweep never overlaps the next. Deploying it needed
scheduler:*Schedule on schedule/default/VR-CMS-API-* for GitHubActions-Deploy; without it
the v2.14.1 deploy rolled back (ledger 03:12Z and 03:59Z).services/handleSqsEvent.js checks body.messageType === 'integration-sync-sweep'
BEFORE the event-type guard (the message has no type) and calls runScheduledSocialSync().services/core/scheduledSocialSync.js:56-108), re-run fresh every tick, no
per-account schedules to leak: groups with frozen != true holding an integration of type
facebook, instagram or tiktok; placement from resolvePlacement(group) (a group with none
is logged social.scheduledSync.no_placement and skipped); every account whose status is absent
or 'active'. An expired account is never dialed again until the owner reconnects, which is
the back-off. It must await mainDb.connect() first: SQS-invoked code never passes the Express
middleware that connects it (#228).syncIntegrationData({accounts:[account], type, groupID}, dbKey),
the SAME function the owner's manual "Bring your posts across" button runs, so the two are
idempotent (upsert by external id). A failed account logs social.scheduledSync.account_failed
and the sweep continues; the sweep NEVER throws and never retries through the DLQ.services/sync/{instagram,facebook,tiktok}.js) decrypt the stored token first
(#226: they used to send the ciphertext, every call failed, and the account was marked expired
while the request returned 200), fetch posts, and map them. Facebook reads
fields=id,message,created_time,full_picture,permalink_url,status_type,attachments{media_type,media,url,unshimmed_url,subattachments}
(FEED_FIELDS, exported so a test pins it). Instagram stores a reel's COVER (thumbnail_url),
never the MP4, and an empty string when there is none (#229).src/shared/rehostSyncedMedia.js PUTs the bytes at a preupload-* key and
hands them to processMediaFields, which promotes, builds derivatives, writes mediaFiles rows
and meters mediaUsage. Pictures only: a video is refused as "not a storable image type".services/social/fetchHealth.js), written on the integrations[].accounts[]
entry only (lastFetchAt, lastDurableFetchFailureAt, lastDurableFetchFailureReason,
lastTransientFetchErrorAt), never on the integration root. States: live (a recent SUCCESSFUL
fetch, whether or not it returned posts), paused (transient failures: rate limit, timeout, 5xx;
the owner sees nothing), frozen (a durable failure, or no successful fetch for 7 days). The
classifier fails safe toward transient. The portal's Socials screen reads these states;
VR_Main_API's opt-in weekly digest mails only frozen channels with its own copy of the resolver.1d48496), and
Vivreal_Templates maps posts to renderer items for the social band (see vivreal-templates-knowledge).Which platforms: Instagram, Facebook, TikTok only. LinkedIn is excluded on purpose: its
adapter still calls GET /v2/ugcPosts, which needs r_member_social, a scope Vivreal does not hold,
so it can never return posts (the portal hides its sync button too). X is not swept and is no
longer a postable platform at all.
syncIntegration
and, since v2.20.0 (#320), hands CMS the RENEWED token; it used to forward the old one.socialGrantProbe (Secure, daily cron) asks Facebook and X whether a stored grant is good and
marks dead ones expired, through the same one-field contract as CMS's
src/shared/markSocialAccountExpired.js, the only CMS writer of accounts[].status = 'expired'.
It writes only on a TERMINAL auth error and never writes 'active'; only a reconnect does.base member's post is held pending_review until an owner or admin approves it (#223,
services/social/publishApprovedSocialPost.js; processSocialPost refuses a pending post).group.integrations[].approvalRequired) is written by
VR_Secure_API's dedicated path (63bc6641; the general update route would have deactivated the
channel) and read by VR_Client_API, which hides unapproved synced posts from the site.POST /tenant/integrations/purgeAccount (invoke-only, no gateway event;
src/createAndUpdateIntegrations/api/index.js:94), which deletes that account's synced posts AND
the pictures re-hosted from them, with usage counters moved. Alarms: synced-post-purge-incomplete,
synced-post-sweep-failed, synced-post-vanished-volume (cloudformation/alarms.yaml:580-763).POST /api/user/deauthorize/facebook (Instagram has its own app and callback). The handler
(src/hbcreations/api/users/metaCallbacks.js:137-242) finds every group holding an account that
matches that Meta identity, up to MAX_GROUPS_PER_CALLBACK = 10 groups, $pulls those
accounts, and has CMS purge their synced posts and re-hosted pictures. It acts on the IDENTITY,
not on one group: the same person connected to the Vivreal group (pod_01) and the Vivreal
Content group (pod_02) loses the connection in BOTH. It records a dataDeletionRequests row
(requestType: 'deauthorize') that scripts/replay-meta-nodata-deletions.js can re-drive.
Before removing the app on Facebook for any reason (filming, cleanup, testing), untick the
notify option unless losing every Vivreal connection for that identity is the intent. On
2026-10-04 the Vivreal Business Integration was removed with notify UNticked, and the pod_01 Facebook token still died with the app removal (ledger 16:30Z)./api/user/data-deletion/:provider) does the same purge and owes Meta
a confirmation code and a public status page.Read the CMS integrations function's log streams directly (VR-CMS-API-CreateAndUpdateIntegrations-*;
list streams, then get-log-events per stream with paging). filter-log-events paginates and can
return a false zero. There is no alarm on the sweep's own failed count: a healthy run logs
social.scheduledSync.completed with targetCount, synced, failed and byType, and the only way
to see a failing account is to read that line.
| Signature | Cause | State |
|---|---|---|
Every account expired right after a sync that returned 200 | adapters sent the ENCRYPTED token (#226) | fixed in v2.12.3 |
Cannot read properties of null (reading 'find') on cold start | sweep queried mainDb.DB.groups before connecting (#228) | fixed 2026-10-04 05:29Z |
SQS message missing event type and audit actor.email errors before 05:29Z | seen with the #228 crash; absent after (ledger) | gone after #228 |
Graph (#12) deprecate_post_aggregated_fields_for_attachement, one Facebook account failed: 1 every hour | top-level link field requested on a Page whose feed has attachments (#229) | fixed 2026-10-04 14:25Z, proven on the 15:09Z run |
not a storable image type (video/mp4) for the same reel every hour | Instagram adapter stored a reel's MP4 as its picture (#229) | fixed, NOT yet proven live (no reel processed since) |
user has not authorized application 975876768563719, account marked expired | the Instagram token was revoked (app removed on the platform side) | needs an owner reconnect |
TikTok 401 access_token_invalid | token revoked or expired | needs an owner reconnect |
| LinkedIn "missing permission" | r_member_social not held | by design until LinkedIn grants it |
vivreal-cms-api-knowledge (the Lambda this runs in), vivreal-main-api-knowledge (the Meta
callbacks), vivreal-secure-api-knowledge (token renewal, grant probe, disconnect),
vivreal-client-stack-knowledge and vivreal-templates-knowledge (display),
vivreal-portal-knowledge (the Channels and Socials screens).vivreal-brand-voice.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hillbombcreations/vivreal-skills --plugin vivreal-knowledge27 skills in this plugin
/sentry-tracerUse when investigating what happened during a Vivreal user action across the stack, tracing an error end-to-end, validating a deploy, or doing tenant-scoped triage with Sentry. Teaches WHEN to trace cross-stack (frontend spans ↔ backend logs ↔ WebSocket events) and HOW (trace-ID propagation, the standard tag set, request_id fallback, service.* breadcrumbs). Triggers on: "what happened when I did X", "why did this error", trace this request, Sentry issue, deploy validation, "everything's broken for this group", crash, error timeline. For the full investigation agent with Sentry MCP tools wired in, dispatch the `sentry` agent / `/sentry-trace` (both in the `vivreal-sentry` plugin); this skill is the passively-loaded knowledge layer. Also covers the step from a Sentry error to the AWS and Atlas metric that confirms an infrastructure cause (502 with no backend event, Lambda timeout, Mongo connect-hang, throttling, OOM, stalled deploy)./vivreal-accounts-and-writesUse before filming, walking or capturing anything in the Vivreal portal or on vivreal.io, and before any write a capture or walk makes. Carries which login to use for which business (the demo account, the QA scratch owner, the owner session), the eight-step owner-approved write protocol (named approval, snapshot, write through the UI, fresh-process read-back, restore, manifest entry), the never-list (Post, Publish, Schedule, Connect and the rest), and the rules for stills that fill vivreal.io marketing slots (pair by what the slot says, no demo site has its own web address, mask comped plan figures). Shared by footage-recorder, tutorial-maker, help-page-producer, qa-walker and marketing-auditor. Triggers on: which login, demo account, QA scratch-2, test account, switch business, owner-approved write, write protocol, snapshot and restore, mutations, marketing still, screenshot swap, vivreal.io slot, walk harness, write guard, POST allow list, PRO badge./vivreal-admin-app-knowledgeUse when working on, walking, deploying or reasoning about the internal admin app (vivreal-hq packages/admin-app), the invite-only, sign-in-only staff hub that holds every staff surface since v7 (outreach CRM, sign-ups, monitoring, errors, tickets, flags, audit, usage, economics, deployed sites, team, staff push), covering where it lives, its own identity pool and session, how it calls the fleet with no active_ctx, the deploy by fast-forwarding deploy/admin-app, its two ops Lambdas, what each page reads, including the dark navy restyle and the Releases, Database, Marketing and Inbound pages. Source of truth: `vivreal-hq` `packages/admin-app/CLAUDE.md` (and the docs it links) at `origin/deploy/admin-app`./vivreal-agent-knowledgeUse when working on, writing about, or debugging Vivreal AI. The AI offering is connecting an AI agent through the Vivreal MCP server (VR-MCP-Server, plan flag mcpAccess, metered in mcpToolCalls), and nothing else: the in-app assistant is RETIRED (owner 2026-10-07, agentActions 0 on every tier; the global FAB, drawer and /agent page were deleted 2026-09-24) and only dead code survives in the portal (Studio AiRail, EditPlan) and VR_Secure_API's agent Lambda. Covers the copy rule ("AI agent", never assistant or a model name), the real gates, and the retired surface's archaeology. Triggers on: AI agent, MCP, connect an AI agent, AI assistant, AI assistant not showing, agentActions, aiActionsEnabled, aiSiteEditing, aiComponentGen, mcpAccess, mcpToolCalls, AiRail, useAgentAccess, EditPlan, proposeSiteEdits, agent/execute, agentProgress. Sources: VR-MCP-Server, Vivreal-Tier-Quotas src/tierQuotas.ts./vivreal-analytics-knowledgeUse when working on Vivreal's first-party analytics, VR_Analytics_API (the collect→store→rollup pipeline), the Templates SiteBeacon, or the per-site traffic dashboard (VR_Secure_API read route + portal AnalyticsPanel). Covers the CloudFront+WAF → Lambda Function URL ingest chain (X-Origin-Verify, bot filter, Joi, per-IP rate limit, daily-salt visitor hash), the analytics_rollup DynamoDB design, the daily rollup cron into mainDb.site_traffic_daily, the LIVE auto-deploy status (GitHub Actions → CloudFormation) plus the W4 CDN egress meter (runs unconditionally), and where increment 2 lives. Triggers on: analytics, site traffic, beacon, SiteBeacon, visitor stats, page views, unique visitors, analytics_rollup, site_traffic_daily, first-party analytics, per-site dashboard, collect.vivreal.io, visitor hash, rollup cron, CDN egress meter, VR_Analytics_API. Source of truth: `VR_Analytics_API` `CLAUDE.md` (and the docs it links) at `origin/main`./vivreal-blender-knowledgeUse when scripting or rendering in Blender for Vivreal, above all the Vivreal duck mascot in vivreal-hq/brand/mascot/model. Covers headless renders (blender -b -P script.py -- args, --factory-startup, --python-exit-code), bpy data versus ops, bmesh, depsgraph evaluated_get and new_from_object, mathutils transform gotchas, flat toon and NPR rendering in EEVEE (Emission plus the Standard view transform, exact sRGB hex, dither, filter size, transparent film, orthographic framing), outline methods compared (Freestyle, Grease Pencil Line Art, inverted hull, ID-pass edge inking), and the 4.2 to 5.2 API changes that break scripts (EEVEE engine id, blend_method, use_nodes, Grease Pencil v3). Triggers on: Blender, bpy, bmesh, headless render, background render, EEVEE, Workbench, Cycles, toon, cel, NPR, outline, inverted hull, Freestyle, Line Art, Grease Pencil, view transform, AgX, Filmic, mascot, the duck, duck.py, render.py, mascot-artist.