en un clic
apply
// Apply to a single job (URL or pasted page) with fit review, or drain the pending queue when no argument is given.
// Apply to a single job (URL or pasted page) with fit review, or drain the pending queue when no argument is given.
Search a job board and autonomously apply to matching jobs one at a time, until paused, exhausted, or the max-applications cap is hit.
Migrate a React @tanstack/react-form codebase from the prop-drilled `useForm` + erased-form-type pattern to the official `createFormHook` composition API (`useAppForm` / `withForm` / `field.X`). Use when a project threads a `form` object (often cast to an `any`-erased type like `ReactFormExtendedApi<any,...>`) through field-wrapper components that take `form`+`name` props, and you want typed field names/values, no casts, and reusable bound field components. Triggers: "migrate forms to createFormHook", "adopt useAppForm/withForm", "remove AnyReactForm cast", "type-safe tanstack form fields".
Re-score a run's skipped jobs and promote the eligible ones to `approved` for later applying. Recovers jobs wrongly dropped for location, a sparse JD, 1099, or seniority. Does not apply.
Resume an interrupted or paused JobPilot run by id. Re-flips the run to in_progress and replays the apply loop on any remaining approved jobs without re-asking for fit confirmation.
Search a chosen job board via Playwright, rank results by fit against the user's resume, and save them to the run so the user can review.
Parse a resume's uploaded PDF into structured JSON (basics, experience, projects, skills, education) and save it to the editor.
| name | apply |
| description | Apply to a single job (URL or pasted page) with fit review, or drain the pending queue when no argument is given. |
| argument-hint | [job_url_or_pasted_job_page] (omit to drain the queue) |
Two modes, one shared apply loop:
/api/queue/pending → score → ranked table approval → apply all.User approves once up front. No per-job confirmation after that.
Follow plugin/skills/shared/setup.md to load profile, resume, credentials.
JOBPILOT_API=http://localhost:8000
Read data.autoApply for config (defaults applied per field):
| Setting | Default | Notes |
|---|---|---|
minMatchScore | 70 | Batch-mode threshold (0–100). Ignored in single-job mode. |
maxApplicationsPerRun | null (unlimited) | Sent as config.maxApplications when set; omit for unlimited batch. Single-job mode forces 1. |
defaultStartDate | "2 weeks notice" | Default start-date answer. |
For ATS portals (Greenhouse, Lever, Workday, etc.) the apply step lands on a domain that isn't in /api/job-boards. Follow plugin/skills/shared/auth.md — credentials are resolved from the Credential.scope === <domain> row or the scope === "default" fallback. The auth flow registers a new account when none exists (no asking) and runs forgot-password if the stored password is stale.
run <run-id> → re-apply mode: set RUN_ID=<run-id>, set config.maxApplications = null (unlimited — the user hand-selected these jobs), skip Phases 1–3, and run the Phase 4 loop over its current approved jobs. (The run viewer — or the rescan-skipped skill — promotes the chosen skipped/failed jobs to approved before injecting this.)If the argument is pasted content (HTML / text), extract description, Apply URL, company, title. If no Apply URL can be found, stop: "I need either a job URL or content with a visible Apply link."
URL input → browser_navigate, then take a browser_snapshot narrowed to the posting body (per plugin/skills/shared/browser-tips.md) and build the digest JSON (title, company, location, salary, employmentType, remote, requirements, responsibilities, techStack, yearsExperience, descriptionExcerpt) from it. Pasted input → parse the same fields manually. Keep the digest in DIGEST=... for 1A.4.
## Job Fit Review: [Title] at [Company]
**Match Score: X/100**
**Strong Matches:** [skill — evidence]
**Partial Matches:** [skill — what's adjacent]
**Gaps:** [skill — what's missing]
**Visa/Sponsorship Risk:** [if mentioned]
**Verdict:** [1-2 sentence recommendation]
Ask: "Want me to proceed with the application?" — yes/go continue, anything else stop.
URL_ENCODED=$(jq -rn --arg v "<job-url>" '$v|@uri')
TITLE_ENCODED=$(jq -rn --arg v "<title>" '$v|@uri')
COMPANY_ENCODED=$(jq -rn --arg v "<company>" '$v|@uri')
curl -fsS "$JOBPILOT_API/api/applied/check?url=$URL_ENCODED&title=$TITLE_ENCODED&company=$COMPANY_ENCODED"
If data.applied === true, surface the match (title + company + appliedAt + data.match.kind) and ask whether to proceed anyway. Stop on no.
RUN_ID=$(date -u +%Y-%m-%dT%H-%M-%S_apply)
curl -fsS -X POST "$JOBPILOT_API/api/runs" \
-H 'content-type: application/json' \
-d "$(jq -n --arg runId "$RUN_ID" --arg query "<title> at <company>" \
'{runId:$runId, query:$query, source:"apply", config:{maxApplications:1}}')"
JOB_KEY=$(date -u +%s)-single
curl -fsS -X POST "$JOBPILOT_API/api/runs/$RUN_ID/jobs" \
-H 'content-type: application/json' \
-d "$(jq -n --arg key "$JOB_KEY" --arg title "<title>" --arg company "<company>" \
--arg location "<location>" --arg url "<job-url>" --arg board "<board>" \
--arg matchReason "<one-line verdict>" --argjson score <0-100> \
--arg digest "$DIGEST" --arg desc "<posting text>" \
'{key:$key, title:$title, company:$company, location:$location, url:$url, board:$board, matchScore:$score, matchReason:$matchReason, status:"approved", digest:$digest, description:$desc}')"
Keep $RUN_ID and $JOB_KEY. Live view: http://localhost:8000/runs/<RUN_ID>. Jump to Phase 4.
curl -fsS "$JOBPILOT_API/api/queue/pending"
data is [{ id, url, note, status }]. If empty, tell user to open http://localhost:8000/queue to add URLs and stop. Otherwise: "Found N URLs in the queue. Visiting each to gather details..."
RUN_ID=$(date -u +%Y-%m-%dT%H-%M-%S_apply)
curl -fsS -X POST "$JOBPILOT_API/api/runs" \
-H 'content-type: application/json' \
-d "$(jq -n --arg runId "$RUN_ID" \
'{runId:$runId, query:"apply queue", source:"apply", config:{minScore:6, maxApplications:10}}')"
For each queue URL:
URL_ENCODED=$(jq -rn --arg v "<job-url>" '$v|@uri')
curl -fsS "$JOBPILOT_API/api/applied/check?url=$URL_ENCODED"
If applied, mark the queue entry consumed (status:"skipped") and add a skipped Job, then continue.
browser_navigate to the URL.browser_snapshot narrowed to the posting body (per plugin/skills/shared/browser-tips.md) and build the digest JSON from it. Keep the stringified digest as DIGEST for 2.3.plugin/skills/shared/auth.md, then re-read the posting./api/applied/check with title+company for fuzzy match.Pre-score server-side; deliberate only on borderline cases.
FIT=$(curl -fsS -X POST "$JOBPILOT_API/api/score-fit" \
-H 'content-type: application/json' \
-d "$(jq -n --argjson digest "$DIGEST" '{digest:$digest}')")
SCORE=$(echo "$FIT" | jq -r '.data.score')
CONF=$(echo "$FIT" | jq -r '.data.confidence')
If CONF >= 0.7 and SCORE is at least 10 from threshold either side, use it directly. Otherwise rescore from the digest using strongMatches/partialMatches/gaps in FIT.
curl -fsS -X POST "$JOBPILOT_API/api/runs/$RUN_ID/jobs" \
-H 'content-type: application/json' \
-d "$(jq -n --arg key "<entry-id>" --arg title "<title>" --arg company "<company>" \
--arg location "<location>" --arg url "<job-url>" --arg board "<board>" \
--arg matchReason "<one line>" --argjson score <0-100> \
--arg digest "$DIGEST" --arg desc "<posting text>" \
'{key:$key, title:$title, company:$company, location:$location, url:$url, board:$board, matchScore:$score, matchReason:$matchReason, status:"pending", digest:$digest, description:$desc}')"
If score < minMatchScore, immediately PATCH to skipped with skipReason:"Below minimum match score (X < Y)".
Eligibility (same as auto-apply 2.2a): never skip for onsite/other-city when willingToRelocate is true or preferredLocations is empty/"Anywhere", for a thin JD (read and rescore first), for 1099/defense/federal work, or for a role below your level/seniority (over-qualification scores full marks on experience) — only a JD-stated citizenship/clearance requirement disqualifies.
Auto mode (confirmMode: "auto" AND every qualified job ≥ threshold): PATCH all to approved, go to Phase 4.
Batch mode (default): present ranked table.
## Batch Apply
Visited <total> jobs. <qualified> qualify (score >= minMatchScore/100).
| # | Score | Title | Company | Location | Board |
|---|--------|-------|---------|----------|-------|
**Commands:** "go" | "go 1,3,5" | "remove 3" | "details 2" | "stop"
PATCH Job.status accordingly:
go → all qualified to approvedgo N,M → selected to approved; rest to skipped ("Not selected by user")remove N → that job to skipped ("Removed by user"); re-present tablestop → PATCH run status:"paused" and stopcurl -fsS -X PATCH "$JOBPILOT_API/api/runs/$RUN_ID/jobs/<key>" \
-H 'content-type: application/json' -d '{"status":"approved"}'
For each approved job, score-descending:
curl -fsS -X PATCH "$JOBPILOT_API/api/runs/$RUN_ID/jobs/<key>" \
-H 'content-type: application/json' -d '{"status":"applying"}'
Navigate to the job URL. browser_snapshot the header, browser_click the Apply / Easy Apply control's ref. browser_wait_for. If a new tab appeared (ATS portal), browser_tabs(action:"select", index:<new>). browser_snapshot the form to enumerate fields and refs. If a login page appears, follow plugin/skills/shared/auth.md.
DIGEST=$(curl -fsS "$JOBPILOT_API/api/runs/$RUN_ID/jobs" | jq -r --arg key "<key>" '.data[] | select(.key == $key) | .digest // empty')
Invoke the tailor-resume skill with $DIGEST. Empty $DIGEST (legacy row) → fall back to the job URL. Capture the variant id + PDF URL for 4.4. If no usable base → POST /result outcome:"failed", failReason:"No tailorable resume base".
Follow plugin/skills/shared/form-filling.md. Upload the 4.3 variant for resume fields. If the form has a cover-letter field (textarea or file upload), generate one via the cover-letter skill with $DIGEST and fill it per form-filling.md (paste text, or upload a generated PDF). Use autoApply.defaultStartDate; ask once for salary expectation if a field needs it.
Skip in batch mode. When config.maxApplications === 1, re-snapshot the form and present:
## Ready to Submit: [Title] at [Company]
| Name | Email | Phone | Resume | Salary | Start date | Cover letter | Custom Qs |
<total> fields across <P> page(s). Submit? (yes / no / edit <field>)
no → POST /result with outcome:"skipped", skipReason:"User cancelled at pre-submit review". edit <field> → fix, re-snapshot, re-present.
Click submit, browser_wait_for, then take a narrowed browser_snapshot for the result. A success confirmation = applied; a populated error message on the page = failure with that message as failReason.
POST one of three outcomes to /api/runs/$RUN_ID/jobs/<key>/result. The server atomically updates the Job, creates Application (on applied), marks the queue, and recomputes summary.
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
# applied
jq -n --arg t "$NOW" --argjson score <0-100> '{outcome:"applied", appliedAt:$t, matchScore:$score}'
# failed
jq -n --arg r "<reason>" --arg notes "<actionable retry notes>" '{outcome:"failed", failReason:$r, retryNotes:$notes}'
# skipped (e.g., user cancelled, max-apps cap)
jq -n --arg r "<reason>" '{outcome:"skipped", skipReason:$r}'
Close any tabs with index ≥ 1: browser_tabs(action:"close", index:<i>) descending, then browser_tabs(action:"select", index:0). Continue to next job.
If config.maxApplications is set and applied >= config.maxApplications, stop the loop. Leave remaining approved jobs as-is.
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -fsS -X PATCH "$JOBPILOT_API/api/runs/$RUN_ID" \
-H 'content-type: application/json' \
-d "$(jq -n --arg t "$NOW" '{status:"completed", completedAt:$t}')"
Print a summary table and link to http://localhost:8000/runs/<RUN_ID>.
plugin/skills/shared/auth.md: register when no account exists (without asking), run forgot-password when the stored password is stale./result outcome:"failed", failReason:"Payment required".plugin/skills/shared/auth.md)./result for terminal outcomes.