Skip to content

Commit 20bb36c

Browse files
committed
feat: SVG-first image generation and Gemini support (v0.5.0)
- Default provider changed from DALL-E to SVG - Add Gemini (Nano Banana) image generation support - Add dark mode support with theme switching - Add --provider flag to override provider - Add collapsible prompt display in README - Update documentation for v0.5.0 changes - Fix setup command reference in README
1 parent 386f6e5 commit 20bb36c

9 files changed

Lines changed: 834 additions & 307 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "github-social",
3-
"version": "0.4.0",
4-
"description": "Optimize GitHub repository presentation with social preview images and engaging metadata (descriptions, topics)",
3+
"version": "0.5.0",
4+
"description": "Optimize GitHub repository presentation with SVG/AI-generated social preview images, infographics, badges, and metadata",
55
"author": {
66
"name": "zircote"
77
},

CHANGELOG.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.5.0] - 2025-01-18
11+
12+
### Added
13+
14+
- **[social-preview]**: SVG generation as default provider (free, instant, editable)
15+
- Claude generates clean SVG graphics directly - no external API needed
16+
- Three SVG styles: `minimal` (default), `geometric`, `illustrated`
17+
- Domain-specific color palettes (DevTools, AI/ML, Web, Data, Security, Infrastructure, Plugin)
18+
- New reference file: `references/svg-templates.md` with complete templates by domain
19+
- Example configuration: `examples/config-svg.md`
20+
- **[social-preview]**: Google Gemini (Nano Banana) image generation support
21+
- Models: `gemini-2.5-flash-image` (fast), `gemini-3-pro-image-preview` (quality)
22+
- Lower cost than DALL-E (~$0.039/image vs ~$0.08/image)
23+
- Example configuration: `examples/config-gemini.md`
24+
- **[social-preview]**: Dark mode support with `<picture>` element for theme switching
25+
- Config option: `dark_mode: false | true | both`
26+
- Generates light and dark SVG variants when set to `both`
27+
- **[readme-enhance]**: Collapsible prompt display pattern
28+
- Shows generation prompt in `<details>` section below infographic
29+
- Follows NotebookLM-style documentation pattern
30+
- **[readme-enhance]**: SVG infographic generation as default
31+
- New reference file: `references/svg-infographic-patterns.md` with layout templates
32+
33+
### Changed
34+
35+
- **[social-preview]**: Default provider changed from DALL-E to SVG
36+
- **[commands]**: Added `--provider` flag to override provider (svg, dalle-3, gemini, manual)
37+
- **[commands]**: Added `--dark-mode` flag for dark mode variant generation
38+
- Updated plugin description to reflect SVG-first approach
39+
- Updated plugin version to 0.5.0
40+
1041
## [0.4.0] - 2025-01-18
1142

1243
### Added
@@ -73,7 +104,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
73104
- Configuration via `.claude/github-social.local.md` with YAML frontmatter
74105
- MIT License
75106

