agentleFS
Eugenevdm01Eugenevdm01/eugenes-meta-agent/skills/social-media-content-dashboard/SKILL.md

social-media-content-dashboard

Skill4 starsChanged 6 months agoMITView on GitHub

End-to-end workflow for building a social media Content Command Centre dashboard for a multi-brand business. Use when asked to build or extend a content configuration dashboard that controls channel routing, brand voice, post type mix, influencer tracking, events/specials calendar, research sources, and live Meta Ads review with AI recommendations. Covers dark-theme dashboard scaffolding with DashboardLayout, all config table schemas, Meta Graph API live integration (multi-account, active-only, ad-set drill-down, AI strategic recommendations), Instagram MCP posting, daily Meta Ads digest scheduled task, and all known pitfalls from real implementation.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the full schema reference before writing any code: /home/ubuntu/skills/social-media-content-dashboard/references/dashboard-schema.md

    line 30
  2. Very specific:

    Use double not decimal for float columns (TiDB/MySQL compatibility)

    line 34
  3. Very specific:

    After editing drizzle/schema.ts, generate and apply migration:

    line 39
  4. Very specific:

    Use the pre-built DashboardLayout component.

    line 68
  5. Very specific:

    Read the full integration reference: /home/ubuntu/skills/social-media-content-dashboard/references/meta-ads-integration.md

    line 85
  6. Very specific:

    Ad-set drill-down: Add getAdSets procedure that fetches /${campaignId}/adsets with the same insight fields.

    line 99
  7. Very specific:

    Read the posting reference: /home/ubuntu/skills/social-media-content-dashboard/references/instagram-mcp-posting.md

    line 107
  8. Distinctive:

    Verify: check Instagram profile on phone — most recent post should appear

    line 114
  9. Very specific:

    Read the full setup guide: /home/ubuntu/skills/social-media-content-dashboard/references/daily-digest-setup.md

    line 122
  10. Very specific:

    Add metaDigest POST endpoint to the scheduled router using publicProcedure (not protectedProcedure)

    line 126
  11. Very specific:

    Use the schedule tool with cron 0 0 8 * * * (8am daily, repeat: true)

    line 128
  12. Very specific:

    Write tests in server/*.test.ts.

    line 151
  13. Distinctive:

    All db helpers return correct types (list returns array, get returns object or null)

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Social Media Content Dashboard

What This Skill Builds

A dark-themed internal dashboard (navy/orange) that serves as the "brain" for a weekly content automation system. It stores all configuration variables that feed into the weekly content creator, and provides a live Meta Ads review panel with AI-generated strategic recommendations.

Core sections:

  • Channel Routing (posts/stories per channel per week)
  • Post Type Config (content mix per brand)
  • CTA Config (call-to-action templates)
  • Brand Voice (tone, keywords, audience, UVP per brand)
  • Content Settings (global key-value settings)
  • Influencer Tracker
  • YouTube Channels (research sources)
  • Research Sources (RSS, Reddit, blogs)
  • Events Calendar (promotions with lead-time)
  • Specials & Promos (day-of-week recurring)
  • Meta Ads Review (live data, active-only, dual-account, AI recommendations)
  • Automation Log

Phase 1: Database Schema

Read the full schema reference before writing any code: /home/ubuntu/skills/social-media-content-dashboard/references/dashboard-schema.md

Key schema decisions:

  • Use double not decimal for float columns (TiDB/MySQL compatibility)
  • Store all timestamps as bigint (Unix ms)
  • Brand enum: b2c | b2b | brand
  • Platform enum: facebook | instagram | linkedin | tiktok | youtube | twitter

After editing drizzle/schema.ts, generate and apply migration:

pnpm drizzle-kit generate
# Then read the generated .sql file and apply via webdev_execute_sql

Seed all tables on server startup — check if empty first, insert defaults if so. Run seed non-blocking with .catch().


Phase 2: tRPC Router Structure

Split routers by feature once routers.ts exceeds ~150 lines. Each config table needs:

  • list / get query
  • upsert / set mutation
  • delete mutation (where applicable)

For contentSettings, use a key-value pattern:

getContentSettings: protectedProcedure.query(() => db.getContentSettings()),
setContentSetting: protectedProcedure
  .input(z.object({ key: z.string(), value: z.string() }))
  .mutation(({ input }) => db.setContentSetting(input.key, input.value))

Phase 3: Frontend — DashboardLayout

Use the pre-built DashboardLayout component. Read it before modifying:

client/src/components/DashboardLayout.tsx

Navigation groups for this dashboard:

  • OVERVIEW: Dashboard, Meta Ads Review, Automation Log
  • CONTENT CONFIG: Channel Routing, Post Type Config, CTA Config, Brand Voice, Content Settings
  • RESEARCH & INSPIRATION: Research Sources, Influencer Tracker, YouTube Channels
  • PROMOTIONS & EVENTS: Events Calendar, Specials & Promos

Design tokens: dark navy background (#0a0f1e), orange accent (oklch(0.65 0.2 45)). Set defaultTheme="dark" in ThemeProvider and ensure .dark {} CSS variables match.


Phase 4: Meta Ads Live Integration

Read the full integration reference: /home/ubuntu/skills/social-media-content-dashboard/references/meta-ads-integration.md

Quick summary of the workflow:

  1. User gets token from https://developers.facebook.com/tools/explorer/ with ads_read + ads_management
  2. Save as META_ACCESS_TOKEN via webdev_request_secrets
  3. Extend to 60-day token immediately (short-lived expires in ~1 hour)
  4. Find ad account IDs: GET /me/adaccounts?fields=id,name
  5. Fetch campaigns with inline insights using field expansion (single API call)
  6. Filter status === "ACTIVE" server-side before returning to frontend
  7. For AI recommendations: pass all campaign data to invokeLLM with structured JSON schema output

Multi-account layout: Stack account sections vertically. Each section has its own account summary stats (total spend, active campaigns, total leads, avg CPL) and campaign cards below.

Ad-set drill-down: Add getAdSets procedure that fetches /${campaignId}/adsets with the same insight fields. Render as expandable section per campaign card.

Critical pitfall: manus-mcp-cli only works in the Manus sandbox session — it cannot be called from deployed server Node.js code. Always use the Meta Graph API directly with META_ACCESS_TOKEN in server procedures.


Phase 5: Instagram MCP Posting

Read the posting reference: /home/ubuntu/skills/social-media-content-dashboard/references/instagram-mcp-posting.md

Quick workflow:

  1. Generate image with generate tool (1080×1080 for feed, 1080×1920 for story)
  2. Upload: manus-upload-file /path/to/image.png → get public HTTPS URL
  3. Post via MCP: manus-mcp-cli tool call create_instagram --server instagram --input '{"image_url":"URL","caption":"...","post_type":"feed"}'
  4. Verify: check Instagram profile on phone — most recent post should appear

Scope: Instagram MCP only posts to the connected Instagram account. Facebook, LinkedIn, VanX Funnels social planner require separate integrations.


Phase 6: Daily Meta Ads Digest (Scheduled Task)

Read the full setup guide: /home/ubuntu/skills/social-media-content-dashboard/references/daily-digest-setup.md

Key requirements:

  1. Add metaDigest POST endpoint to the scheduled router using publicProcedure (not protectedProcedure)
  2. Deploy the app before creating the scheduled task (scheduled tasks POST to the deployed URL)
  3. Use the schedule tool with cron 0 0 8 * * * (8am daily, repeat: true)
  4. Scheduled task prompt must instruct the agent to POST via curl (not Python requests) using $SCHEDULED_TASK_ENDPOINT_BASE and $SCHEDULED_TASK_COOKIE

Common Pitfalls & Fixes

IssueFix
esbuild error "Expected ';' but found ':'" in logsUsually a stale cached log. Verify with curl localhost:3000/api/trpc/auth.me — if it returns JSON, server is fine
TypeScript error in server/_core/storageProxy.tsFramework file — do not edit. Pre-existing error, does not affect functionality
decimal column type fails migrationUse double instead — TiDB does not support decimal in this template
Meta token only has public_profile after generationPermissions must be added in Explorer before clicking Generate Token, not after
manus-mcp-cli returns stub data in deployed appMCP CLI is sandbox-only. Use Graph API directly with META_ACCESS_TOKEN
Scheduled task can't reach appApp must be deployed (published). Dev server URL is not accessible to scheduled tasks
protectedProcedure on scheduled endpoint returns 401Use publicProcedure — scheduled tasks authenticate via cookie as user role, not owner
"Someone else needs to approve" on System Users tokenSystem Users with Employee access need Admin approval. Use Graph API Explorer with your own Admin account instead
read_insights not visible in Explorer permissionsNot needed separately — ads_read includes insights access

Vitest Coverage

Write tests in server/*.test.ts. Key things to test:

  • META_ACCESS_TOKEN env var is set and has ads_read permission (call /me/permissions)
  • getLiveDashboard returns only ACTIVE campaigns (status filter)
  • getStrategicRecommendations returns valid JSON with all required fields
  • All db helpers return correct types (list returns array, get returns object or null)

Run: pnpm test

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.