agentleFS
aryaminusaryaminus/socials-assistant/AGENTS.md

socials-assistant

AGENTS.md0 starsChanged 3 months agoMITView on GitHub

One vault, every agent: Claude, ChatGPT, Gemini, Codex, Cursor, DeepSeek, Qwen, Pi, opencode, Claude Desktop, Claude Code, and any MCP-compatible agent. Local-first, official APIs only. Paste this into any agent — it handles everything: docs/SETUP-PROMPT.md Zero-install cloud journey (deploy button → /setup checklist → agent connector): docs/GET-STARTED-CLOUD.md From source: Tests, audit, lint, CodeQL also run in CI (.github/workflows/ci.yml, codeql.yml). (--follow-tags silently skips lightweight tags — always push the tag explicitly) 5. .github/workflows/release-smoke.yml: builds + tests + uploads artifact (skipped on…

  • Reads credentials
  • Installs packages
  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository8 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Add a CHANGELOG.md entry for the new version — the release fails without one

    line 50
  2. Very specific:

    Commit: git commit -m "chore(release): bump version to X.Y.Z" — the exact prefix triggers the Release Smoke workflow

    line 51
  3. Very specific:

    Delete NPM_TOKEN from GitHub secrets — the workflow uses id-token: write for OIDC automatically

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md

Socials Assistant — Agent Integration Guide

One vault, every agent: Claude, ChatGPT, Gemini, Codex, Cursor, DeepSeek, Qwen, Pi, opencode, Claude Desktop, Claude Code, and any MCP-compatible agent. Local-first, official APIs only.

One-prompt setup

Paste this into any agent — it handles everything: docs/SETUP-PROMPT.md

Install

HostMethod
Claude Code (this repo).mcp.json auto-loads → approve when prompted
Claude Code (any project)claude mcp add socials -- node /abs/path/apps/mcp/bin/socials-mcp.js
Claude Code plugin/plugin marketplace add aryaminus/socials-assistant → /plugin install socials-assistant
Codex / Cursor / Copilot / 50+ hostsnpx skills add aryaminus/socials-assistant -g
claude.ai (web)Download .skill bundle from releases → Settings → Capabilities → Skills → +
Claude Desktopclaude_desktop_config.json snippet in agents/README.md
Gemini CLIgemini-extension.json committed; or MCP block in ~/.gemini/settings.json
ChatGPTDeploy the Worker → add as plugin/custom connector (Business/Enterprise) or via Responses API tools: [{type: "mcp"}]
Cloud (multi-tenant)cd infra/worker && npx wrangler deploy (guide: docs/hosting-cloudflare.md)
npm (any agent with Node.js)npx @aryaminus/socials-mcp onboard — walks through credential setup

Zero-install cloud journey (deploy button → /setup checklist → agent connector): docs/GET-STARTED-CLOUD.md

From source:

git clone https://github.com/aryaminus/socials-assistant && cd socials-assistant
./setup.sh          # pnpm install + build + doctor + next steps

Dev commands

pnpm install && pnpm build                 # build all packages
pnpm test                                  # unit tests
pnpm exec tsx scripts/audit-mcp.ts         # MCP contract audit (names, schemas, order, errors)
pnpm exec tsx scripts/lint-skills.ts       # SKILL.md spec compliance
node apps/mcp/bin/socials-mcp.js doctor    # environment + vault health check
node apps/mcp/bin/socials-mcp.js snapshot  # headless snapshot (cron-safe)
npx tsx scripts/weekly-digest.ts           # digest → digests/YYYY-WW.md (+ optional email)

Tests, audit, lint, CodeQL also run in CI (.github/workflows/ci.yml, codeql.yml).

Release process (astro-style, tag-driven)

  1. Bump version together — all 5 files must match: root package.json · apps/mcp/package.json · apps/mcp/src/server.ts VERSION const · server.json · .claude-plugin/plugin.json
  2. Add a CHANGELOG.md entry for the new version — the release fails without one
  3. Commit: git commit -m "chore(release): bump version to X.Y.Z" — the exact prefix triggers the Release Smoke workflow
  4. Tag AFTER that commit and push both explicitly:
    git tag vX.Y.Z && git push origin main && git push origin vX.Y.Z
    (--follow-tags silently skips lightweight tags — always push the tag explicitly)
  5. .github/workflows/release-smoke.yml: builds + tests + uploads artifact (skipped on non-version-bump commits)
  6. .github/workflows/release.yml: waits for smoke, downloads artifact, cosign signs, creates GitHub Release, npm publish with provenance, GitHub Packages publish, verifies channels
  7. .github/workflows/docker.yml: publishes ghcr.io/aryaminus/socials-assistant:<tag> (+ latest)

CI (ci.yml) skips chore(release): commits to avoid duplicate runs.

Stable asset URLs after any release: releases/latest/download/aryaminus-socials-mcp-X.Y.Z.tgz pattern + per-skill .skill for upload.

Note: apps/mcp/dist-bundle/ is gitignored (built by prepack/publish); never commit vaults (*.db*), .socials-data/, or controlkeel/ governance DBs.

Environment variables

VarDefaultEffect
SOCIALS_DATA_DIR~/.socials-assistantVault + config location
SOCIALS_GOOGLE_CLIENT_ID/SECRETconfig fileYouTube app credentials
SOCIALS_META_APP_ID/SECRETconfig fileInstagram+Facebook app credentials
SOCIALS_TIKTOK_CLIENT_KEY/SECRETconfig fileTikTok app credentials
SOCIALS_MCP_PORT3344HTTP mode port
SOCIALS_MCP_TOKENunsetBearer token for HTTP mode (set for non-local use)
SOCIALS_ALLOWED_ORIGINSunsetComma-separated allowed origins for HTTP mode
SOCIALS_OAUTH_PORT8399Local OAuth callback port
SOCIALS_CSV_DIR~/DownloadsTikTok CSV auto-discovery search path
SOCIALS_ALLOW_SENDunsetOutreach safety: must be set before ANY send automation
DIGEST_TO/FROM, RESEND_API_KEYunsetWeekly digest self-email

Platform credentials persist (encrypted) in $SOCIALS_DATA_DIR/config.json + vault DB; env vars win over the file. Secrets are never written to logs or results.

MCP server

  • Local stdio: node apps/mcp/bin/socials-mcp.js
  • Local/LAN HTTP: node apps/mcp/bin/socials-mcp.js --http → POST /mcp (+ /health, /version)
  • Remote: deploy infra/worker (Cloudflare, OAuth 2.1 + DCR) — per-user encrypted token store in D1

Tool inventory (20): connection_status · connect_youtube · connect_meta · connect_tiktok · snapshot · import_tiktok_csv · vault_query · compare_periods · top_content · audience_overview · digest_data · media_kit_data · profile_get · profile_set · pipeline_add · pipeline_list · pipeline_update · outreach_log_add · outreach_log_list · outreach_log_update

Errors return as tool results (isError: true) with a fix: hint — agents should read and self-correct rather than retry blindly. Results are capped (500 rows) to respect agent context limits.

Safety rules (enforced, not just documented)

  • Official platform APIs only; no scraping, no automation of logged-in TikTok Studio sessions.
  • Platform OAuth tokens encrypted at rest (AES-256-GCM), never returned by any tool.
  • Outreach is draft-first: no tool sends email; SOCIALS_ALLOW_SEND gates any send automation the user wires separately (Resend MCP).
  • vault_query is read-only SELECT, blocked from writes/DDL.

Setup reference

GitHub Actions secrets (for CI/CD)

Set in GitHub → Settings → Secrets and variables → Actions:

SecretRequired forHow to get
NPM_TOKENnpm publish (release.yml)npmjs.com → Access Tokens → Generate New Token (Classic) → Automation scope
GITHUB_TOKENGHCR push, releasesAuto-provided by GitHub Actions — no setup needed

After first npm publish, switch to Trusted Publishing (OIDC) — no token needed:

  1. Go to npmjs.com → @aryaminus/socials-mcp → Settings → Publishing access → Add trusted publisher
  2. Provider: GitHub Actions
  3. Owner: aryaminus, Repository: socials-assistant, Workflow: release.yml
  4. Delete NPM_TOKEN from GitHub secrets — the workflow uses id-token: write for OIDC automatically

Cloudflare Worker secrets (for cloud deployment)

Set in Cloudflare dashboard → Workers → your worker → Settings → Variables:

VariableTypeSource
GOOGLE_LOGIN_CLIENT_IDPlain textGoogle Cloud Console → OAuth client (for MCP sign-in)
GOOGLE_LOGIN_CLIENT_SECRETEncryptedSame OAuth client
TOKEN_ENCRYPTION_KEYEncryptedopenssl rand -hex 32
SOCIALS_GOOGLE_CLIENT_IDEncryptedSame as GOOGLE_LOGIN or separate YouTube data app
SOCIALS_GOOGLE_CLIENT_SECRETEncryptedSame as GOOGLE_LOGIN or separate YouTube data app
SOCIALS_META_APP_IDEncryptedMeta developer app (docs/onboarding-meta.md)
SOCIALS_META_APP_SECRETEncryptedSame Meta app
SOCIALS_TIKTOK_CLIENT_KEYEncryptedTikTok developer app (docs/onboarding-tiktok.md)
SOCIALS_TIKTOK_CLIENT_SECRETEncryptedSame TikTok app

Plus D1 database + KV namespace (provisioned by deploy button or manually).

Local development

Platform credentials: set env vars OR run socials-mcp onboard / socials-mcp config set <key> <value> (persists to ~/.socials-assistant/config.json). Env vars win over the file.

# required (for any platform you use)
export SOCIALS_GOOGLE_CLIENT_ID="..."
export SOCIALS_GOOGLE_CLIENT_SECRET="..."
export SOCIALS_META_APP_ID="..."
export SOCIALS_META_APP_SECRET="..."
export SOCIALS_TIKTOK_CLIENT_KEY="..."
export SOCIALS_TIKTOK_CLIENT_SECRET="..."

# optional
export SOCIALS_DATA_DIR="~/.socials-assistant"  # default
export SOCIALS_MCP_TOKEN="..."                   # protect HTTP mode
export SOCIALS_MCP_PORT=3344                     # default
export SOCIALS_OAUTH_PORT=8399                   # default
export SOCIALS_CSV_DIR="~/Downloads"             # TikTok CSV search path
export SOCIALS_ALLOWED_ORIGINS="https://..."     # HTTP mode origin allowlist
export SOCIALS_ALLOW_SEND="1"                    # enable send automation (with daily cap)
export DIGEST_TO="you@example.com"               # weekly digest email
export DIGEST_FROM="sender@example.com"
export RESEND_API_KEY="re_..."                   # Resend API key for email

npm publish (local)

npm login                          # authenticate with npmjs.com
pnpm install && pnpm build        # build all packages
pnpm --filter @aryaminus/socials-mcp run prepack  # bundle for npm
cd apps/mcp && npm pack           # verify tarball contents
cd apps/mcp && npm publish --access public --provenance  # publish

The CI release flow does this automatically on tag push: release-smoke.yml builds + tests → release.yml waits for smoke → cosign signs → GitHub Release → npm publish with provenance → verifies channels.

Repo conventions

  • pnpm monorepo; Node >= 22.5 (built-in node:sqlite); TypeScript strict; ESM only.
  • Workspace packages: @socials/shared, @socials/vault, @socials/connectors, app @aryaminus/socials-mcp.
  • Skills live in skills/<name>/SKILL.md (agentskills.io spec); .claude/skills/ and .agents/skills/ symlinks for native discovery.
  • Version bumps: update apps/mcp/package.json, root package.json, server.json, .claude-plugin/plugin.json together; log in CHANGELOG.md.

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.