linkedin-jobs-fetch
Skill0 starsChanged 6 months agoMITView on GitHub
Fetch saved jobs from LinkedIn's jobs tracker using Playwright with a persisted session. Optionally add or edit notes on jobs. Use when the user wants to retrieve their LinkedIn saved jobs or annotate them.
- Installs packages
In this repository3 other files it gives its agents.
- job-analyzerSkill
- linkedin-job-searchSkill
- resume-cover-letter-generatorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Wait for the user to confirm, then the script saves the session automatically.
- Very specific: line 71
Create /tmp/job-notes.json mapping job URLs to note text (max ~250 chars per note):
- Distinctive: line 97
If it crashes mid-run: create a partial JSON with only the remaining jobs and re-run.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LinkedIn Jobs Fetch Skill
Automate fetching saved jobs from https://www.linkedin.com/jobs-tracker/?stage=saved using Playwright with a persisted session stored in ~/.claude/linkedin-session.json.
The working script is bundled with this skill as linkedin_fetch.mjs — don't rewrite it from scratch, it already handles LinkedIn's quirks (see "How the script handles LinkedIn's DOM" below).
Two modes
- Scrape (default) — fetch all saved jobs as clean JSON, then pass to job-analyzer
- Add/edit notes (
--add-notes) — write or update notes on specific jobs
Scrape mode
Step 1 — Ensure playwright + the bundled script are in place
mkdir -p /tmp/pw-runner
ls /tmp/pw-runner/node_modules/playwright 2>/dev/null || (cd /tmp/pw-runner && echo '{"type":"module"}' > package.json && npm install playwright --save && npx playwright install chromium)
cp ~/.claude/skills/linkedin-jobs-fetch/linkedin_fetch.mjs /tmp/pw-runner/linkedin_fetch.mjsStep 2 — Run the script
cd /tmp/pw-runner && node linkedin_fetch.mjs 2>&1First run (no session yet): A browser window opens to the LinkedIn login page. Tell the user:
"A browser window has opened. Please log in to LinkedIn. Once you're on the home page (linkedin.com/feed), run this in a new terminal:
touch /tmp/linkedin-ready"
Wait for the user to confirm, then the script saves the session automatically. Future runs skip login.
Subsequent runs: Uses ~/.claude/linkedin-session.json — no interaction needed. If the session has expired, the script detects the login/authwall redirect and prints a clear message to delete the session file and re-run.
Step 3 — Parse output and analyze
The script prints a JSON block between === ALL JOBS BY TAB === and === END ===, with each job parsed into title, company, posted, and url:
{ "Saved": [ { "stage": "saved", "id": "123", "title": "...", "company": "... · Oslo", "posted": "Posted 2d ago", "url": "https://www.linkedin.com/jobs/view/123/" } ] }Extract it and pass to the job-analyzer skill for full analysis.
Add/edit notes mode
Two sub-workflows:
A) AI analysis notes — fetch all saved jobs, run job-analyzer on every JD, then write a one-line verdict (rating + reason) as a note on each job card. The user sees the assessment directly in their LinkedIn tracker.
B) Manual notes — user specifies specific jobs and custom text.
Step 1 — Build a notes JSON file
Create /tmp/job-notes.json mapping job URLs to note text (max ~250 chars per note):
{
"https://www.linkedin.com/jobs/view/1234567890/": "⭐⭐⭐⭐⭐ Strong fit. Domain and seniority align well. Apply.",
"https://www.linkedin.com/jobs/view/9876543210/": "❌ Target language required. Hard blocker."
}For the AI-analysis workflow, fetch all jobs first (scrape mode), run job-analyzer on all JDs, then build this JSON with a short verdict per job.
Step 2 — Run with --add-notes flag
cd /tmp/pw-runner && node linkedin_fetch.mjs --add-notes /tmp/job-notes.json 2>&1For each job ID the script auto-detects which path to use:
- No note yet → clicks the inline "Add note" link in the card's Notes cell.
- Note already exists → there is NO inline link. The script clicks the ⋯ overflow menu button (next to "Apply",
aria-label="Overflow menu"), then clicks "Edit note" in the popover that appears.
Both open the same modal; the script fills the textarea and clicks Save. Notes are idempotent — adding to a job that already has a note overwrites it via the edit path.
A verification screenshot of the final tracker state is written to /tmp/linkedin-notes-result.png — read it to confirm the notes landed.
If it crashes mid-run: create a partial JSON with only the remaining jobs and re-run. It's safe to re-run — re-writing/editing an existing note just overwrites it.
How the script handles LinkedIn's DOM
- Each card is rendered twice (a tile layout and a table-row layout); only one copy is visible at a given width. The script always targets the visible copy (checks
offsetParent+ client rects) — never a blind.first(), which would hang ~30s on a hidden element and can close the browser ("stuck"). Targeting is done by tagging the right element with adata-pw-*attribute insidepage.evaluate, then acting on it with a Playwright locator (auto-scroll + actionability waits). - The list virtualizes rows, so the scraper accumulates cards while scrolling incrementally rather than taking a single snapshot.
- Scrape output is parsed, not a raw blob: title / company / posted come from the card's
<p>tags, preferring the visible (non-emptyinnerText) copy.
Troubleshooting
- Session expired — the script auto-detects the login/authwall redirect and tells you. Delete
~/.claude/linkedin-session.jsonand re-run; the login flow will trigger again. - "Add note" link / overflow menu not found — the job may not be on the saved tab, or LinkedIn changed the DOM. The script walks up from the visible job-link anchor to its card, then looks for either an inline
<a>/<button>whose text is exactly "Add note"/"Edit note", or abutton[aria-label="Overflow menu"](for editing existing notes). If LinkedIn renames these, updatetagVisibleNoteLink/tagVisibleOverflowinlinkedin_fetch.mjs. - Editing an existing note does nothing / navigates away — the "Edit note" item lives in a body-level popover (
[role="menu"]) opened by the ⋯ button; the script clicks it there. If the overflow button moved, re-checkopenNoteEditor. - Script hangs waiting for signal — run
touch /tmp/linkedin-readyin a terminal once logged in. - Fewer jobs than expected — the count reflects what's currently on the Saved tab; unsaving a job removes it from the results.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

