$npx -y skills add Varnan-Tech/opendirectory --skill blog-cover-image-cliUse when the user asks to generate a blog cover image, thumbnail, or article header. Automatically uses modern typography, brand logos, and Google Search grounding to create beautiful 16:9 images with Gemini 3.1 Flash Image Preview.
| 1 | # Blog Cover Generator Skill |
| 2 | |
| 3 | This skill provides AI agents with the ability to generate stunning, minimalist, technical blog cover images using the `blog-cover-image-cli`. The CLI leverages Gemini 3.1 Flash Image Preview, automatically fetches brand logos from domains, uses local aesthetic reference images, and employs Google Search grounding to inject real-time context. |
| 4 | |
| 5 | ## Setup & Configuration |
| 6 | |
| 7 | **Agent Pre-requisites:** |
| 8 | Before using this tool, verify it is installed. If `blog-cover-cli --help` fails, install it globally: |
| 9 | ```bash |
| 10 | npm install -g blog-cover-image-cli |
| 11 | ``` |
| 12 | |
| 13 | If the user wants you to generate an image and you haven't set up the API key yet, you must first configure the CLI using a Gemini API Key. The CLI stores this securely via the `conf` package. |
| 14 | |
| 15 | ```bash |
| 16 | # 1. Set your Gemini API Key (Required for image generation) |
| 17 | npx -p blog-cover-image-cli blog-cover-cli config set-key <YOUR_GEMINI_API_KEY> |
| 18 | |
| 19 | # 2. Set your Brandfetch Client ID (Required to fetch high-res logos) |
| 20 | npx -p blog-cover-image-cli blog-cover-cli config set-brandfetch-id <YOUR_BRANDFETCH_CLIENT_ID> |
| 21 | |
| 22 | # Check your keys (masked) |
| 23 | npx -p blog-cover-image-cli blog-cover-cli config get-key |
| 24 | npx -p blog-cover-image-cli blog-cover-cli config get-brandfetch-id |
| 25 | ``` |
| 26 | |
| 27 | ## Usage: Generating an Image |
| 28 | |
| 29 | When a user asks for a cover image (e.g., "Create a cover image for my blog about Vercel v0"), you should use the `generate` command. |
| 30 | |
| 31 | ```bash |
| 32 | npx -p blog-cover-image-cli blog-cover-cli generate -t "The Title of the Blog Post" -l "example.com" |
| 33 | ``` |
| 34 | |
| 35 | ### Arguments |
| 36 | - `-t, --title <text>`: **(Required)** The title text to display on the cover image. Do not use excessively long titles (keep it under 3 lines of text visually). |
| 37 | - `-l, --logo <domain>`: **(Optional but recommended)** The domain to fetch the brand logo from (e.g., `vercel.com`, `google.com`, `cursor.com`). The CLI automatically converts WebP/SVG/AVIF to PNG for compatibility. |
| 38 | - `-o, --output <path>`: **(Optional)** The file path where the generated image will be saved. If omitted, the CLI automatically saves it to an `output/` directory in the current working folder (e.g., `./output/vercel-cover.png`). |
| 39 | |
| 40 | ### Examples |
| 41 | |
| 42 | **Example 1: Cursor** |
| 43 | ```bash |
| 44 | npx -p blog-cover-image-cli blog-cover-cli generate -t "Why Cursor is the Ultimate AI Code Editor" -l "cursor.com" |
| 45 | ``` |
| 46 | |
| 47 | **Example 2: Lovable** |
| 48 | ```bash |
| 49 | npx -p blog-cover-image-cli blog-cover-cli generate -t "Building Apps in Minutes with Lovable" -l "lovable.dev" |
| 50 | ``` |
| 51 | |
| 52 | **Example 3: Custom Output Path** |
| 53 | ```bash |
| 54 | npx -p blog-cover-image-cli blog-cover-cli generate -t "Mastering React in 2026" -l "reactjs.org" -o "./assets/react-cover.png" |
| 55 | ``` |
| 56 | |
| 57 | ## How It Works Under the Hood |
| 58 | As an agent, you should know what the CLI is doing so you can inform the user: |
| 59 | 1. **Logo Fetching**: It fetches logos from `Brandfetch` and processes them via `sharp`. |
| 60 | 2. **References**: It loads curated reference images from its `examples/` directory to ensure the output is always a clean, minimalist white background with bold typography. |
| 61 | 3. **Grounding**: It has `googleSearch` tools enabled, meaning if the title relates to a recent event, Gemini can look it up before generating the image. |
| 62 | 4. **Text Enforcement**: It forces Gemini to output the exact title string using typographic placement rules. |
| 63 | |
| 64 | ## Edge Cases / Troubleshooting |
| 65 | - **No API Key Error**: If you see an API key error, run the `config set-key` command. |
| 66 | - **Logo Fetch Warning**: If the CLI says `Warning: Could not fetch logo`, it will still generate the image but without the logo. You do not need to crash or stop. |
| 67 | - **Strict Modality Limits**: Because it uses Gemini's experimental image models, generation may occasionally fail due to strict safety filters. If this happens, notify the user. |