# Social Media Scheduling

> Use for Postnify social-post scheduling requests. Covers IG.

- **Type:** Skill
- **Install:** `agentstack add skill-fajrisilmi12-cyber-hermes-socmed-function-social-media-scheduling`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [fajrisilmi12-cyber](https://agentstack.voostack.com/s/fajrisilmi12-cyber)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [fajrisilmi12-cyber](https://github.com/fajrisilmi12-cyber)
- **Source:** https://github.com/fajrisilmi12-cyber/hermes-socmed-function/tree/main/skills/social-media-scheduling

## Install

```sh
agentstack add skill-fajrisilmi12-cyber-hermes-socmed-function-social-media-scheduling
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Social Media Scheduling via Postnify

Fajri schedules Instagram posts through chat ("upload ini jam 6 sore, caption X").
The tool is Postnify CLI (`/usr/bin/postnify`, OAuth2 already valid in `~/.postnify/credentials.json`).
Load this skill before running any `postnify` command — it carries the account IDs,
the gotchas that actually bit us, and a ready verification script.

## Workflow

1. **Identify target time** — Fajri speaks WIB (UTC+7): "jam 6 sore" = 18:00 WIB = 11:00Z.
   Confirm with `date -u` if the current UTC time is near or past the requested slot.
2. **Check auth + integration** (skip only if used earlier same session):
   `postnify auth:status` then `postnify integrations:list`.
3. **Upload media FIRST** — `postnify upload ` → use returned `.path` URL in `-m`.
   Never pass local paths or foreign URLs to `-m`.
4. **Create post** — `-s` date is REQUIRED and must be ISO8601 Zulu:
   ```
   postnify posts:create -c "" -m "" -s "" \
     --settings '{"post_type":"post"}' -i "$IG_ID"
   ```
5. **Verify** — run `scripts/verify_ig_schedule.sh ` (or read its inline logic):
   confirm state=QUEUE and publishDate matches the request; report both to the user.

## Gotchas learned the hard way (do not rediscover)

- **`post_type` is REQUIRED for instagram-standalone** or posts:create returns 400
  (`settings.post_type should not be null`). Always pass `--settings '{"post_type":"post"}'`
  (or `"story"`). This error is NOT mentioned as required in `integrations:settings` output.
  Stories: use `"story"` + a space `" "` as caption when the user says "tanpa caption"
  (empty `-c ""` fails with "Either --content or --json is required").
- **Instagram rejects WebP uploads at PUBLISH time, not create time.** The post shows
  state=QUEUE and only fails later with ERROR. Convert to JPEG first:
  `ffmpeg -y -i in.webp out.jpg`. After any ERROR, delete + recreate with converted media;
  do not just reschedule the broken post.
- **Deleting a queued post**: `postnify posts:delete ` works cleanly while state=QUEUE/ERROR.
- **Pin order**: schedule earlier-requested posts earlier even if asked in reverse order,
  so the queue matches how Fajri thinks about them.
- **Time math**: Fajri speaks WIB = UTC+7 ("jam 8:40 malam" → 13:40Z same day). Confirm
  with `date -u` right before scheduling; he schedules near-current-time slots often.
- **Free tier is 15 posts/month.** When volume matters or user complains about the cap,
  point IG/FB scheduling to Meta Business Suite (free, unlimited) instead of upgrading;
  keep Postnify for multi-platform pushes.

## Delivering longer content via chat (not Postnify-specific)

- **Discord caps a message at 2000 chars.** Any reply longer than that must be split
  into consecutive `send` chunks (or condensed); the API hard-rejects overlong posts.
- **WhatsApp long-message delivery (working pattern):** `cronjob create` with
  `no_agent=true`, `deliver=whatsapp`, a one-shot schedule, and a **python script**
  whose stdout is `print(open(path).read())`. Pitfalls hit this way:
  - `script` must be a resolvable file — a bash one-liner (`cat /path`) was mis-parsed
    as the path (`/root/.hermes/scripts/cat /path` → "Script not found").
  - One-shot schedule must be **>120s in the future**; earlier times are rejected.
  - A one-shot job that already fired is disabled/completed — `run`/`update`-then-`run`
    will NOT re-fire it; remove and create a fresh job instead.

## Safety check before publishing screenshots

When the media is a terminal/IDE screenshot (common from Fajri), run vision analysis on it
first asking specifically whether any FULL API key/token/password is visible unmasked.
If any full secret is visible: warn and ask before posting. Truncated keys (ending in `…`)
and bare UUIDs are acceptable.

## References

- [references/postnify-ig.md](references/postnify-ig.md) — account/integration IDs, command
  transcript patterns, analytics notes for this user's connected accounts.
- [references/zernio.md](references/zernio.md) — parallel multi-platform scheduler
  (16 platforms, 2 free accounts forever, no Postnify cap). Use when Postnify's
  15-post/month limit or single-platform scope blocks the request.
- [references/ig-data-access.md](references/ig-data-access.md) — verified facts for IG
  data-access questions (Graph API limits, dead Basic Display API, scraping constraints
  on this server, anti-bot reality). Consult before answering "can we scrape IG".

## Planned extension (not yet wired)

Facebook Page posting for the FB-Shopee dropshipping project — connect the Page as a second
integration, then reuse the same flow (likely needs different settings keys; check
`integrations:settings ` first).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [fajrisilmi12-cyber](https://github.com/fajrisilmi12-cyber)
- **Source:** [fajrisilmi12-cyber/hermes-socmed-function](https://github.com/fajrisilmi12-cyber/hermes-socmed-function)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** yes
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-fajrisilmi12-cyber-hermes-socmed-function-social-media-scheduling
- Seller: https://agentstack.voostack.com/s/fajrisilmi12-cyber
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
