extract-resumelisted
Install: claude install-skill suxrobGM/jobpilot
# Extract Resume — Source PDF → Structured Data
Read a resume's uploaded source PDF and produce JSON matching the JobPilot resume schema, then save via the API. Inverse of the editor.
## Setup
Follow `../shared/setup.md`. The profile response provides `data.profile.primaryResumeId`, `data.primaryResumeSourceAbsolutePath`, and `data.resumes` (every base with `id`, `label`, `sourceFilename`, `hasData`, `isPrimary`).
## Step 1: Resolve Target
Parse the argument:
- Integer → use that resume id.
- Empty → use `data.profile.primaryResumeId`. If no primary, stop:
> No primary resume set. Pass an explicit id, or set a primary at <http://localhost:8000/resumes>.
- `--force` (anywhere) → overwrite existing structured data. Otherwise refuse to overwrite (Step 3).
Let `RESUME_ID` be the resolved id, `FORCE` be `true`/`false`.
```bash
curl -fsS "$JOBPILOT_API/api/resumes/$RESUME_ID"
```
If 404, stop and report the id doesn't exist.
## Step 2: Verify Source PDF
`sourceFilename` must be set. If `null`, stop:
> Resume {id} ({label}) has no uploaded source PDF. Upload one at <http://localhost:8000/resumes/{id}>, then re-run.
Resolve the absolute path:
- Primary resume → prefer `data.primaryResumeSourceAbsolutePath`.
- Otherwise → `${JOBPILOT_WORKSPACE_ROOT}/src/web/storage/resumes/{sourceFilename}`.
If `sourceMimeType !== "application/pdf"`, stop and ask the user to re-upload as PDF.
## Step 3: Refuse to Clobber
If `content` is non-null and `FORCE === false`, stop:
> Resum