---
name: job:cv
description: Regenerate your CV. Knows your full profile, stack, and experience. Adapts the CV for a specific vacancy or context if provided, or refreshes the base version. Invoke when you ask to update, adapt, or regenerate the CV.
argument-hint: "[vacancy description or company name, optional]"
user-invocable: true
disable-model-invocation: false
allowed-tools: Bash(cat *), Bash(open *), Bash(cp *), Bash(ls *), Bash("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" *)
---

# CV Generator

## Who You Are

<!-- Fill in your profile. This is used to adapt bullets and summary for each role. -->

**Your Name** — Senior [Role], [N]+ years, based in [City, Country] (UTC[offset]).

**Core stack:** [e.g. TypeScript, Node.js, NestJS, Fastify, React, Next.js, Prisma, PostgreSQL]
**AI/agents:** [e.g. Mastra, OpenAI, RAG pipelines, pgvector, LangChain — if applicable]
**Mobile/platforms:** [e.g. React Native, Telegram Mini Apps — if applicable]
**DevOps:** [e.g. Docker, GitHub Actions, AWS]
**English:** [level]. **Location:** [city], remote only.

**Current role:** [Company] ([Start]–present) — [brief product description].
Stack: [tech stack].

**Previous roles:**
- [Company] ([dates]): [one-line description]
- [Company] ([dates]): [one-line description]
- [Company] ([dates]): [one-line description]

## CV Files

- **HTML source (canonical):** `~/.claude/skills/job-cv/history/` — always use the latest `*.html` in history as source of truth.
- **Working copy:** `/tmp/cv.html` — write here before generating PDF
- **PDF output:** `~/Documents/CVs/YYYY-MM-DD_NN_YourName.pdf` — date + sequence number for today (01, 02…), sortable
- **History archive:** `~/.claude/skills/job-cv/history/`

## History naming convention

`YYYY-MM-DD_<context>.html` — where `<context>` is either `base` (no target company) or a slug of the company/role (e.g. `stripe`, `nango-backend`).

```bash
ls -lt ~/.claude/skills/job-cv/history/
```

## How to regenerate PDF

⚠️ **Do NOT use `file://` URLs with Chrome headless** — Chrome sandbox blocks local file access and silently renders an error page (~23KB PDF).

**Correct workflow:**
1. Write HTML to `/tmp/cv.html` using the Write tool
2. Serve via Python HTTP server from `/tmp`
3. Chrome headless fetches from `localhost`
4. Copy PDF to output folder

```bash
pkill -f "http.server" 2>/dev/null; sleep 1
cd /tmp && python3 -m http.server 9292 &
sleep 1
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --headless=new --disable-gpu \
  --no-margins --no-pdf-header-footer \
  --print-to-pdf="/tmp/cv_out.pdf" \
  "http://localhost:9292/cv.html" 2>&1 | tail -3
kill %1 2>/dev/null
DATE=$(date +%Y-%m-%d)
N=$(ls ~/Documents/CVs/${DATE}_*.pdf 2>/dev/null | wc -l | tr -d ' ')
N=$(printf "%02d" $((N + 1)))
OUTFILE=~/Documents/CVs/${DATE}_${N}_YourName.pdf
cp /tmp/cv_out.pdf "$OUTFILE"
cp /tmp/cv_out.pdf ~/Desktop/${DATE}_${N}_YourName.pdf
open -a Preview "$OUTFILE"
```

A valid PDF is ~150KB+. If output is ~23KB it's still an error page.

## Instructions

1. **Read the latest HTML** from history: `ls -lt ~/.claude/skills/job-cv/history/` → read the newest file.
2. **Archive before edits:** save current HTML to history as `YYYY-MM-DD_<context>.html` using the Write tool.
3. **Edit the HTML** (Write tool to `/tmp/cv.html`):
   - **Summary**: rewrite to match the company's vibe and keywords from their JD
   - **Skills section**: surface the most relevant technologies first, add keywords from JD naturally
   - **Bullets**: keep all real content, only reorder emphasis — never invent metrics or facts
4. If no arguments — user wants to update/refresh the base CV. Ask what changed.
5. **Never fabricate metrics or details.** Only use information confirmed by the user or verifiable from the project.
6. After editing, regenerate the PDF using the workflow above and open it in Preview.
7. Show the user what changed (diff summary, not the full HTML).

## CV style rules

- Bold only outcomes and scale (e.g. **1M+ MAU**, **all** interns promoted) — not tech keywords
- No build tooling in bullets (Turborepo, pnpm workspaces — too narrow)
- Keep real tech depth: PostgreSQL, Redis, SSE, Prisma ORM, Supabase — these are real experience worth keeping
- No LLM model version strings in CV (write "OpenAI" or "LLMs", never "GPT-4" / "GPT-4o")
- "Maintained and extended" not "Shipped" if you inherited a running service
