pupila-fetchers
Skill36 starsChanged 7 months agoMITView on GitHub
How to add a new job-source fetcher (ATS API, RSS, scraper) or extend tier-S slug lists in this repo. Use when adding a new job board, integrating a new ATS, scraping a new careers site, registering a new company under Ashby/Greenhouse/Lever, or diagnosing a fetcher that returned zero items.
- Reads credentials
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/react-best-practices/AGENTS.mdAGENTS.md
- ui/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ui/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- vercel-composition-patternsSkill
- frontend-designSkill
- nodejs-backend-patternsSkill
- nodejs-best-practicesSkill
- vercel-react-best-practicesSkill
- seoSkill
- typescript-advanced-typesSkill
- viteSkill
- vitestSkill
- pupila-ai-reviewSkill
- pupila-filtersSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Use fetchWithTimeout / fetchJson / fetchText from src/utils.ts (30s timeout, 1 retry on 5xx/network).
- Distinctive: line 35
If items are 0, eyeball the upstream response — RSS/HTML markup changes silently break parsers.
- Very specific: line 39
All slug arrays live in config/slugs.json (non-code edit).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
The pipeline ingests from 19 public sources (5 ATS APIs — Ashby, Greenhouse, Lever, Recruitee, Personio (XML) — plus RSS, JSON boards, HN, HTML scrapers, an Aave Next.js scraper, ashby-private for orgs whose public posting-API is disabled, jobicy and himalayas — no-key remote-jobs feeds, and bluedoor — a free cross-ATS aggregator queried by region from profile.location). Adding a source means: a fetcher, a normalizer, a Source literal, a slot in the orchestrator, and dedup/render wiring.
Companion invariants: src/fetchers/CLAUDE.md (auto-loaded when working in that dir) — security checklist + must-obey rules. Read those rules; this skill covers the procedural side.
Add a new fetcher (mechanical checklist)
- Raw shape in
src/types.ts—interface Raw<Name> { ... }. - Fetcher at
src/fetchers/<name>.ts, exportingfetch<Name>(): Promise<FetcherResult<Raw>>→{ items, errors }. Never throw — catch internally, push toerrors.- Use
fetchWithTimeout/fetchJson/fetchTextfromsrc/utils.ts(30s timeout, 1 retry on 5xx/network). - Pass
JSON_HEADERSorRSS_HEADERS. - For multi-slug fetchers, use
fetchMultiSlugfromsrc/fetchers/_shared.ts— it owns thePromise.all+ per-slug try/catch + flatMap. The fetcher only owns per-slug extraction. Canonical examples:ashby.ts,greenhouse.ts,lever.ts.
- Use
- Canonical source name — add the literal to the
SOURCESconst tuple insrc/types.ts(single source of truth;type Sourcederives from it). This one edit cascades: the MCPsourceEnum,KNOWN_SOURCESinsrc/lib/fetch-runner.ts, and the UI fetch-progress panel (ui/plugins/fetchJobs.ts) all derive from it automatically — don't hand-edit those. - Normalize — add
normalize<Name>(items, fetchedAt): Job[]tosrc/normalize.ts. UsewithSalary()spread to populatesalary*fields. - Wire orchestrator —
src/index.ts: import + add a line in thePromise.allblock viaprocessFetcher(...). - Dedup priority — add to
SOURCE_PRIORITYinsrc/dedup.ts(ordered most → least trusted). Compile-enforced:Record<Source, …>fails to build if you skip it. - Render — add to the display-ordered
SOURCESinsrc/render.tsso by-source counts appear inJOBS.md. Compile-enforced: thesatisfies+ exhaustiveness guard below the array fails to build if you skip it. - UI client mirror — add the literal to the
Sourceunion inui/src/types.ts(a deliberate mirror that must NOT import fromsrc/*). Guarded bytests/source-lists.test.ts, which fails if it drifts from the canonical tuple. - Tests — at least one parser test in
tests/for HTML scrapers. Use existing files (aave.test.ts,ashby-private.test.ts,normalize-hn.test.ts,bluedoor.test.ts) as templates.
Source lists are guarded, not duplicated. After step 3, steps 6–8 are the only other places that need a manual entry, and every one fails the build or a test if you forget — see
tests/source-lists.test.tsand the guards insrc/render.ts/src/dedup.ts. You can't silently half-wire a source anymore.
Smoke-test before wiring
npx tsx -e "import('./src/fetchers/<name>.ts').then(async m => { const r = await m.fetch<Name>(); console.log('count:', r.items.length, 'errors:', r.errors, 'first:', r.items[0]); })"If items are 0, eyeball the upstream response — RSS/HTML markup changes silently break parsers.
Add a tier-S company
All slug arrays live in config/slugs.json (non-code edit). Identify the ATS, then append to the matching JSON key. (Personal, non-shipped picks instead go to the gitignored config/slugs.local.json overlay — the UI writes those.)
Automated discovery (UI): Settings → Job sources → Discover more sources for my profile runs the user's LLM CLI to propose companies from
profile.json+candidate-brief.md, live-probes each against the 5 REST/XML ATSes, ranks by matching roles, and adds the accepted picks to the overlay. Code insrc/lib/company-discovery.ts(+POST /api/sources/discover). It never invents slugs intoslugs.json— everything is probe-verified and overlay-only.
| ATS | JSON key | URL pattern (slug location) |
| Ashby (public posting API) | ashby | jobs.ashbyhq.com/<slug> |
| Greenhouse | greenhouse | boards.greenhouse.io/<slug> |
| Lever | lever | jobs.lever.co/<slug> |
| Recruitee | recruitee | <slug>.recruitee.com — slug is the careers subdomain, often differs from any custom careers domain |
| Personio | personio | <slug>.jobs.personio.de — XML feed; no salary/URL in feed (URL rebuilt from slug + id) |
| Ashby (private GraphQL) | ashbyPrivate | jobs.ashbyhq.com/<slug> loads in browser but public API returns 404 |
The TIER_S_*_SLUGS exports in fetcher files are thin re-exports of the JSON. Recruitee slugs are discovered by trial — most customers use custom careers domains, so the brand name rarely equals the <slug>.recruitee.com subdomain (verified seeds: bunq, apside).
Probe before adding
curl -sI "https://api.ashbyhq.com/posting-api/job-board/<slug>?includeCompensation=true"
curl -sI "https://boards-api.greenhouse.io/v1/boards/<slug>/jobs"
curl -sI "https://api.lever.co/v0/postings/<slug>?mode=json"
curl -s "https://<slug>.recruitee.com/api/offers/" | head -c 200 # {"offers":[...]} = live
curl -s "https://<slug>.jobs.personio.de/xml?language=en" | grep -c '<position>' # >0 = live404s are logged and skipped silently — it's safe to leave a known-bad slug while waiting on upstream.
If no public ATS matches
- Try
https://jobs.ashbyhq.com/<slug>in a browser. If the board loads, append the slug toconfig/slugs.json#ashbyPrivate(graphQL endpoint scrape —src/fetchers/ashby-private.tshandles it). - Otherwise it's a custom ATS → per-company HTML scraper. Use
src/fetchers/aave.ts(Next.js__NEXT_DATA__extraction) as the canonical example.
Source-priority order (current)
aave = ashby-private > ashby > lever > greenhouse > recruitee > personio > cryptojobslist > web3career > aijobsnet > hn-hiring > hn-jobs > remotive > weworkremotely > remoteok > jobicy > himalayas > remoteyeah > bluedoor
Used by dedup tiebreaker. Newly-added sources slot in based on data quality + ATS reliability. bluedoor is lowest on purpose: it re-carries many curated-ATS jobs, so on any company+title overlap the dedicated fetcher must win.
bluedoor (cross-ATS aggregator)
src/fetchers/bluedoor.ts is structurally unlike the others — it's a free API over ~1.6M postings across 31 ATS providers, driven entirely by profile.location (no hardcoded geography, so it's forkable). Key invariants discovered against the live API:
- Region fan-out, no
q/workplace_typefilter. Onelocation_text=query peracceptedRegions ∪ basedInterm.qis an AND/phrase match (multi-term → 0 hits) andworkplace_typeis null on ~30% of records, so filtering on it drops genuinely-remote jobs. Work-type/role relevance is decided downstream by the persona-neutral filter. - Anonymous rate limit is 15 requests/window (
x-rate-limit-tier: anonymous).fetchBluedoorcaps at 12 region queries;BLUEDOOR_API_KEY(free, email-OTP) raises the ceiling (KEYED_MAX_REQUESTS). - 30-day
posted_afterwindow so infrequent runs don't miss jobs;limit=100(API max) + a 2-page cap bound even huge regions (USlocation_textmatches 600k+ all-time → tens with the window). - No company name shipped — only
org_id(UUID) +provider.parseAtsUrl()recovers the employer from the ATS slug in the URL (so it matches curated fetchers for dedup); falls back toorg_idso different employers never collapse in company+title dedup. - Covered-company pre-skip:
buildCoveredSlugs(slugs.json)+isCoveredCompany()drop jobs whose(provider, slug)is already fetched directly — automatic, no extra config.
Known upstream issues
See references/upstream-issues.md — current breakage list, kept current. Check before debugging "why is X returning 0".
Related
src/fetchers/CLAUDE.md— security checklist + invariants (auto-loaded when editing in that dir).tests/— parser-test patterns for HTML scrapers.
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.