76-
[Unreleased]: https://github.com/zircote/github-social/compare/v0.4.0...HEAD
107+
[Unreleased]: https://github.com/zircote/github-social/compare/v0.5.0...HEAD
108+
[0.5.0]: https://github.com/zircote/github-social/compare/v0.4.0...v0.5.0
77109
[0.4.0]: https://github.com/zircote/github-social/compare/v0.3.0...v0.4.0
78110
[0.3.0]: https://github.com/zircote/github-social/compare/v0.2.0...v0.3.0
79111
[0.2.0]: https://github.com/zircote/github-social/compare/v0.1.0...v0.2.0

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)
44
[![Claude Code Plugin](https://img.shields.io/badge/Claude%20Code-Plugin-blueviolet?style=for-the-badge&logo=anthropic&logoColor=white)](https://claude.ai/code)
5-
[![Version](https://img.shields.io/badge/version-0.4.0-green.svg?style=for-the-badge)](.claude-plugin/plugin.json)
5+
[![Version](https://img.shields.io/badge/version-0.5.0-green.svg?style=for-the-badge)](.claude-plugin/plugin.json)
66
[![GitHub Stars](https://img.shields.io/github/stars/zircote/github-social?style=for-the-badge&logo=github)](https://github.com/zircote/github-social/stargazers)
77
[![GitHub Issues](https://img.shields.io/github/issues/zircote/github-social?style=for-the-badge&logo=github)](https://github.com/zircote/github-social/issues)
88
[![Last Commit](https://img.shields.io/github/last-commit/zircote/github-social?style=for-the-badge&logo=github)](https://github.com/zircote/github-social/commits)
@@ -18,8 +18,9 @@ A Claude Code plugin that optimizes GitHub repository presentation by analyzing
1818

1919
### Social Preview Images
2020
- Analyzes project files (README, package.json, CLAUDE.md, etc.) to understand purpose
21-
- Generates detailed image prompts capturing the project's spirit
22-
- Supports multiple image generation providers (DALL-E, Stable Diffusion, etc.)
21+
- **SVG generation by default** - Free, instant, editable vector graphics
22+
- Supports multiple providers: SVG (default), DALL-E 3, Gemini, or manual prompts
23+
- Dark mode support with automatic theme switching
2324
- Outputs images meeting GitHub's social preview requirements (1280x640px, <1MB)
2425

2526
### Repository Metadata
@@ -58,14 +59,14 @@ Or use the command:
5859
/social-preview
5960
```
6061

61-
Without configuration, the plugin outputs a detailed image prompt you can use with your preferred image generation tool.
62+
Without configuration, the plugin generates a clean SVG image directly. Use `--provider=manual` to output a text prompt instead.
6263

6364
### With Configuration (Optional)
6465

6566
Run the setup command to configure your preferences:
6667

6768
```
68-
/social-preview:setup
69+
/github-social:setup
6970
```
7071

7172
This creates `.claude/github-social.local.md` with your settings.
@@ -76,40 +77,41 @@ Create `.claude/github-social.local.md` with YAML frontmatter:
7677

7778
```yaml
7879
---
79-
provider: dalle-3 # dalle-3 | stable-diffusion | midjourney | manual
80-
api_key_env: OPENAI_API_KEY # Environment variable name (NOT the key itself)
81-
style: abstract # abstract | illustrated | minimalist | custom
82-
output_path: .github/social-preview.png
80+
provider: svg # svg (default) | dalle-3 | gemini | manual
81+
svg_style: minimal # minimal | geometric | illustrated (for SVG provider)
82+
dark_mode: false # false | true | both (generate both variants)
83+
api_key_env: OPENAI_API_KEY # For dalle-3; use GEMINI_API_KEY for gemini
84+
output_path: .github/social-preview.svg
8385
dimensions: 1280x640 # Recommended for GitHub
8486
include_text: true # Include project name in image
87+
upload_to_repo: false # Auto-upload to GitHub repository
8588
---
8689

8790
# Optional: Additional brand guidelines or context
8891
```
8992

9093
### Supported Providers
9194

92-
| Provider | Requirements | Notes |
93-
|----------|-------------|-------|
94-
| `dalle-3` | `OPENAI_API_KEY` env var | Best quality, requires OpenAI API |
95-
| `stable-diffusion` | Local SD installation or API | Flexible, various backends |
96-
| `midjourney` | Manual process | Plugin outputs optimized prompt |
97-
| `manual` | None | Outputs prompt only |
95+
| Provider | Requirements | Cost | Notes |
96+
|----------|-------------|------|-------|
97+
| `svg` (default) | None | Free | Claude generates clean SVG graphics directly |
98+
| `dalle-3` | `OPENAI_API_KEY` env var | ~$0.08/image | Artistic, creative AI images |
99+
| `gemini` | `GEMINI_API_KEY` env var | ~$0.039/image | Google's image generation |
100+
| `manual` | None | Free | Outputs optimized prompt only |
98101

99-
### Style Options
102+
### SVG Style Options
100103

101-
- **abstract**: Clean geometric shapes, gradients, tech-inspired patterns
102-
- **illustrated**: Hand-drawn style, artistic representations
103-
- **minimalist**: Simple design with project name and subtle elements
104-
- **custom**: Specify your own style in `custom_style` field
104+
- **minimal** (default): Clean design with 3-5 shapes, generous whitespace
105+
- **geometric**: Complex arrangements with 8-15 shapes representing domain metaphors
106+
- **illustrated**: Organic paths with hand-drawn aesthetic and warm colors
105107

106108
## GitHub Requirements
107109

108110
Social preview images must meet these requirements:
109111
- **Minimum size**: 640x320 pixels
110112
- **Recommended size**: 1280x640 pixels (2:1 aspect ratio)
111113
- **Maximum file size**: 1MB
112-
- **Supported formats**: PNG, JPG, GIF
114+
- **Supported formats**: SVG, PNG, JPG, GIF
113115

114116
## Example Output
115117

commands/all.md

Lines changed: 58 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
name: all
33
description: Run all github-social skills in sequence - metadata, social preview, and README enhancement
4-
argument-hint: "[--apply] [--dry-run] [--skip-badges] [--skip-infographic]"
5-
allowed-tools: ["Read", "Write", "Edit", "Glob", "Grep", "Bash", "MCPSearch"]
4+
argument-hint: "[--apply] [--dry-run] [--provider svg|dalle-3|gemini|manual] [--skip-badges] [--skip-infographic] [--dark-mode]"
5+
allowed-tools: ["Read", "Write", "Edit", "Glob", "Grep", "Bash", "MCPSearch", "mcp__github__create_or_update_file"]
66
---
77

88
# Complete GitHub Social Enhancement
99

1010
Run all github-social skills in sequence to fully optimize a repository's presentation:
1111

1212
1. **repo-metadata**: Generate optimized description and topics
13-
2. **social-preview**: Generate social preview image
13+
2. **social-preview**: Generate social preview image (SVG by default)
1414
3. **readme-enhance**: Add badges and infographic to README
1515

1616
## Execution Steps
@@ -20,19 +20,25 @@ Run all github-social skills in sequence to fully optimize a repository's presen
2020
Handle optional flags:
2121
- `--apply`: Apply all changes (update GitHub metadata, modify README, upload images)
2222
- `--dry-run`: Preview all changes without applying any
23+
- `--provider [value]`: Override image provider for both social preview and infographic (svg, dalle-3, gemini)
2324
- `--skip-badges`: Skip badge generation in README enhancement
2425
- `--skip-infographic`: Skip infographic generation
26+
- `--dark-mode`: Generate dark mode variants for images
2527

26-
Default behavior: Generate and preview, prompt before applying.
28+
Default behavior: Generate SVG images, preview changes, prompt before applying.
2729

2830
### 2. Load Configuration
2931

3032
Read `.claude/github-social.local.md` for all skill settings:
31-
- Social preview provider and style
33+
- `provider`: svg (default), dalle-3, gemini, manual
34+
- `svg_style`: minimal (default), geometric, illustrated
35+
- `dark_mode`: false (default), true, both
3236
- Badge style preferences
3337
- Infographic style preferences
3438
- Upload settings
3539

40+
Command-line flags override configuration.
41+
3642
### 3. Analyze Project (Shared)
3743

3844
Perform comprehensive project analysis once, reuse across all skills:
@@ -42,6 +48,7 @@ Perform comprehensive project analysis once, reuse across all skills:
4248
3. Identify:
4349
- Project name and version
4450
- Purpose and key features
51+
- Domain (DevTools, AI, Web, Data, Security, Infrastructure, Plugin)
4552
- Primary language and frameworks
4653
- CI/CD configuration
4754
- License type
@@ -60,21 +67,29 @@ Output preview of changes.
6067

6168
#### Step 4b: Social Preview Image
6269

63-
Generate social preview:
64-
- Create image prompt based on project analysis
65-
- If provider configured, generate actual image
66-
- Save to configured output path (default: `.github/social-preview.png`)
70+
Generate social preview based on provider:
71+
72+
**SVG (default)**:
73+
- Generate clean SVG using domain templates
74+
- Save to `.github/social-preview.svg`
75+
- If `--dark-mode`, generate dark variant
6776

68-
Output the image prompt (and image location if generated).
77+
**DALL-E 3 / Gemini**:
78+
- Generate optimized image prompt
79+
- Call API and save PNG
80+
- Save to `.github/social-preview.png`
81+
82+
Output the generated file location (or prompt if manual).
6983

7084
#### Step 4c: README Enhancement
7185

7286
Unless `--skip-badges` and `--skip-infographic` both set:
7387
- Generate shields.io badges (unless `--skip-badges`)
74-
- Generate infographic prompt (unless `--skip-infographic`)
88+
- Generate infographic SVG/image (unless `--skip-infographic`)
89+
- Add collapsible prompt display section
7590
- Prepare README.md updates
7691

77-
Output badge set and infographic prompt.
92+
Output badge set and infographic location.
7893

7994
### 5. Present Summary
8095

@@ -88,13 +103,15 @@ Display complete summary:
88103
- Topics: topic-1, topic-2, topic-3, ...
89104
90105
### Social Preview
91-
- Image prompt generated
92-
- Output: .github/social-preview.png
93-
- [Generated/Pending generation]
106+
- Provider: svg (default)
107+
- Output: .github/social-preview.svg
108+
- Size: X KB
109+
- [Generated/Pending]
94110
95111
### README Enhancement
96112
- Badges: X badges generated
97-
- Infographic: Prompt ready
113+
- Infographic: .github/readme-infographic.svg
114+
- Dark mode: [yes/no]
98115
- README changes: [Preview/Applied]
99116
100117
### Next Steps
@@ -111,22 +128,31 @@ If `--apply` flag or user confirms:
111128
gh repo edit --add-topic topic-1 --add-topic topic-2 ...
112129
```
113130

114-
2. **Generate and upload social preview** (if provider configured):
115-
- Generate image via configured provider
131+
2. **Save/upload social preview**:
132+
- Write SVG/PNG to output path
116133
- Upload to repository if `upload_to_repo: true`
117134

118135
3. **Update README.md**:
119136
- Insert/update badge section
120-
- Add infographic placeholder/image
137+
- Add infographic with prompt display section
138+
- If dark mode, use `<picture>` element for theme switching
121139

122140
4. **Report results**:
123141
- Confirm each step completed
124142
- Provide GitHub settings links for manual steps
125143

144+
## Provider Comparison
145+
146+
| Provider | Social Preview | Infographic | Cost | Speed |
147+
|----------|---------------|-------------|------|-------|
148+
| **svg** (default) | SVG file | SVG file | Free | Instant |
149+
| **dalle-3** | PNG image | PNG image | ~$0.16 | 10-30s |
150+
| **gemini** | PNG image | PNG image | ~$0.08 | 6-20s |
151+
126152
## Example Usage
127153

128154
```bash
129-
# Preview all enhancements
155+
# Preview all enhancements (SVG default)
130156
/github-social:all
131157

132158
# Apply all changes automatically
@@ -135,6 +161,15 @@ If `--apply` flag or user confirms:
135161
# Dry run to see what would change
136162
/github-social:all --dry-run
137163

164+
# Use DALL-E for artistic images
165+
/github-social:all --provider=dalle-3 --apply
166+
167+
# Use Gemini for image generation
168+
/github-social:all --provider=gemini --apply
169+
170+
# Generate with dark mode support
171+
/github-social:all --dark-mode --apply
172+
138173
# Skip certain features
139174
/github-social:all --apply --skip-infographic
140175
/github-social:all --apply --skip-badges
@@ -143,10 +178,11 @@ If `--apply` flag or user confirms:
143178
## Tips
144179

145180
- Run without `--apply` first to review changes
181+
- SVG generation is free and instant (recommended default)
146182
- Ensure `gh` CLI is authenticated for metadata updates
147-
- Configure `.claude/github-social.local.md` for image generation
183+
- Configure `.claude/github-social.local.md` for custom settings
148184
- Social preview requires manual GitHub settings update after upload
149-
- Use `--dry-run` to safely preview all changes
185+
- Use `--dark-mode` for repositories viewed in both themes
150186

151187
## Related Commands
152188

0 commit comments

Comments
 (0)