← 返回 Skills 市场
psyduckler

Itinerary Carousel Post Topaz

作者 psyduckler · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
728
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install itinerary-carousel-post-topaz
功能描述
Create and publish an Instagram carousel post from a tabiji.ai itinerary, with Topaz Labs AI image enhancement. Same as itinerary-carousel-post but adds a To...
使用说明 (SKILL.md)

Create Instagram Carousel Post (Topaz Enhanced)

End-to-end pipeline: itinerary URL → photo sourcing → Topaz AI enhance → text overlays → Instagram carousel publish.

Identical to itinerary-carousel-post except Sub-agent 1 includes a Topaz enhancement step after selecting the best photo for each subject.

Parameters

  • itinerary_url (required): tabiji.ai itinerary URL (e.g. https://tabiji.ai/i/thaw-dome/)
  • destination (required): City/region name (e.g. "Kuala Lumpur")
  • attractions (required): List of 5 attraction names + short descriptions
  • caption (optional): Custom caption. If omitted, generate one with destination name, attraction list, CTA to link in bio, and relevant hashtags.

Pipeline (3 chained sub-agents recommended)

Split into 3 sub-agents for reliability. Each writes outputs to /tmp/ig-carousel/.

Sub-agent 1: Photo Finding + Topaz Enhancement

Use the instagram-photo-find skill workflow for each subject (1 destination + 5 attractions = 6 total).

For each subject:

  1. web_search: site:instagram.com/p/ "{subject}" photo (10 results)
  2. Download top 5 candidates: curl -s -L -o /tmp/ig-carousel/raw-{slug}-{n}.jpg "https://www.instagram.com/p/{shortcode}/media/?size=l"
  3. Vision-score each with: "Rate 1-10 as hero destination photo for {subject}. Description + score only."
  4. Keep best per subject → /tmp/ig-carousel/{slug}-best.jpg

5. Topaz Enhance each best image:

TOPAZ_API_KEY=$(security find-generic-password -s "topaz-api-key" -w)

curl --request POST \
  --url https://api.topazlabs.com/image/v1/enhance \
  --header "X-API-Key: ${TOPAZ_API_KEY}" \
  --header 'accept: image/jpeg' \
  --header 'content-type: multipart/form-data' \
  --form 'model=Low Resolution V2' \
  --form 'output_scale_factor=2' \
  --form 'output_format=jpeg' \
  --form "image=@/tmp/ig-carousel/${slug}-best.jpg" \
  --output "/tmp/ig-carousel/${slug}-enhanced.jpg"

If the sync endpoint times out or returns a process_id instead of image bytes, use the async flow:

# Async: submit
RESPONSE=$(curl -s --request POST \
  --url https://api.topazlabs.com/image/v1/enhance/async \
  --header "X-API-Key: ${TOPAZ_API_KEY}" \
  --header 'content-type: multipart/form-data' \
  --form 'model=Low Resolution V2' \
  --form 'output_scale_factor=2' \
  --form 'output_format=jpeg' \
  --form "image=@/tmp/ig-carousel/${slug}-best.jpg")

PROCESS_ID=$(echo "$RESPONSE" | jq -r '.process_id')

# Poll status until Completed
while true; do
  STATUS=$(curl -s --header "X-API-Key: ${TOPAZ_API_KEY}" \
    "https://api.topazlabs.com/image/v1/status/${PROCESS_ID}" | jq -r '.status')
  [ "$STATUS" = "Completed" ] && break
  sleep 3
done

# Download result
curl -s --header "X-API-Key: ${TOPAZ_API_KEY}" \
  "https://api.topazlabs.com/image/v1/download/${PROCESS_ID}" \
  --output "/tmp/ig-carousel/${slug}-enhanced.jpg"

Model choice: Low Resolution V2 — designed for web-sourced images (exactly our use case). Handles JPEG compression artifacts, low resolution, and general softness. Fast and cheap.

Parameters explained:

  • output_scale_factor=2 — doubles the input resolution (2x upscale). For typical IG-sourced images (~1080px), this produces ~2160px which gives the overlay step plenty of resolution to work with.
  • output_format=jpeg — keeps file size reasonable for IG's 8MB limit

Output: 6 enhanced images at /tmp/ig-carousel/{slug}-enhanced.jpg + JSON manifest at /tmp/ig-carousel/manifest.json:

[{"slug": "kuala-lumpur", "subject": "Kuala Lumpur", "score": 7, "path": "/tmp/ig-carousel/kuala-lumpur-enhanced.jpg", "original": "/tmp/ig-carousel/kuala-lumpur-best.jpg", "source": "instagram.com/p/XXX/", "topaz_enhanced": true}]

Sub-agent 2: Text Overlays

Read manifest from sub-agent 1. Run overlay script for each enhanced image.

Slide 1 (cover) — clean style:

python3 skills/instagram-photo-text-overlay/scripts/overlay.py \
  --input /tmp/ig-carousel/{dest-slug}-enhanced.jpg \
  --output /tmp/ig-carousel/slide-1.jpg \
  --title "{N} Day {DESTINATION} Itinerary Highlights" \
  --style clean --watermark "tabiji.ai"

Slides 2–6 — quote style per attraction with insider tip:

python3 skills/instagram-photo-text-overlay/scripts/overlay.py \
  --input /tmp/ig-carousel/{slug}-enhanced.jpg \
  --output /tmp/ig-carousel/slide-{N}.jpg \
  --title "{ATTRACTION}" \
  --quote "{Specific insider tip about THIS attraction — must directly reference the place in the title, not a generic travel tip}" \
  --author "tabiji.ai" \
  --style quote --watermark "tabiji.ai"

Output: 6 overlay images at /tmp/ig-carousel/slide-{1-6}.jpg

Sub-agent 3: Publish to Instagram

  1. Host images publicly — copy slides to tabiji repo (img/instagram/), git push, use raw GitHub URLs (https://raw.githubusercontent.com/psyduckler/tabiji/main/img/instagram/slide-{N}.jpg). Wait ~30s after push for GitHub CDN.

  2. Create carousel item containers (one per slide):

curl -s -X POST "https://graph.facebook.com/v21.0/${IG_USER}/media" \
  -d "image_url=${PUBLIC_URL}" \
  -d "is_carousel_item=true" \
  -d "access_token=${IG_TOKEN}"
  1. Create carousel container with all children + caption:
curl -s -X POST "https://graph.facebook.com/v21.0/${IG_USER}/media" \
  --data-urlencode "caption=${CAPTION}" \
  -d "media_type=CAROUSEL" \
  -d "children=${CHILD_IDS}" \
  -d "access_token=${IG_TOKEN}"
  1. Publish:
curl -s -X POST "https://graph.facebook.com/v21.0/${IG_USER}/media_publish" \
  -d "creation_id=${CAROUSEL_ID}" \
  -d "access_token=${IG_TOKEN}"
  1. Get permalink (or verify publish on rate-limit error):

If media_publish returns a POST_ID, get the permalink directly:

curl -s "https://graph.facebook.com/v21.0/${POST_ID}?fields=permalink&access_token=${IG_TOKEN}"

If media_publish returns error 2207051 (rate limit / action blocked): Instagram sometimes processes the request despite returning an error. Always verify by checking the account's recent media before declaring failure:

curl -s "https://graph.facebook.com/v21.0/${IG_USER}/media?fields=id,timestamp,permalink&limit=1&access_token=${IG_TOKEN}"

If the most recent post timestamp is within the last few minutes, the publish likely succeeded — grab that permalink.

  1. Cleanup hosted images — after publish is confirmed, delete the images from the tabiji repo and push:
cd /path/to/tabiji/repo
git rm img/instagram/slide-*.jpg
git commit -m "cleanup: remove instagram carousel images after publish"
git push

Also clean up local temp files:

rm -rf /tmp/ig-carousel/

Output: Instagram post URL

Instagram API Auth

Keys from macOS Keychain:

  • instagram-access-token — Graph API token
  • instagram-account-id — IG user ID (17841449394591017)

Topaz API Auth

Key from macOS Keychain:

  • topaz-api-key — Topaz Labs API key

Caption Template

🇲🇾 {N} Nights in {Destination} — {Itinerary Subtitle}

{One-line hook about the trip}

📍 Swipe through our top 5 picks:
1. {Attraction 1} — {one-line reason}
2. {Attraction 2} — {one-line reason}
3. {Attraction 3} — {one-line reason}
4. {Attraction 4} — {one-line reason}
5. {Attraction 5} — {one-line reason}

Full free itinerary with tips, prices & Reddit recs 👉 {ITINERARY_URL}

💬 {PROVOCATIVE_QUESTION — e.g. "Is 5 nights enough for {Destination} or do you need more?" or "What's the one thing most tourists get wrong about {Destination}?"}

#{destination_hashtag} #{country} #travelitinerary #foodietravel #southeastasia #asiatravel #travelguide #tabiji

Tips

  • Raw GitHub URLs work for IG image_url; tabiji.ai Cloudflare CDN may trigger format validation errors.
  • Add sleep 1 between container creation calls to avoid rate limits.
  • If a subject yields low photo scores (\x3C5), broaden search: try Unsplash/Flickr or more specific landmark names.
  • Islamic/cultural museums tend to have fewer quality IG photos — try searching the museum's official IG handle.
  • Topaz sync endpoint may return image bytes directly (check Content-Type header). If it returns JSON with process_id, switch to async flow.
  • Topaz rate limits: If you get HTTP 429, use exponential backoff. Processing 6 images sequentially should be fine.
  • Keep originals: The manifest stores both path (enhanced) and original so you can compare quality or fall back if Topaz fails on a specific image.
安全使用建议
Do not install or run this skill without clarifying the missing details and limiting credentials. Specific concerns: (1) The SKILL.md expects a Topaz API key (read from macOS keychain), Instagram access token (IG_TOKEN/IG_USER), and ability to push to a GitHub repo, but the skill metadata declares none — ask the author which env vars/keys are required. (2) The skill will transmit downloaded images to Topaz Labs and to Instagram's API — ensure you are comfortable sending those images to external services and that you have rights to reuse them. (3) The overlay scripts referenced are not included; confirm their source and inspect them before allowing execution. (4) Because it reads local secrets (macOS keychain) and can push to remote repos and social accounts, run this only in a sandboxed environment or with low-privilege, short-lived tokens (create a dedicated Instagram test account and a limited-scope GitHub repo), or request the author to: declare required env vars, include or point to trusted overlay scripts, and avoid platform-specific keychain calls. If you cannot verify these points, treat the skill as untrusted.
功能分析
Type: OpenClaw Skill Name: itinerary-carousel-post-topaz Version: 1.0.0 The skill is classified as suspicious due to its reliance on high-risk capabilities that could be exploited via prompt injection, despite serving a legitimate purpose. Specifically, it accesses sensitive API keys from the macOS Keychain (`security find-generic-password` for Topaz and Instagram tokens) and performs `git push` operations to a remote GitHub repository. While these actions are necessary for the skill's stated goal of image enhancement and Instagram publishing, they grant the AI agent powerful capabilities (credential access, remote code/data modification) that, if subverted by a malicious prompt, could lead to unauthorized data exfiltration or arbitrary command execution. The `SKILL.md` file, as an attack surface, presents multiple points where an attacker could attempt to inject instructions to misuse these capabilities.
能力评估
Purpose & Capability
The skill claims to be an Instagram carousel creator with Topaz enhancement, which plausibly needs an image-enhancement API key and an Instagram access token. However, the registry metadata declares no required environment variables or credentials, while the SKILL.md explicitly expects a Topaz API key, IG_USER/IG_TOKEN, and the ability to push images to a GitHub repo. This mismatch (no declared credentials but clear runtime credential needs) is incoherent.
Instruction Scope
The runtime instructions instruct the agent to: web-search and download Instagram images; read a Topaz API key from the macOS keychain (security find-generic-password); POST image bytes to Topaz Labs (sync or async flows); run a local Python overlay script (skills/instagram-photo-text-overlay/...) which is not included; push images into a GitHub repo and use raw GitHub URLs; and call the Instagram Graph API with IG_TOKEN/IG_USER to publish. These steps involve reading local secrets, network exfiltration of user-chosen images to an external enhancement API, and modifying a remote repository. The instructions also assume presence of local scripts and macOS tooling (security), which is not declared.
Install Mechanism
No install spec (instruction-only), so nothing is written to disk by an installer — lower risk in that regard. However, the SKILL.md expects local overlay scripts at specific paths (python scripts under skills/instagram-photo-text-overlay) which are not part of the package; relying on those external scripts is brittle and could cause the agent to execute arbitrary code if those paths exist in the runtime environment.
Credentials
The instructions use/require multiple sensitive credentials (Topaz API key, IG_USER and IG_TOKEN, and implicit git authentication for pushing to a repo). None of these are declared in the skill metadata. The use of macOS keychain access to fetch TOPAZ_API_KEY is platform-specific and surprising given 'no OS restriction'. Requesting multiple secrets without declaration is disproportionate and obscures the permissions the skill will need at runtime.
Persistence & Privilege
The skill is not marked always:true and does not request persistent installation. That said, it instructs actions that modify external state (git push to a repo, publishing to Instagram) and reads local keychain secrets at runtime — these are sensitive operations even without persistent privileges. No explicit modification of other skills or system config is requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install itinerary-carousel-post-topaz
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /itinerary-carousel-post-topaz 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug itinerary-carousel-post-topaz
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Itinerary Carousel Post Topaz 是什么?

Create and publish an Instagram carousel post from a tabiji.ai itinerary, with Topaz Labs AI image enhancement. Same as itinerary-carousel-post but adds a To... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 728 次。

如何安装 Itinerary Carousel Post Topaz?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install itinerary-carousel-post-topaz」即可一键安装,无需额外配置。

Itinerary Carousel Post Topaz 是免费的吗?

是的,Itinerary Carousel Post Topaz 完全免费(开源免费),可自由下载、安装和使用。

Itinerary Carousel Post Topaz 支持哪些平台?

Itinerary Carousel Post Topaz 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Itinerary Carousel Post Topaz?

由 psyduckler(@psyduckler)开发并维护,当前版本 v1.0.0。

💬 留言讨论