Skip to content

feat: add Instagram SEO-posting skill and profile avatar#1042

Merged
vivek7405 merged 7 commits into
mainfrom
feat/instagram-seo-posting
Jul 22, 2026
Merged

feat: add Instagram SEO-posting skill and profile avatar#1042
vivek7405 merged 7 commits into
mainfrom
feat/instagram-seo-posting

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

What

A committed Claude skill (.claude/skills/webjs-instagram-post/) that teaches any agent how to publish an SEO post to the @webjs_dev Instagram account, plus a new round profile avatar.

The skill encodes

  • Account + API: @webjs_dev (BUSINESS, id 17841441038146182), Instagram API with Instagram Login, graph.instagram.com/v25.0, long-lived user token.
  • Credentials: read from ~/.config/webjs/instagram.env (outside the repo, chmod 600), sourced inside scripts and never printed or committed.
  • SEO-only workflow: every post ships a freshly built branded JPEG card (ImageMagick recipe included) plus a keyword-rich caption that links back to a webjs.dev page.
  • Publish flow: quota check, create container, publish, all confirm-first because it is public and hard to undo.
  • Token refresh recipe so the account never lapses.

Profile avatar

assets/webjs-instagram-avatar.png is a full-bleed brand-orange 1080x1080 with the white webjs wordmark, so Instagram's circular crop yields a clean filled circle instead of the old rounded-square favicon that clipped to a plain orange blob.

Routing

The skill-router hook now deterministically routes any Instagram-posting prompt to the skill, with test coverage (16/16 hook tests pass, including the committed-in-repo guard).

Why

The Instagram account is for SEO reach. Capturing the account id, credential handling, image requirement (JPEG + public host), and the confirm-first publish as a skill means every future "post to Instagram" runs the same safe, on-brand workflow.

Notes

  • No secrets in the diff (scanned before commit).
  • The avatar upload and profile-picture change are manual in the Instagram app (the publishing API cannot set a profile picture).

@vivek7405

Copy link
Copy Markdown
Collaborator Author

First post is live and proves the skill end to end: https://www.instagram.com/p/DbFzQz6mpze/ (media id 17895095562561818).

  • Built the image via assets/build-post.sh, uploaded, created the media container, published, confirmed the permalink.
  • Reworked the image recipe to match the webjs.dev OG theme (dark card + warm corner glow + orange accents), replacing the earlier orange-background card.
  • Hook tests still green (16/16).

Still draft pending review. Open: rotate the app secret (exposed in chat), and optionally swap the committed avatar to the plain-orange logo.

@vivek7405

Copy link
Copy Markdown
Collaborator Author

Corrected post is live (old one deleted, this replaces it): https://www.instagram.com/p/DbF1Dh3GnJa/

  • Text now sits inside Instagram's 3:4 grid-crop safe zone, so the thumbnail no longer clips.
  • Hit a hosting gotcha: catbox returned a URL but stored an empty file, and Instagram surfaced it as a generic code-1 error. Documented a round-trip byte check in the skill.

@vivek7405

Copy link
Copy Markdown
Collaborator Author

Reposted with wider margins so the thumbnail no longer touches the left edge: https://www.instagram.com/p/DbF3higGmvL/

Two robustness fixes folded into the skill from this round:

  • Safe-column margin widened to 200px (grid crop now leaves padding around the text).
  • Poll the media container until status_code=FINISHED before media_publish (immediate publish hit code 9007).

@vivek7405

Copy link
Copy Markdown
Collaborator Author

Reposted at higher resolution for desktop sharpness: https://www.instagram.com/p/DbF5KdQmqvq/

Fix: the card now renders at 2x supersample and outputs a Lanczos-downscaled, lightly-sharpened 1440x1440 quality-95 JPEG. A flat 1080 render looked soft in Instagram's desktop full-size view on high-DPI screens after IG re-compresses; the supersampled 1440 stays crisp. Skill + crop-check doc updated to match.

@vivek7405
vivek7405 marked this pull request as ready for review July 22, 2026 10:39
Encode the `@webjs_dev` posting workflow as a committed Claude skill so any
agent can publish an SEO post: build a branded JPEG card, host it publicly,
write a keyword-rich caption, and run the confirm-first two-step publish
against `graph.instagram.com`. Credentials stay in a gitignored config file
outside the repo and are never printed or committed.

Ship a full-bleed round profile avatar (white `webjs` wordmark on the brand
orange gradient) that survives Instagram's circular crop, replacing the old
rounded-square favicon that clipped to a plain blob.

Route the skill deterministically from the skill-router hook on any
Instagram-posting prompt, with test coverage.
The first draft used an orange-background card. Replace it with a
parameterised builder (assets/build-post.sh) that reproduces the site OG
look: near-black card, soft warm corner glow, orange squircle mark plus the
white wordmark, a bold white headline with one orange-highlighted phrase,
gray subtext, and a small-caps footer meta row. Verified end to end by
publishing the first real post to the account.
The profile grid crops a 1:1 post to 3:4 portrait, trimming ~12.5% off
each side, which clipped the wide left-aligned headline in the thumbnail.
Pull every element into the center-safe column (140px margins) and shrink
the headline and subtext so no line runs to the horizontal edges. Verified
against a simulated 3:4 crop.
A host can return a URL but store an empty file, and Instagram then fails
container creation with a generic code-1 error. Document a round-trip check
so the confusing error is diagnosed in one step.
Bump the safe-column margin to 200px so the 3:4 grid crop leaves
comfortable padding instead of text touching the thumbnail edge. Poll the
media container until status_code is FINISHED before media_publish, since
publishing immediately after create fails with code 9007 even for a static
image.
Document the profile grid's 3:4 crop and the simulate-and-eyeball
verification so the text-cutoff issue is caught before publishing, not after.
A flat 1080 render looked soft in Instagram's desktop full-size view on
high-DPI screens after IG re-compression. Render the whole card at 2x and
downscale with Lanczos + a light unsharp to a 1440x1440 quality-95 JPEG so
the logo and text stay crisp at full size. Update the doc and crop check to
the new output size.
@vivek7405
vivek7405 force-pushed the feat/instagram-seo-posting branch from e5f9204 to fa593f2 Compare July 22, 2026 10:40
@vivek7405
vivek7405 merged commit 45003d1 into main Jul 22, 2026
10 checks passed
@vivek7405
vivek7405 deleted the feat/instagram-seo-posting branch July 22, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant