Skip to content

vidya-hub/resume-tailor-extension

Repository files navigation

Resume Tailor (OpenCode + Copilot)

Chrome extension that tailors Vidya Sagar's LaTeX resume to any job posting. All LLM traffic is routed through a local opencode serve instance and runs inside one persistent opencode session - the session id is never rotated unless you explicitly click "New session".

How it works

Chrome extension                  opencode serve (localhost:4096)
─────────────────                 ──────────────────────────────
  jobScrapper.ts ──▶ extract JD ──▶ POST /session/<id>/message
  background  ──▶ tailor + cover  ─▶ resume-tailor agent
              ──▶ match score     ─▶ xelatex + cat heredoc
                                  ─▶ writes ~/Documents/Tailored-Resumes/
                                          <Company>-<Role>/
                                          vidya_sagar_resume.{tex,pdf}

Every request the extension sends - JD extraction, resume tailoring, cover letter, match score, knowledge-file reads - uses the same opencode session id stored in chrome.storage.local[opencodeSessionId]. This lets you watch the full conversation in the opencode TUI in parallel.

One-time setup

1. Configure opencode

# Sign in to GitHub Copilot if you haven't already.
opencode auth login    # pick "GitHub Copilot"

The resume-tailor agent was created at ~/.config/opencode/agent/resume-tailor.md. It is locked to:

  • model: github-copilot/claude-sonnet-4.6
  • read: ~/Documents/Tailored-Resumes/**, ~/vidya_sagar_resume.tex
  • bash: mkdir, cat > *.tex|md|json, xelatex *
  • everything else: denied

2. Run opencode serve

OPENCODE_SERVER_PASSWORD=your-password \
opencode serve --hostname 127.0.0.1 --port 4096 \
  --cors 'chrome-extension://*'

Leave this running. The extension will reach it over HTTP basic auth.

3. Load the extension

pnpm install
pnpm build

In Chrome:

  1. chrome://extensions → enable Developer mode
  2. Load unpacked → select build/chrome-mv3-prod

4. Configure the extension

Open the options page (right-click the toolbar icon → Options) and:

  1. Connection tab → fill in URL + password → click Test connection
  2. Once green → click Refresh models → pick the tailor + extract models
  3. Click New session → this is the persistent session id used forever after
  4. Profile tab → click Open importer → paste ~/vidya_sagar_resume.tex
  5. Knowledge tab → click Load contents → confirm both knowledge files exist (edit them in your editor when you want to update bio / latest work)

Daily flow

  1. Browse to a job posting (LinkedIn, Indeed, Greenhouse, Lever, Workday, Wellfound, Naukri, Glassdoor, or any page).
  2. Click the toolbar icon → Tailor resume for this page (or right-click → Tailor resume for this job).
  3. Review the extracted company / role / JD in the dialog.
  4. Click Tailor & compile resume.
  5. PDF lands at ~/Documents/Tailored-Resumes/<Company>-<Role>/vidya_sagar_resume.pdf.

Knowledge files

The agent reads these on every run; edit them as your career progresses:

~/Documents/Tailored-Resumes/
├── _knowledge/
│   ├── about-me.md          # bio + tone (used for Summary section)
│   └── latest-updates.md    # recent achievements (newest at the top)
├── _template/
│   └── preamble.tex         # your resume.tex as the canonical template
└── <Company>-<Role>/        # one folder per tailored resume
    ├── vidya_sagar_resume.tex
    ├── vidya_sagar_resume.pdf
    ├── cover_letter.md
    └── match_score.json

Switching sessions

Open the options page → Connection tab → Persistent session card:

  • New session - POST /session, save the new id as active
  • Verify - confirm the active id still exists on the server
  • Clear - drop the active id (next request will fail until you set one)
  • Paste a session id from opencode session listUse this id to adopt an existing session (e.g. one you started in the TUI)

Session history (last 20) is kept so you can switch back at any time.

Project layout

src/
├── api/
│   ├── opencodeClient.ts        # HTTP client, persistent session enforcer
│   └── tailorService.ts         # prompt assembly + result parsing
├── background/
│   ├── index.ts                 # service worker, context menu
│   ├── context-menu.ts          # right-click → extract → open dialog
│   └── messages/
│       ├── generateDocuments.ts    # main tailor pipeline
│       ├── opencodeSession.ts      # create / verify / set session
│       ├── listProviders.ts        # GET /config/providers
│       ├── testOpencodeConnection.ts
│       └── knowledgeFiles.ts       # read about-me + latest-updates
├── components/                  # profile editors (personal info, projects,
│                                #   experience, skills, education, certs,
│                                #   languages, tabs, array input, date picker)
├── contents/
│   └── jobScrapper.ts           # JSON-LD → CSS selectors per board
├── storage/
│   └── keys.ts                  # canonical storage key set
├── tabs/
│   └── dialog.tsx               # the tailoring dialog window
├── types/
│   ├── config.ts                # LLMTuning + CustomPrompts
│   ├── opencode.ts              # OpencodeConfig + SessionRef + defaults
│   └── userProfile.ts           # UserProfile schema
├── popup.tsx
└── options.tsx

About

Chrome side-panel extension that tailors a LaTeX resume + plain-style cover letter to any job posting, routed through a local opencode serve session (GitHub Copilot models). Persistent session, streaming transcript, PDF preview.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors