ai-job-search: Command for Claude Code

.claude/commands/rank.md

rank is a command for Claude Code from MadsLorentzen/ai-job-search. It costs 0 tokens per session (4,521 once invoked), scanned A, original, MIT.

A command that scores collected job postings against a candidate's profile and fit rules, then produces a ranked shortlist. It is an initial sorting step, not a full evaluation of a company or role.

In plain words
What is it for?
Use it to rank new jobs, filter by a focus area, re-rank after changing the profile, or choose a shortlist of a specified size.
Why use it?
It helps decide which new postings deserve attention before spending time reviewing or applying to them individually.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

This is MadsLorentzen/ai-job-search's own configuration. It tells Claude Code how to work on ai-job-search itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-job-search configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 tools/rank_state.py candidates --limit 10 # add --all / --focus "<text>" per Step 0.

About the project

AI Job Search is a Claude Code-based framework that runs on a user's machine to organize an AI-assisted job application process. It evaluates job postings, adapts CVs, writes cover letters, and helps prepare for interviews. The catalogue entries define commands, skills, instructions, an agent, and a setting for this workflow.

MadsLorentzen/ai-job-search · 47,502 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to MadsLorentzen/ai-job-search. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MadsLorentzen/ai-job-search/master/.claude/commands/rank.md
Clone the repo
git clone --depth 1 https://github.com/MadsLorentzen/ai-job-search

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rank

README.md
[![agentmods](https://agentmods.dev/badge/commands/madslorentzen/ai-job-search/rank/github.svg)](https://agentmods.dev/commands/madslorentzen/ai-job-search/rank)
Your own site
<a href="https://agentmods.dev/commands/madslorentzen/ai-job-search/rank"><img src="https://agentmods.dev/badge/commands/madslorentzen/ai-job-search/rank/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rank

Your own site · 80×15
<a href="https://agentmods.dev/commands/madslorentzen/ai-job-search/rank"><img src="https://agentmods.dev/badge/commands/madslorentzen/ai-job-search/rank.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04521
Opus 5.5 $0.00000 $0.01808
Sonnet 5.5 $0.00000 $0.00904
Haiku 4.5 $0.00000 $0.00452

Measured today against content hash 86d569fb27ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rank scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Before marking anything `expired`, the agent must exhaust the escalation order** in `09-web-research.md`: installed portal CLI first, then `WebFetch`, then curl with browser headers (if `robots.txt` permits), then se
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • rank — 100% identical, 91 lines differ
  • rank — 95% identical, 93 lines differ
.claude/commands/rank.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/rank - Triage Scraped Jobs into a Ranked Shortlist

You are batch-scoring the jobs that /scrape has collected, so the user can decide where to spend /apply effort. /scrape finds and dedupes postings; /apply evaluates one at a time in depth. /rank is the bridge: it scores every new posting against the fit framework and returns a ranked shortlist.

/rank produces triage scores, not final evaluations. It scores from the posting text and the candidate profile only - no company research, no reviewer agent. /apply's Step 1 evaluation (which adds company research) remains authoritative and always re-runs when the user applies.

Follow these steps in order.


Step 0: Parse Input

$ARGUMENTS may contain:

  • Nothing → rank up to 10 jobs with status new in job_scraper/seen_jobs.json
  • A focus area (e.g. /rank data science) → rank only jobs whose title or stored fit-notes match the focus
  • --all → re-rank every job that has not been applied to, including previously ranked ones (useful after the profile changes)
  • --limit <N> → maximum number of jobs to score this run (default 10)
  • --top <N> → shortlist size (default 5)

--limit bounds the expensive fetch-and-score work; --top only bounds how many scored jobs appear in the shortlist. They are independent: jobs beyond --limit are deferred, not silently discarded.


Step 1: Load State

Never read job_scraper/seen_jobs.json into the conversation. It holds every job the workspace has ever seen - most of it skipped - while a run only ever touches the handful of entries being scored, so a manual read costs the whole backlog on every run and grows for the life of the workspace. Selecting candidates is a query, so run the query:

python3 tools/rank_state.py candidates --limit 10          # add --all / --focus "<text>" per Step 0

It applies the status filter (new, or any status with --all), the tracker exclusion (any company+role already in job_search_tracker.csv is out of scope regardless of flags - it has been applied to or consciously tracked), the focus filter, and --limit, then prints one compact object per candidate (key, title, company, url, portal, deadline, posted_date) plus the counts: eligible, deferred (eligible beyond the limit, kept at their current status so a later run continues the backlog), excluded_by_tracker.

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed 86d569fb27ad
  2. 13d ago Changed · +8 lines e7f104c1c84e
  3. 1mo ago Changed · +20 lines 2588cacdf7ae
  4. 1mo ago Changed · +21 lines 647842c93f6d
  5. 1mo ago First seen · 148 lines · 0 tokens per session scan A a33c698efc4d

Subscribe to this mod's changes

rank is a command published in the GitHub repository MadsLorentzen/ai-job-search (47,502 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,521 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.