x-image-cards
Create X/Twitter cards that look like images, not marketing banners. Use when asked to "create OG images", "set up X cards", "make social cards", or "twitter card without text".
Best use case
x-image-cards is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create X/Twitter cards that look like images, not marketing banners. Use when asked to "create OG images", "set up X cards", "make social cards", or "twitter card without text".
Teams using x-image-cards should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/x-image-cards/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How x-image-cards Compares
| Feature / Agent | x-image-cards | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create X/Twitter cards that look like images, not marketing banners. Use when asked to "create OG images", "set up X cards", "make social cards", or "twitter card without text".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# X Image Cards
Create X cards that look like images, not marketing banners. Let the visual be the content — X already shows your title and description in the card UI.
## X-Specific Requirements
| Spec | Value | Why |
|------|-------|-----|
| Dimensions | 2400×1200 physical (1200×600 logical) | 2x for retina, 2:1 aspect ratio |
| Safe margins | 50-56px padding (at 1x) | X clips edges on mobile |
| URL format | `/og/page.png` not `/og/page?format=png` | X prefers explicit extensions |
| Colors | `#FFFFFF` primary, avoid subtle grays | Thumbnails are tiny |
## Zero-Width Space Trick
X overlays `og:title` as white text on the image. Hide it with a zero-width space:
```html
<meta property="og:title" content="​" />
```
In JSX: `content={"\u200B"}`
Your page `<title>` stays descriptive for SEO — only `og:title` uses the trick.
## Meta Tags
```html
<meta property="og:image" content="https://example.com/og/page.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="600" />
<meta property="og:title" content="​" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://example.com/og/page.png" />
```
## Dynamic Generation
Use `@vercel/og` with 2x scale and safe margins:
```typescript
import { ImageResponse } from '@vercel/og';
const OG_SCALE = 2;
export async function GET(request: Request) {
return new ImageResponse(
(
<div style={{
width: '100%',
height: '100%',
display: 'flex',
backgroundColor: '#0a0f1c',
padding: 100, // 50px * 2 for safe margins
}}>
{/* Your visual content here */}
</div>
),
{ width: 1200 * OG_SCALE, height: 600 * OG_SCALE }
);
}
```
### Express
```typescript
app.get('/og/:slug.png', async (req, res) => {
const image = new ImageResponse(/* ... */);
const buffer = await image.arrayBuffer();
res.setHeader('Content-Type', 'image/png');
res.setHeader('Cache-Control', 'public, max-age=86400');
res.send(Buffer.from(buffer));
});
```
## Dynamic Routes (Optional)
For per-page OG images, two approaches:
### On-Demand Generation
Generate when crawler requests the image:
```
/og/[slug].png → generates image on request
```
**Risk:** X crawlers timeout after ~5 seconds. Cold starts can exceed this, causing blank previews.
### Pre-Generated (Recommended)
Generate and store image when content is created:
```typescript
// On content creation
const imageBuffer = await generateOgImage(data);
await db.insert({ ogImageData: imageBuffer }); // Store as BYTEA
// On request - instant response
app.get('/og/:id.png', (req, res) => {
const { ogImageData } = await db.get(req.params.id);
res.setHeader('Content-Type', 'image/png');
res.send(ogImageData);
});
```
Pre-generation ensures instant response for crawlers.
## Checklist
- [ ] 2400×1200 (2x retina)
- [ ] 2:1 aspect ratio
- [ ] 50-56px safe margins
- [ ] High contrast colors
- [ ] `.png` extension in URL
- [ ] Zero-width space in `og:title`
- [ ] Test: https://cards-dev.twitter.com/validator
---
*Built for [BondTerminal](https://bondterminal.com). See it in action: [example X post](https://x.com/0juano/status/2016559903578407358).*Related Skills
all-images-ai-automation
Automate All Images AI tasks via Rube MCP (Composio). Always search tools first for current schemas.
ai-image-generator
使用 ModelScope 等平台生成 AI 图像。当用户需要生成图像、设计图标、创建角色立绘,或需要帮助编写 AI 绘画提示词时使用此技能。支持直接生成图像和仅优化提示词两种模式。
xhs-images
Xiaohongshu (Little Red Book) infographic series generator with multiple style options. Breaks down content into 1-10 cartoon-style infographics. Use when user asks to create "小红书图片", "XHS images", or "RedNote infographics".
wiro-image-fill
Generate missing or placeholder images in a project by calling the Wiro image generation API, saving assets under public/assets generated folders, and producing a JSON mapping. Use when you see empty img src, placeholder.png, or other image gaps that need real assets.
seedream-image-generator
Generate images using the Doubao SeeDream API based on text prompts. Use this skill when users request AI-generated images, artwork, illustrations, or visual content creation. The skill handles API calls, downloads generated images to the project's /pic folder, and supports batch generation of up to 4 sequential images.
placeholder-images
Rule to use placekitten.com for placeholder images in seed data.
og-image-generator
Generate and optimize Open Graph meta images for social media sharing. Use this skill when building web applications that need dynamic OG image generation with support for Vercel's @vercel/og library, pre-generated image storage, and social media optimization (Twitter Cards, Facebook, LinkedIn). Handles dynamic routes, performance optimization, and includes best practices for crawler compatibility and testing.
nanobanana-image
Nano Banana (Google Gemini API) を使って画像を生成・編集するスキル。「画像を生成して」「イラストを作って」「○○の絵を描いて」「画像を作成」「この画像を編集して」「この画像をもとに○○を作って」「generate an image」「create a picture」「edit this image」などの依頼があった場合に使用。テキストからの生成、参照画像からの生成、画像編集、Google検索グラウンディングによる最新情報を反映した画像生成に対応。「最新の○○」「トレンドを反映」「リアルタイム情報」といった依頼にも対応可能。
nano-image-generate
Generate images using Nano Banana (Flash) or Nano Banana Pro. Use 'flash' for speed/efficiency and 'pro' for high quality, text rendering, and complex prompt adherence. Triggers include 'generate image', 'create logo', 'fast image', 'high quality image'.
imagen
AI image generation skill powered by Google Gemini, enabling seamless visual content creation for UI placeholders, documentation, and design assets.
imagekit-io-automation
Automate Imagekit IO tasks via Rube MCP (Composio). Always search tools first for current schemas.
imagegen-gemini
Generate/edit images via Gemini API (Nano Banana). Triggers: generate image, create picture, AI art, edit image, make illustration.