feat: add Instagram SEO-posting skill and profile avatar#1042
Conversation
|
First post is live and proves the skill end to end: https://www.instagram.com/p/DbFzQz6mpze/ (media id
Still draft pending review. Open: rotate the app secret (exposed in chat), and optionally swap the committed avatar to the plain-orange logo. |
|
Corrected post is live (old one deleted, this replaces it): https://www.instagram.com/p/DbF1Dh3GnJa/
|
|
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:
|
|
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. |
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.
e5f9204 to
fa593f2
Compare
What
A committed Claude skill (
.claude/skills/webjs-instagram-post/) that teaches any agent how to publish an SEO post to the@webjs_devInstagram account, plus a new round profile avatar.The skill encodes
@webjs_dev(BUSINESS, id17841441038146182), Instagram API with Instagram Login,graph.instagram.com/v25.0, long-lived user token.~/.config/webjs/instagram.env(outside the repo,chmod 600), sourced inside scripts and never printed or committed.Profile avatar
assets/webjs-instagram-avatar.pngis a full-bleed brand-orange 1080x1080 with the whitewebjswordmark, 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