agentleFS
matthewdonsemail-labmatthewdonsemail-lab/log/skills/instagram/SKILL.md

instagram

Skill63 starsChanged yesterdayMITView on GitHub

Work an Instagram account the way log does it: through the direct-API engine on vendor/instagrapi and the account''s one session host, never the browser. Read the threads, read one person in full, draft in the owner''s voice, gate it, send text or a meme as a photo, and let the realtime watch push every new DM to the agent.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tiktok, linkedin and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • G-HunterAiSkill

    tiktok

    TikTok platform integration. Manage videos, view analytics, and track engagement.

    Also in 4 projects that use this

  • kkoppenhaverSkill

    linkedin

    Write LinkedIn posts in Keanan's voice. Use when drafting LinkedIn content, creating professional posts, or sharing builder-focused insights. Triggers include requests to "write a LinkedIn post", "draft something for LinkedIn", "help me post on LinkedIn", or any LinkedIn content creation. Generates upbeat, builder-centric content mixing practical how-tos with candid humor.

    Also in 4 projects that use this

  • QuixiAISkill

    spotify

    Search Spotify, inspect current playback and devices, and control playback with explicit approval

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Never the browser: Every Instagram action is an MCP tool: instagramDms, instagramSend / instagramSendLive, instagramWatch, …

    line 13
  2. Very specific:

    One session per account: Every call goes through the account's one session host (python/instagramApi/host.py): one client signed in once, …

    line 17
  3. Very specific:

    Read them first: Read the person's whole thread before drafting (instagramDms { with }), rule 109.

    line 23
  4. Very specific:

    Use cases: docs/useCases/instagram/dmReply.md, newPlatform.md.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “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

instagram

Instagram is worked over the MCP, on the direct-API engine (python/instagramApi, vendor/instagrapi), never in the account's AdsPower browser.

Hard boundaries

  1. Never the browser. Every Instagram action is an MCP tool: instagramDms, instagramSend / instagramSendLive, instagramWatch, instagramSessionCheck. An action the engine doesn't have yet is built on the engine first.
  2. One session per account. Every call goes through the account's one session host (python/instagramApi/host.py): one client signed in once, one realtime connection. Never start a second process for it. A call that can't reach the host is refused with instagramSessionHostDown (rule 105).
  3. Claim the chat before drafting with inboxClaim (rule 133); a chat another session holds is left to it, and the send releases the claim.
  4. Read them first. Read the person's whole thread before drafting (instagramDms { with }), rule 109.
  5. Gate every draft with voice { to, with, context, text } until it passes.
  6. Send once, and stop if they write. A multi-line draft goes out one message per line, and the send stops the moment they write back (>>> INTERRUPTED): answer them, never resend (rule 90). Any refusal stops the run (rule 94).
  7. Live needs the owner. instagramSendLive needs approvedBy and confirmLive: true (rule 8).

The routine

instagramSessionCheck { account }                    the session is still good
instagramDms { account }                             the threads, newest first, ● unread
instagramDms { account, with: "<handle|thread>" }    one thread, oldest first; kept for log search and the voice index
voice { to, with, context }                          how the owner writes there
voice { to, with, context, text }                    gate the draft
instagramSendLive { account, with, text, approvedBy: "<owner>", confirmLive: true }
instagramSendLive { account, with, photo: "<file>", text, ... }   a meme goes as a photo

The live side

The inbox hook keeps log instagram watch running for every signed-in Instagram account. It holds Instagram's own realtime connection (MQTT to edge-mqtt.facebook.com, the DM sync subscribed) on the session host, and every new DM lands in ~/.logCli/inbox/pending.jsonl and reaches the agent as >>> NEW INSTAGRAM MESSAGE (rule 123). An agent following a conversation keeps a Monitor on that file.

Where things are

  • Commands: src/cli/instagram/index.ts. Session: src/instagram/account/session.
  • Engine and host: python/instagramApi/engine.py, python/instagramApi/host.py.
  • Transport: every HTTP call through curl_cffi (check:instagramTransport); the realtime MQTT socket is the one exception.
  • Use cases: docs/useCases/instagram/dmReply.md, newPlatform.md.
  • Spec: docs/specs/instagram.md. Platform page: docs/platforms/instagram/README.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.