Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/SudharakaA/ai-job-search/llms.txt

Use this file to discover all available pages before exploring further.

The /apply command is the core of AI Job Search. It runs a structured two-agent pipeline that takes a job posting from URL or pasted text through fit evaluation, LaTeX drafting, independent review, revision, mandatory PDF compilation with layout inspection, and ATS text-layer verification before presenting a fully verified output. Every application is grounded in your actual profile: no skill is fabricated, no gap is hidden, and the final PDFs are visually inspected before they reach you.

What makes this pipeline different

Four design choices distinguish /apply from simpler “generate a CV” approaches:

PDF verification loop

LaTeX that looks correct in .tex often breaks in the PDF. Job titles orphan to the next page, cover letters spill to a second page, bullet fonts silently fall back to body font. /apply compiles both documents and visually inspects the rendered pages, applying targeted fixes until the layout is clean. This runs automatically on every application.

ATS text-layer verification

An ATS reads the PDF’s embedded text layer, not the rendered page. LaTeX can produce PDFs where the text extracts as garbage: icon glyphs where the email should be, interleaved lines from multi-column layouts. /apply runs pdftotext on the compiled CV and verifies contact details, reading order, and keyword coverage against what a parser actually sees.

Relevance-weighted CV cutting

When a CV overflows two pages, content is not cut mechanically from the oldest section. Each candidate line is scored by relevance to the target posting, uniqueness in the document, and whether the cover letter depends on it. The lowest-scoring line is cut first, regardless of which section it sits in.

Drafter-reviewer separation

The drafter writes the application. A second Claude agent, spawned with a fresh context, researches the company and critiques the drafts. The drafter then revises. This catches missed keywords, weak framing, and generic language that a single pass routinely leaves in.

The six-step pipeline

1
Step 0: Parse the input
2
/apply accepts either a URL or pasted text:
3
# URL mode — Claude fetches the posting with WebFetch
/apply https://jobindex.dk/job/1234567

