Skip to content

Commit e682f6b

Browse files
committed
Add banner-creator skill
- SKILL.md with 6-step workflow - crop_banner.py script for ratio/size adjustment - preview.html template (3-column grid) - formats.md reference for platform sizes - opc-banner-creation.md example
1 parent a6d0340 commit e682f6b

6 files changed

Lines changed: 747 additions & 0 deletions

File tree

skills.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,43 @@
246246
"github": "https://github.com/ReScienceLab/opc-skills/tree/main/skills/logo-creator",
247247
"example": "https://github.com/ReScienceLab/opc-skills/blob/main/skills/logo-creator/examples/opc-logo-creation.md"
248248
}
249+
},
250+
{
251+
"name": "banner-creator",
252+
"version": "1.0.0",
253+
"description": "Create banners using AI image generation. Discuss format/style, generate variations, iterate with user feedback, crop to target ratio for GitHub, Twitter, LinkedIn, etc.",
254+
"icon": "image",
255+
"color": "F59E0B",
256+
"triggers": ["banner", "header", "hero image", "cover image", "create banner", "github banner", "twitter header", "readme banner"],
257+
"dependencies": [],
258+
"auth": {
259+
"required": false,
260+
"type": null,
261+
"note": "Uses nano-banana-pro for image generation (no additional API keys needed)"
262+
},
263+
"install": {
264+
"user": {
265+
"claude": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t claude banner-creator",
266+
"droid": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t droid banner-creator",
267+
"opencode": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t opencode banner-creator",
268+
"codex": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t codex banner-creator"
269+
},
270+
"project": {
271+
"claude": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t claude -p banner-creator",
272+
"droid": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t droid -p banner-creator",
273+
"cursor": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t cursor -p banner-creator",
274+
"opencode": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t opencode -p banner-creator",
275+
"codex": "curl -fsSL https://raw.githubusercontent.com/ReScienceLab/opc-skills/main/install.sh | bash -s -- -t codex -p banner-creator"
276+
}
277+
},
278+
"commands": [
279+
"nano-banana-pro___generate_image(prompt, aspectRatio: '21:9', fileName)",
280+
"python3 scripts/crop_banner.py {input.png} {output.png} --ratio 2:1 --width 1280"
281+
],
282+
"links": {
283+
"github": "https://github.com/ReScienceLab/opc-skills/tree/main/skills/banner-creator",
284+
"example": "https://github.com/ReScienceLab/opc-skills/blob/main/skills/banner-creator/examples/opc-banner-creation.md"
285+
}
249286
}
250287
]
251288
}

