Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"amigoscode",
"explainer-video",
"video",
"hyperframes"
"hyperframes",
"headshots",
"profile-picture",
"portrait"
]
}
2 changes: 2 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Current versions of all skills. Agents can compare against local versions to che
| x-card | 1.0.0 | 2026-06-23 | Generate a dark-mode X (Twitter) style quote card (1080x1350 PNG) with profile photo, blue tick, name, handle, and stats, plus a LinkedIn caption. |
| linkedin-poster | 1.0.0 | 2026-06-23 | Fully autonomous LinkedIn poster that publishes immediately or schedules text, carousel, or image posts via Playwright. |
| nanobanana | 1.0.0 | 2026-06-27 | Generate and edit images with Google's Gemini 3.1 Flash Image model: text-to-image, single-image edits, style transfer, and multi-image compositing. |
| headshots | 1.0.0 | 2026-06-27 | Generate polished LinkedIn-style profile-picture variations from one reference photo, preserving the person's identity. Picks styles via checkbox, fans out one subagent per style. Self-contained Gemini generator. |

## Recent Changes

### 2026-06-27
- Added `headshots` skill: LinkedIn-style profile-picture variations from a reference photo (10 styles, checkbox selection, one subagent per style, self-contained Gemini generator)
- Added `nanobanana` skill: AI image generation and editing via Gemini 3.1 Flash Image (text-to-image, edits, style transfer, multi-image compositing)

### 2026-06-24
Expand Down
5 changes: 5 additions & 0 deletions skills/headshots/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Optional: this skill also reads ~/amigoscode-skills/.env (shared across
# Amigoscode skills) and the shell environment. Any one of them works.
# Copy this file to .env and add your key, or export GEMINI_API_KEY instead.
# Get a key at https://aistudio.google.com/apikey
GEMINI_API_KEY=your-gemini-api-key-here
93 changes: 93 additions & 0 deletions skills/headshots/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: headshots
description: "Generate polished LinkedIn-style profile-picture variations from a single reference photo, while keeping the person's face and identity intact. Self-contained (bundles its own Gemini image generator). Use this skill whenever the user provides a reference photo (a LinkedIn CDN URL, Skool URL, GitHub avatar, any image URL, or a local file path) and wants professional headshots, profile pictures, or portraits. Trigger on: 'linkedin variations', 'linkedin headshot', 'profile pic for [name]', 'professional portraits of [person]', 'headshots from this photo', 'do the linkedin thing for [URL]', 'generate variations of [URL]', 'do the same for [URL]'. Even if the user just pastes a photo URL and a name and says 'make these professional', this skill applies. For general image edits use the nanobanana skill; for HOW-X-WORKS diagrams use the infographic skill."
---

# Headshots — LinkedIn Profile-Picture Variations

Turn one reference photo into a set of polished, professional LinkedIn portraits in different styles (studio, boardroom, editorial, B&W, and more), each preserving the subject's exact face and identity. The reference is fetched once, then each style is generated by its own subagent in parallel, each calling the bundled `run.sh` (which wraps the skill's own `scripts/edit.ts` Gemini generator). The skill is self-contained: no other skill needs to be installed.

Output always goes to `~/amigoscode-skills/headshots/` (the shared Amigoscode skills folder), named `<name>-<n>-<slug>.jpg`.

## CRITICAL: never Read the generated images

Do **NOT** use the Read tool on any image file (the reference or the outputs). Reading binary images sends their bytes to the Claude API and corrupts the request. Refer to images by **file path only**. The run script already prints every output path, so you never need to open them.

## Prerequisites

