Create a share image from an X/Twitter post.
When to use
- - User sends an
x.com / twitter.com post URL - User wants a tweet screenshot, share card, poster, or social-share image
- User wants the final image sent back in chat
Workflow
- 1. Extract the tweet URL from the user message.
- Open the tweet in the dedicated visible Chrome profile/session already used for X login.
- Capture the tweet content area only:
- keep avatar/name/text/link preview
- exclude right sidebar
- exclude reply/action counts when possible
- do not rewrite or re-typeset tweet text
- 4. Parse any user-requested color style (examples:
pink, blue-purple, purple-blue, peach, mint). - Composite the captured tweet area onto a poster background using that style.
- Save the final image under
workspace/tmp/. - Send the final image back to the user.
Rules
- - Prefer the user's logged-in dedicated Chrome profile, not their default browser profile.
- Do not use headless/embed screenshots if they produce blank/incorrect tweet content.
- The tweet content must be a real screenshot, not re-rendered fake text.
- Default background style: clean pink poster style.
- Support color presets when the user asks, including
pink, blue-purple, purple-blue, peach, and mint. - Default output is a square share card with a peach background unless the user asks for another preset.
- The white content card should adapt to content height instead of using a fixed internal height.
- Preserve the tweet content area without cropping away core text.
- Always inspect the result before sending if the capture path changed.
Output
Return the final image directly to the user with a short caption only if needed.
Scripts
- - INLINECODE13
- INLINECODE14
技能名称: tweet-share-card
详细描述:
根据X/Twitter帖子创建分享图片。
使用场景
- - 用户发送x.com/twitter.com帖子链接
- 用户需要推文截图、分享卡片、海报或社交分享图片
- 用户希望最终图片直接返回在聊天中
工作流程
- 1. 从用户消息中提取推文链接。
- 在已登录X的专用可见Chrome浏览器配置文件中打开该推文。
- 仅截取推文内容区域:
- 保留头像/姓名/文字/链接预览
- 排除右侧边栏
- 尽可能排除回复/互动计数
- 不重写或重新排版推文文字
- 4. 解析用户指定的颜色风格(示例:pink、blue-purple、purple-blue、peach、mint)。
- 将截取的推文区域按指定风格合成到海报背景上。
- 将最终图片保存至workspace/tmp/目录。
- 将最终图片发送回用户。
规则
- - 优先使用用户已登录的专用Chrome配置文件,而非默认浏览器配置文件。
- 如果无头/嵌入截图产生空白或错误的推文内容,则不要使用。
- 推文内容必须是真实截图,而非重新渲染的虚假文字。
- 默认背景风格:简洁粉色海报风格。
- 支持用户指定的颜色预设,包括pink、blue-purple、purple-blue、peach和mint。
- 除非用户要求其他预设,默认输出为桃色背景的方形分享卡片。
- 白色内容卡片应根据内容高度自适应,而非使用固定内部高度。
- 保留推文内容区域,不裁剪核心文字。
- 如果截取路径发生变化,务必在发送前检查结果。
输出
直接将最终图片返回给用户,仅在必要时附带简短说明。
脚本
- - python3 {Skills Directory}/tweet-share-card/scripts/capturevisibletweet.py url>
- python3 {Skills Directory}/tweet-share-card/scripts/composepinkcard.py capturepng> [pink|blue-purple|purple-blue|peach|mint]