agentleFS
genfeedaigenfeedai/skills/social-poster/SKILL.md

social-poster

Skill3 starsChanged 6 months agoMITView on GitHub

Publish approved X or LinkedIn derivatives with a dry-run-by-default approval gate.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    When genfeed is connected, the approval gate is additionally backed by the genfeed approval UI.

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 Poster

You publish one finished derivative to a social platform — X or LinkedIn — and return its post id and URL. You are the post in trend -> remix -> produce -> post -> analytic.

Posting is irreversible and public, so this worker is built around a hard approval gate:

No --confirm, no network. The default run is a dry run: it prints the exact request it would send (with the token masked) and exits without calling any API. Publishing happens only when the run is repeated with --confirm.

This lets the agent show the user precisely what will go out, get an explicit yes, and only then post. Pure worker: reads one token from the environment, persists nothing.


Run It

# 1. dry run — inspect the payload, post nothing (default)
bun run scripts/post.ts --platform x --text "shipping the content loop, all skills"

# 2. publish for real, after approval
bun run scripts/post.ts --platform x --text "..." --confirm
bun run scripts/post.ts --platform linkedin --author urn:li:person:XXXX --text "..." --confirm

A Derivative JSON on stdin is an alternative to --text / --media-ids:

echo '{"platform":"x","copy":"gm","mediaRefs":["1799..."]}' \
  | bun run scripts/post.ts --platform x --confirm

Requires Bun 1.1+. Zero dependencies — only Node built-ins and global fetch.


Flags

FlagPlatformNotes
--platformbothx or linkedin (required)
--textbothpost body; or .copy from a stdin Derivative
--media-idsxcomma-separated, already-uploaded media ids; or .mediaRefs
--reply-toxtweet id to reply to (thread chaining)
--authorlinkedinurn:li:person:<id> or urn:li:organization:<id> (or LINKEDIN_AUTHOR_URN)
--visibilitylinkedinPUBLIC (default) or CONNECTIONS
--linkedin-versionlinkedinYYYYMM API version (default 202505, or LINKEDIN_VERSION)
--confirmbothactually publish — without it, dry run only

Platforms

X

  • Endpoint: POST https://api.x.com/2/tweets.
  • Auth: Authorization: Bearer <token> — an OAuth 2.0 user-context token with tweet.write (env X_BEARER_TOKEN).
  • Body: { text, media: { media_ids }, reply: { in_reply_to_tweet_id } }.
  • Returns data.id; URL is https://x.com/i/web/status/<id>.
  • Media upload is a separate, multi-step concern (v2 /2/media/upload, scope media.write); this worker takes already-uploaded media_ids so the upload/credential flow stays in the vault layer.

LinkedIn

  • Endpoint: POST https://api.linkedin.com/rest/posts.
  • Auth: Authorization: Bearer <token> with w_member_social (env LINKEDIN_ACCESS_TOKEN); headers LinkedIn-Version: YYYYMM and X-Restli-Protocol-Version: 2.0.0.
  • Body: { author, commentary, visibility, distribution, lifecycleState: "PUBLISHED" }.
  • Post id comes back in the x-restli-id response header; URL is https://www.linkedin.com/feed/update/<urn>.

Output

Dry run:

{ "dryRun": true, "platform": "x", "willPost": { "url": "...", "method": "POST", "headers": { "authorization": "Bearer ****1234" }, "body": { "text": "..." } }, "note": "No request sent. Re-run with --confirm to publish." }

Confirmed:

{ "posted": true, "platform": "x", "postId": "1799...", "url": "https://x.com/i/web/status/1799..." }

The orchestrator records postId onto the matching Derivative and advances the item to posted, which is what analytics-collector later queries.


How It Fits The Loop

# orchestrator resolves a scoped token through the seam (never sees the raw vault credential)
export X_BEARER_TOKEN="$(bun run ../genfeed-connector/gf.ts token x)"

# show the user exactly what will post...
bun run scripts/post.ts --platform x --text "$COPY"          # dry run
# ...then, on an explicit yes, publish and capture the id
bun run scripts/post.ts --platform x --text "$COPY" --confirm

When genfeed is connected, the approval gate is additionally backed by the genfeed approval UI; standalone, the agent asks in chat. Either way --confirm is the single switch between "show" and "send".


Security

  • Tokens (X_BEARER_TOKEN, LINKEDIN_ACCESS_TOKEN) are read from the environment, used in memory, and never written anywhere. The token is masked in dry-run output.
  • The dry run performs no network call and no token lookup — it cannot accidentally publish.
  • The only outbound calls are the publish requests, and only under --confirm.
  • This worker never deletes or edits existing posts; it only creates new ones.

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.