- **Node.js** with `npx`. The first `fetch` runs `npm install` in the skill folder automatically (installs the bundled generator's deps).
- A **`GEMINI_API_KEY`**. The bundled generator resolves it from, in order: the shell environment, the shared `~/amigoscode-skills/.env` (used across Amigoscode skills), then this skill's own `.env` (copy `.env.example`). Get a key at https://aistudio.google.com/apikey. If a run fails with `GEMINI_API_KEY ... not set`, set it one of those ways and retry.

## Workflow

### Step 1: Resolve the subject

You need two things from the user:
- **source**: the reference photo. A URL (LinkedIn/Skool/GitHub/any image link) or a local file path.
- **name**: a short kebab-case label for the person (e.g. `ricardo`, `thays`). Used in filenames. If the user did not give a name, derive an obvious one from context and confirm it is fine.

Do not download anything yourself. `run.sh` handles fetching and validating the photo.

### Step 2: Ask which styles (checkbox)

Let the user choose the styles instead of guessing. Call the **Ask tool once** with these three **multi-select** questions. The user ticks any combination across the groups; ticking everything means all ten. The slug in parentheses is what you pass to `run.sh` (do not show slugs to the user, they are for you).

- **Studio & office**: Studio headshot (`studio`), Tech workspace (`workspace`), High-key keynote (`keynote`), Executive boardroom (`boardroom`)
- **Editorial & dramatic**: Outdoor editorial / founder (`editorial`), Monochrome B&W (`bw`), Urban rooftop sunset (`rooftop`)
- **Formal & lifestyle**: Formal executive suit (`suit`), Natural lifestyle outdoor (`lifestyle`), Intellectual library (`library`)

Map the selected labels back to their slugs. If the user selected all ten (or said "all" / "every style"), use `--all` instead of listing slugs.

The full style descriptions live in `prompts.json` if you need to describe one to the user.

### Step 3: Fetch the reference once

Download and validate the photo a single time, so the parallel agents in Step 4 all share one local file (no duplicate downloads, no race):

```bash
bash ~/.claude/skills/headshots/run.sh fetch --source "<url-or-path>" --name "<kebab-name>"
```

The command prints the resolved reference path on the last stdout line. Capture it as `<REF>`. If it errors (expired link, not an image), handle it per **Edge cases** below before continuing.

### Step 4: Generate — one agent per style

Generate each selected style in its **own subagent**, so they run concurrently and a failure in one does not block the others. **Dispatch all of them in a single message** so they run in parallel.

Give each agent this task (substitute the slug, the captured `<REF>`, the name, and any `--smile` / `--background <color>` flags the user asked for):

> Run exactly this command and nothing else:
> `bash ~/.claude/skills/headshots/run.sh one --ref "<REF>" --name "<name>" --style <slug>`
> It generates one portrait and prints the saved image path on the last line. Report back that path, or the error if it failed. **Do NOT use the Read tool on any image file** — reading image bytes corrupts the API. Refer to images by path only.

Optional add-ons (append to the command for every agent when the user asked for them):
- `--smile` — force a genuine warm smile (friendlier look).
- `--background <color>` — saturated single-colour studio backdrop with a halo, e.g. `--background purple`.

### Step 5: Deliver

Collect the path each agent reports and present a table (style → file path), plus the output folder `~/amigoscode-skills/headshots/`. Do not open or Read the images to "check" them — trust the paths the agents returned.

## Edge cases

- **URL expired (404/403)**: the script stops with a clear message. Tell the user the link expired and ask for a fresh URL (LinkedIn/Skool CDN links are short-lived).
- **Reference already downloaded**: the script reuses `~/amigoscode-skills/headshots/<name>-reference.*` and skips re-downloading. To force a fresh photo, delete that file first.
- **A single variation fails** (e.g. `Edit failed: ENOENT`): the reference may have moved. Re-run `fetch`, then dispatch a fresh agent for just that style (`run.sh one --style <slug>`).
- **"Give me N more" / "more variations"**: ask which additional styles (Step 2) and dispatch agents for only those slugs. Filenames are keyed to the style number, so they will not collide with the existing ones.

## Style catalog

| # | slug | look |
|---|------|------|
| 1 | studio | Studio headshot — navy crewneck, soft grey backdrop, three-point light |
| 2 | workspace | Tech workspace — merino/button-down, blurred office bokeh, window light |
| 3 | editorial | Outdoor founder — zip-neck knit, urban architecture, golden hour, 85mm |
| 4 | bw | Monochrome B&W — black turtleneck, Rembrandt key, film grain |
| 5 | keynote | High-key keynote — light blazer, creamy backdrop, optimistic smile |
| 6 | boardroom | Executive boardroom — navy blazer, skyline windows, warm interior |
| 7 | suit | Formal suit — tailored charcoal/navy, open collar, C-suite vibe |
| 8 | lifestyle | Lifestyle outdoor — cardigan over tee, blurred greenery, warm smile |
| 9 | rooftop | Rooftop sunset — dark blazer, golden-hour skyline, cinematic grade |
| 10 | library | Intellectual library — camel blazer, warm bookshelves, thoughtful |

Every prompt preserves the subject's exact face, hair, skin tone, and eye colour, and renders a photorealistic, head-and-shoulders, square 1:1 portrait. The prompt assembly (shared prefix/suffix, smile and background add-ons) is defined in `prompts.json`.
Loading
Loading