skills/banner-creator/SKILL.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
name: banner-creator
3+
description: Create banners using AI image generation. Discuss format/style, generate variations, iterate with user feedback, crop to target ratio. Use when user wants to create a banner, header, hero image, or cover image.
4+
triggers:
5+
- "banner"
6+
- "header"
7+
- "hero image"
8+
- "cover image"
9+
- "create banner"
10+
- "github banner"
11+
- "twitter header"
12+
- "readme banner"
13+
---
14+
15+
# Banner Creator Skill
16+
17+
Create professional banners through AI image generation with an iterative design process.
18+
19+
## Prerequisites
20+
21+
**Required Tools:**
22+
- `nano-banana-pro___generate_image` - AI image generation
23+
- `chrome-devtools` MCP - For previewing banners in browser
24+
25+
## File Output Location
26+
27+
All generated files should be saved to the `.skill-archive` directory:
28+
29+
```
30+
.skill-archive/banner-creator/<yyyy-mm-dd-summaryname>/
31+
```
32+
33+
**Example:**
34+
```
35+
.skill-archive/banner-creator/2026-01-19-opc-banner/
36+
banner-01.png
37+
banner-02.png
38+
...
39+
banner-03-cropped.png
40+
preview.html
41+
```
42+
43+
## Workflow
44+
45+
### Step 1: Discovery & Requirements
46+
47+
Before generating, gather requirements from user:
48+
49+
**Ask about:**
50+
1. **Purpose** - Where will the banner be used?
51+
- GitHub README
52+
- Twitter/X header
53+
- LinkedIn banner
54+
- Website hero
55+
- YouTube channel art
56+
57+
2. **Target ratio/size** - See [references/formats.md](./references/formats.md):
58+
- `2:1` (1280x640) - GitHub README
59+
- `3:1` (1500x500) - Twitter header
60+
- `16:9` (1920x1080) - Website hero
61+
62+
3. **Style preference**:
63+
- Match existing logo/brand?
64+
- Pixel art / 8-bit retro
65+
- Minimalist / flat design
66+
- Gradient / modern
67+
- Illustrated / artistic
68+
69+
4. **Content elements**:
70+
- Brand name / project name?
71+
- Tagline / slogan?
72+
- Logo character to include?
73+
74+
5. **Color preferences**:
75+
- Existing brand colors?
76+
- Let AI decide?
77+
78+
**Wait for user confirmation before proceeding!**
79+
80+
### Step 2: Generate Banner Variations
81+
82+
Generate 20 banner variations using `nano-banana-pro___generate_image`:
83+
84+
```
85+
nano-banana-pro___generate_image(
86+
prompt: "{style} banner for {brand}, {description}, {text elements}",
87+
aspectRatio: "21:9",
88+
fileName: "/path/to/.skill-archive/banner-creator/<date-name>/banner-01.png"
89+
)
90+
```
91+
92+
**Guidelines:**
93+
- Generate at `21:9` ratio (widest available), crop later to target
94+
- Generate in batches of 10 (API rate limit: 20/minute)
95+
- Wait 60 seconds between batches if hitting limits
96+
- Use sequential naming: `banner-01.png`, `banner-02.png`, etc.
97+
98+
**Character Consistency:**
99+
If incorporating an existing logo character, use the `image` parameter:
100+
```
101+
nano-banana-pro___generate_image(
102+
prompt: "...",
103+
aspectRatio: "21:9",
104+
image: "/path/to/existing-logo.png",
105+
fileName: "..."
106+
)
107+
```
108+
109+
### Step 3: Create HTML Preview
110+
111+
Copy the preview template and open in browser:
112+
113+
```bash
114+
cp <skill_dir>/templates/preview.html .skill-archive/banner-creator/<yyyy-mm-dd-summaryname>/preview.html
115+
```
116+
117+
Then use Chrome DevTools MCP to view:
118+
119+
```
120+
chrome-devtools___navigate_page(url: "file://.skill-archive/banner-creator/<yyyy-mm-dd-summaryname>/preview.html")
121+
chrome-devtools___take_screenshot(fullPage: true)
122+
```
123+
124+
**IMPORTANT:** Update the HTML to include the correct number of banners generated.
125+
126+
### Step 4: Iterate with User
127+
128+
Ask user which banners they prefer:
129+
- "Which banners do you like? (e.g., #3, #7, #15)"
130+
- "What do you like about them?"
131+
- "Any changes you'd want?"
132+
133+
Based on feedback:
134+
1. Generate 10-20 more variations of favorite styles
135+
2. Use naming: `banner-{original}-v{n}.png` (e.g., `banner-03-v1.png`)
136+
3. Update HTML preview
137+
4. Repeat until user selects final banner
138+
139+
### Step 5: Crop to Target Ratio
140+
141+
Once user approves a banner, crop to target size:
142+
143+
```bash
144+
python3 <skill_dir>/scripts/crop_banner.py {input.png} {output.png} --ratio 2:1 --width 1280
145+
```
146+
147+
**Common targets:**
148+
- GitHub README: `--ratio 2:1 --width 1280` → 1280x640
149+
- Twitter header: `--ratio 3:1 --width 1500` → 1500x500
150+
- Website hero: `--ratio 16:9 --width 1920` → 1920x1080
151+
152+
### Step 6: Deliver Final Assets
153+
154+
Present final deliverables:
155+
156+
```
157+
## Final Banner Assets
158+
159+
| File | Description | Size |
160+
|------|-------------|------|
161+
| banner-03.png | Original (21:9) | 2016x864 |
162+
| banner-03-cropped.png | GitHub README (2:1) | 1280x640 |
163+
164+
All files saved to: `.skill-archive/banner-creator/<yyyy-mm-dd-summaryname>/`
165+
Copy final banner to user's desired location.
166+
```
167+
168+
## Quick Reference
169+
170+
### Common Prompt Patterns
171+
172+
**With Text:**
173+
```
174+
Wide banner for {brand}, {style} style, featuring "{text}" prominently displayed, {colors}, {scene/elements}
175+
```
176+
177+
**With Character:**
178+
```
179+
Wide banner featuring {character description}, {style} style, {scene}, text "{brand name}" on {position}, {colors}
180+
```
181+
182+
**Abstract/Gradient:**
183+
```
184+
Abstract {style} banner, {colors} gradient, geometric patterns, modern tech feel, text "{brand}" centered
185+
```
186+
187+
**Scene-based:**
188+
```
189+
{Style} illustration banner, {scene description}, {character} in {action}, "{brand}" text overlay, {colors}
190+
```
191+
192+
### Aspect Ratios for nano-banana
193+
194+
Generate at widest ratio, then crop:
195+
- `21:9` - Ultra-wide (recommended for generation)
196+
- `16:9` - Wide
197+
- `3:2` - Standard wide
198+
199+
## References
200+
201+
- [references/formats.md](./references/formats.md) - Common banner sizes by platform
202+
- [examples/opc-banner-creation.md](./examples/opc-banner-creation.md) - Full example conversation
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Example: OPC Skills Banner Creation
2+
3+
This documents the actual banner creation process for opc.dev.
4+
5+
## Requirements Gathered
6+
7+
**Project:** OPC Skills (opc.dev)
8+
**Purpose:** GitHub README banner
9+
**Target size:** 1280×640 (2:1 ratio)
10+
**Style:** Pixel art, matching existing crowned king logo
11+
**Text:** "opc.dev" and "Agent Skills"
12+
**Character:** Pixel art crowned king from logo
13+
14+
## Generation Process
15+
16+
### Round 1: Initial 16:9 Banners
17+
18+
First generated 20 banners at 16:9 ratio with character consistency:
19+
20+
```
21+
nano-banana-pro___generate_image(
22+
prompt: "Wide pixel art banner featuring a pixel art crowned solopreneur king character,
23+
8-bit retro game style, the character is coding on a laptop with a golden crown,
24+
text 'opc.dev' prominently displayed, 'Agent Skills' as tagline,
25+
dark purple/blue gradient background with pixel stars",
26+
aspectRatio: "16:9",
27+
image: "/path/to/opc-logo.svg",
28+
fileName: ".skill-archive/banner-creator/2026-01-19-opc-banner/banner-01.png"
29+
)
30+
```
31+
32+
### Round 2: 2:1 GitHub Format
33+
34+
User noted GitHub banners work best at 2:1 ratio. Generated 20 more at 21:9 (widest available):
35+
36+
```
37+
nano-banana-pro___generate_image(
38+
prompt: "Ultra-wide pixel art banner, 8-bit retro game style,
39+
pixel crowned king character on the left side holding a laptop,
40+
'opc.dev' in large pixel font, 'Agent Skills' subtitle,
41+
gradient background from deep purple to blue, pixel art style throughout",
42+
aspectRatio: "21:9",
43+
image: "/path/to/opc-logo.svg",
44+
fileName: ".skill-archive/banner-creator/2026-01-19-opc-banner/banner-21-01.png"
45+
)
46+
```
47+
48+
### Cropping to 2:1
49+
50+
Cropped all 21:9 banners to 2:1 (1280×640):
51+
52+
```bash
53+
python3 scripts/crop_banner.py banner-21-01.png banner-21-01-cropped.png --ratio 2:1 --width 1280
54+
```
55+
56+
## User Selection
57+
58+
User selected **#03** from the cropped 2:1 banners:
59+
- Featured pixel crowned king with laptop
60+
- "opc.dev" text clearly visible
61+
- "Agent Skills" tagline included
62+
- Clean dark gradient background
63+
64+
## Final Deliverables
65+
66+
| File | Size | Description |
67+
|------|------|-------------|
68+
| banner-03.png | 2016×864 | Original 21:9 |
69+
| banner-03-cropped.png | 1280×640 | Final 2:1 GitHub banner |
70+
71+
## Integration
72+
73+
Banner was added to:
74+
1. `README.md` - Centered at top
75+
2. `website/worker.js` - Hero section with max-width: 560px
76+
77+
```markdown
78+
<!-- README.md -->
79+
<p align="center">
80+
<img src="website/opc-banner.png" alt="OPC Skills" width="640">
81+
</p>
82+
```
83+
84+
## Tips Learned
85+
86+
1. **Generate wider, crop narrower** - 21:9 gives flexibility to crop to any target
87+
2. **Character consistency** - Use `image` parameter to maintain logo character
88+
3. **Text placement** - Request text on specific side if cropping will occur
89+
4. **Multiple rounds** - First round explores styles, second round refines winner
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Banner Formats Reference
2+
3+
## Platform-Specific Sizes
4+
5+
| Platform | Size (px) | Ratio | Notes |
6+
|----------|-----------|-------|-------|
7+
| **GitHub README** | 1280×640 | 2:1 | Most common for project banners |
8+
| **Twitter/X Header** | 1500×500 | 3:1 | Profile header image |
9+
| **LinkedIn Banner** | 1584×396 | 4:1 | Personal profile background |
10+
| **LinkedIn Company** | 1128×191 | ~6:1 | Company page banner |
11+
| **YouTube Channel** | 2560×1440 | 16:9 | Channel art (safe area: 1546×423) |
12+
| **Facebook Cover** | 820×312 | ~2.6:1 | Personal profile |
13+
| **Discord Server** | 960×540 | 16:9 | Server banner |
14+
| **Website Hero** | 1920×1080 | 16:9 | Full-width hero section |
15+
| **Website Hero (tall)** | 1920×800 | 2.4:1 | Shorter hero section |
16+
| **Email Header** | 600×200 | 3:1 | Newsletter headers |
17+
| **Product Hunt** | 1270×760 | ~1.67:1 | Gallery images |
18+
19+
## Generation Strategy
20+
21+
Since `nano-banana-pro` supports these ratios:
22+
- `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`
23+
24+
**Recommended approach:**
25+
1. Generate at `21:9` (widest available)
26+
2. Crop to target ratio using `crop_banner.py`
27+
28+
This ensures:
29+
- Maximum flexibility for different platforms
30+
- Content centered properly
31+
- No stretching or distortion
32+
33+
## Ratio Quick Reference
34+
35+
```
36+
21:9 ████████████████████████████████ (ultra-wide, cinematic)
37+
16:9 ████████████████████████ (widescreen)
38+
3:1 ████████████████████████████████ (Twitter header)
39+
2:1 ████████████████ (GitHub README)
40+
4:1 ████████████████████████████████████████████ (LinkedIn)
41+
```
42+
43+
## File Size Guidelines
44+
45+
- **GitHub**: < 10MB, PNG or JPG
46+
- **Twitter**: < 5MB, PNG, JPG, or GIF
47+
- **LinkedIn**: < 8MB, PNG or JPG
48+
- **Website**: Optimize for web (< 500KB ideally)
49+
50+
## Tips
51+
52+
1. **Safe zones**: Keep important content (text, logo) in center 60% for platforms that crop on mobile
53+
2. **Text legibility**: Use high contrast, avoid small text
54+
3. **Brand consistency**: Match colors and style with existing logo
55+
4. **Mobile preview**: Check how banner looks on mobile (often cropped)

0 commit comments

Comments
 (0)