# Pasted text — used when the portal blocks automated access
/apply <paste the full job description here>
4
From the posting, Claude extracts: company name, role title, department (if mentioned), location, and language (Danish or English). The language is used in Step 2 to determine whether the cover letter should be written in Danish or English. These values are stored in context and reused throughout the workflow without re-reading.
5
Step 1: Fit evaluation
6
The drafter reads your evaluation framework (04-job-evaluation.md) and your structured candidate profile (01-candidate-profile.md), then scores the role across five dimensions:
7
DimensionScoreWhat it measuresTechnical Skills Match0-100Required/preferred skills vs. your capabilitiesExperience Match0-100Work history mapped to the role’s requirementsBehavioral/Culture Fit0-100Role environment vs. your behavioral profileLocation & LogisticsPass/FailCommute range, remote policy, travel requirementsCareer Alignment0-100Whether this role advances your stated career goals
8
Weights are applied to produce an overall score: Technical Skills 30%, Experience Match 25%, Behavioral Fit 15%, Career Alignment 30%. Location is a pass/fail gate, not factored into the weighted average.
9
If the salary lookup tool is configured (salary_data.json exists), Claude also runs:
10
python salary_lookup.py "<Company Name>" --json
11
Results are presented as a salary index relative to the baseline defined in your data file. If the tool is not configured or returns an error, the salary step is skipped gracefully.
12
After presenting the evaluation, Claude asks whether you want to proceed. If you say no, the workflow stops here. No files are written until you confirm.
13
The evaluation framework thresholds are: Strong Fit (75+), Good Fit (60-74), Moderate Fit (45-59), Weak Fit (30-44), Poor Fit (below 30). A score below 50 triggers an explicit warning before drafting, since extensive reframing would be required.
14
Step 2: Draft CV and cover letter
15
The drafter writes both documents using only the files not yet in context from Step 1:
16
  • 03-writing-style.md — tone, critical rules (no em-dashes, no clichés, active voice), cover letter structure
  • 05-cv-templates.md — LaTeX moderncv/banking format, section ordering, profile statement templates, tailoring rules
  • 06-cover-letter-templates.md — cover.cls template structure, compile instructions, known pitfalls
  • 17
    It also reads one existing CV and one existing cover letter from cv/ and cover_letters/ as concrete structural references.
    18
    CV (cv/main_<company>.tex):
    19
  • Always written in English, regardless of the posting language
  • Uses moderncv banking style, compiled with lualatex
  • Profile statement and experience bullets are tailored to the specific role
  • Target: exactly 2 pages
  • 20
    Cover letter (cover_letters/cover_<company>_<role>.tex):
    21
  • Written in the posting’s language — a Danish posting gets a Danish cover letter
  • Uses the custom cover.cls template, compiled with xelatex
  • Addressed to a named person if one appears in the posting, otherwise "Dear Hiring Manager" (or its equivalent in the posting’s language)
  • Any mention of agentic coding or AI tooling must reference Claude Code by name
  • Target: exactly 1 page
  • 22
    Both completed drafts are kept in context for Step 3. The reviewer receives them inline rather than re-reading the files, which avoids redundant file reads.
    23
    Step 3: Reviewer agent critiques the drafts
    24
    A second Claude agent is spawned with a fresh context. The reviewer receives both draft files inline, the full job posting text, and instructions to read four specific content files:
    25
  • 01-candidate-profile.md — to check factual accuracy of every claim
  • 02-behavioral-profile.md — to check whether the cover letter’s voice matches the candidate’s natural register (a “Collaborator” PI profile should not be given a solo-hero tone)
  • 03-writing-style.md — to check against the critical style rules
  • 04-job-evaluation.md — to check keyword and requirement coverage
  • 26
    The reviewer does not read the LaTeX template files (05, 06) — those govern structural and LaTeX concerns the drafter already applied and are not relevant to content critique.
    27
    The reviewer’s output has two parts:
    28
    Part A: Structured edits (JSON array)
    29
    Concrete, mechanically applicable changes the drafter can apply with the Edit tool:
    30
    [
      {
        "file": "cv/main_acme.tex",
        "old_string": "Developed machine learning models for customer analytics",
        "new_string": "Built and deployed scikit-learn churn prediction models serving 2M customer records",
        "reason": "keyword match — posting requires 'scikit-learn' and 'production deployment'"
      }
    ]
    
    31
    Each edit includes an old_string that is unique in the file (enough surrounding context to match exactly once), a new_string, and a one-line rationale.
    32
    Part B: Narrative suggestions (prose)
    33
    Four categories, each reported even if the finding is “no issues”:
    34
  • Missed keywords/requirements — what to add and roughly where, when a clean string replacement is not possible
  • Company/department-specific angles — connections between your experience and the company’s strategic priorities, based on the reviewer’s web research
  • Action-oriented reframing — passive, generic, or low-energy statements that need structural rewrites rather than single-sentence swaps
  • Tone and style issues — flagged against both 03-writing-style.md and 02-behavioral-profile.md
  • 35
    The reviewer operates under a hard honesty rule: every suggestion must be grounded in actual profile data. If a requirement is a genuine gap, the reviewer says so and suggests how to frame adjacent experience instead. It never suggests fabricating skills or experience.
    36
    Step 4: Revision
    37
    The drafter applies the reviewer’s feedback without re-reading the draft files (they are still in context from Step 2).
    38
    Part A (structured edits): Applied directly with the Edit tool, one edit per JSON object. Any edit whose rationale would require fabricating content is skipped.
    39
    Part B (narrative suggestions): Applied with judgment:
    40
  • Missed keywords: Added to experience bullets where they fit naturally, not to the profile statement as abstract claims.
  • Company-specific angles: Woven into the cover letter, but every company claim is independently verified via WebFetch/WebSearch before inclusion. The reviewer’s research is not trusted at face value.
  • Action-oriented reframing: Passive CV profile statement sentences and cover letter openings are rewritten with active, specific language.
  • Tone and style issues: Style-guide fixes applied — no em-dashes, no clichés, no apologetic hedging, consistent first-person active voice.
  • 41
    After all edits, the two files on disk are the final drafts and proceed to compilation.
    42
    Step 5: Compile and inspect PDFs (mandatory)
    43
    This step is never skipped. The .tex files looking correct is not sufficient.
    44
    5a. Compile
    45
    cd cv && lualatex -interaction=nonstopmode main_<company>.tex
    cd ../cover_letters && xelatex -interaction=nonstopmode cover_<company>_<role>.tex
    
    46
    The CV uses lualatex because pdflatex fails on modern MiKTeX with fontawesome5 font-expansion errors. The cover letter uses xelatex because cover.cls requires fontspec. If either compile fails, the error is fixed and the document is recompiled until clean.
    47
    5b. Inspect layout
    48
    Both PDFs are read via the Read tool and checked against these requirements:
    49
    • Exactly 2 pages (not 1, not 3)
    • No orphaned \cventry titles — a job or education title must never sit alone at the bottom of page 1 with its bullets on page 2. This is the most common failure.
    • No section headings isolated at the top of page 2 with only 1-2 lines below them
    • No awkward whitespace gaps
    • Exactly 1 page
    • Signature block visible and not cut off or pushed to a second page
    • Bullet list font matches surrounding body text (both should be Raleway-Medium)
    50
    5c. Iterate until clean
    51
    If layout problems are found, the .tex files are edited and recompiled. Common fixes:
    52
    ProblemFixOrphaned CV entry titleAdd \usepackage{needspace} to preamble and \needspace{5\baselineskip} before the problematic \cventryCV spills to page 3 with a trailing section\enlargethispage{2-3\baselineskip} before a late sectionSubstantial content on page 3Relevance-weighted cutting (score each line by relevance to posting, uniqueness, cover letter dependency; cut lowest scorer first)Cover letter bullet compile errorClose \lettercontent{} before the list; wrap list in {\raggedright\fontspec[...]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont \begin{itemize}...\end{itemize}\par}Cover letter spills to 2 pagesCut sentences that restate what a bullet already said; then cut low-keyword bullets; never reduce geometry or line spacing
    53
    5d. ATS and keyword verification
    54
    This sub-step verifies what an ATS parser actually sees in the compiled CV.
    55
    First, check whether pdftotext (poppler) is available:
    56
    pdftotext -v
    
    57
    If it is missing, the mechanical parse check is skipped with a one-line warning and keyword coverage is checked visually against the PDF read. The rest of the workflow continues normally.
    58
    If available, extract the text layer:
    59
    cd cv && pdftotext -layout main_<company>.pdf main_<company>.txt
    
    60
    The extraction is checked for:
    61
  • No (cid:NNN) markers or \uFFFD replacement characters (garbled font embedding)
  • Email and phone present as literal text (icon-font glyph names like MOBILE-ALT are harmless noise; the actual address must be present as printed text)
  • Reading order matches visual order (the stock single-column banking style is safe; custom multi-column templates registered via /add-template are where this breaks)
  • Dates recognizable for each role and degree
  • 62
    Keyword coverage is then reported as a table:
    63
    KeywordPriorityStatusNotescikit-learnrequiredcoveredExperience section, role at AcmeSparkpreferredsynonym-only”distributed computing” used; prefer posting termdbtrequiredmissing (have it)Present in profile but not in CV; added to bulletKubernetespreferredmissing (gap)Genuine gap; acknowledged in cover letter framing
    64
    missing (have it) items are added to experience bullets and the compile loop reruns. missing (gap) items are left out. Keywords are never stuffed.
    65
    5e. Clean up build artifacts
    66
    After the final clean compile, .aux, .log, and .out files are deleted. The .tex and .pdf files are kept.
    67
    Step 6: Final verification and output
    68
    The verification checklist from CLAUDE.md runs exactly once here, at the end of the workflow. The reviewer does not run it; the drafter runs it once on the final state of both files.
    69
    • All claims match the actual profile — no fabricated skills, experience, or achievements
    • Job titles, dates, company names, and locations are correct
    • Contact details are correct
    • All company-specific claims in the cover letter have been independently verified via WebFetch or WebSearch; claims that cannot be verified are rephrased in general terms or omitted
    • Profile statement and opening paragraph are tailored to the specific role, not generic
    • Skills and experience bullets are reframed to match job requirements
    • Key job requirements are addressed; genuine gaps are acknowledged where relevant
    • Nice-to-have requirements are highlighted where the profile matches them
    • CV follows the standard 2-page moderncv/banking format
    • Cover letter uses the cover.cls template and established structure
    • Tone is consistent across both documents
    • No contradictions between CV and cover letter content
    • No LaTeX syntax errors (balanced braces, correct commands)
    • No spelling or grammar errors
    • Agentic coding or AI tooling references name Claude Code explicitly
    • Cover letter is addressed to the correct person or "Dear Hiring Manager" where no name is available
    • Cover letter fits on exactly one page
    70
    After the checklist, Claude presents a summary of 3-5 key tailoring decisions made during the workflow: what was emphasized and why, which company-specific angles were incorporated based on the reviewer’s research, the most impactful reviewer suggestions, and any gaps that were acknowledged or reframed.
    71
    Finally, the two output files are listed:
    72
    cv/main_<company>.tex          (+ .pdf)
    cover_letters/cover_<company>_<role>.tex   (+ .pdf)
    

    Token efficiency

    The workflow is structured to avoid redundant file reads. Files read in Step 1 stay in context through Step 2. Draft content is passed inline to the reviewer in Step 3 rather than asking the reviewer to re-read files already in memory. The verification checklist runs exactly once, at Step 6. The reviewer focuses purely on content critique and does not duplicate verification work. The mandatory compile-and-inspect step in Step 5 does spend real tokens on PDF rendering and layout iteration, but this cost is deliberate: it trades some end-to-end token use for a genuine reduction in broken PDFs reaching you.

    Build docs developers (and LLMs) love