How the AI Job Search Framework Uses Claude Code: Architecture and Commands
The AI Job Search Framework uses Claude Code as its autonomous agent runtime, executing Markdown-defined commands for candidate profiling, job scraping, and application drafting through a permission-scoped, drafter-reviewer pipeline.
The MadsLorentzen/ai-job-search repository is an open-source automation suite built specifically around Anthropic's CLI tool. By treating Claude Code as the single source of truth for all AI-driven operations, the framework enables autonomous job searching while maintaining strict security boundaries and reproducible workflows.
Claude Code as the Runtime Backbone
According to the repository's README.md, the project is explicitly "built on Claude Code" and directs users to install the CLI as the primary interface for driving workflows. Unlike traditional Python scripts that execute linearly, the framework leverages Claude Code's ability to act as an autonomous agent that interprets high-level commands.
All user-facing operations are defined as Claude Code commands stored in the hidden .claude/commands/ directory. These Markdown-based command files include:
setup.md– Initializes candidate profiles from existing documentsapply.md– Executes the full application drafting pipelinescrape.md– Triggers job board aggregation
When a user types /setup or /apply inside the Claude Code REPL, the CLI reads these files and executes the embedded logic as a conversational workflow.
Security Through Scoped Permissions
The framework implements defense-in-depth by restricting Claude Code's capabilities through a pre-approved permission whitelist. The .claude/settings.json file explicitly enumerates allowed operations, ensuring the autonomous agent can execute only safe, reproducible tasks such as running the salary-lookup script or the PDF verifier.
This security model is documented in tools/security_guards.py, which describes the pre-approved Claude Code permissions shipped with the repository. By constraining the agent's tool access at the configuration level, the framework prevents unauthorized file system access or arbitrary code execution during autonomous runs.
Profile Onboarding with the /setup Command
The onboarding flow demonstrates how Claude Code bridges document ingestion and structured data extraction. When a user invokes the /setup command, the agent defined in .claude/commands/setup.md performs the following operations:
- Reads the repository's
documents/folder containing CVs, LinkedIn exports, and diplomas - Extracts canonical candidate information through conversational clarification
- Populates profile files under
.claude/skills/job-application-assistant/
This process transforms unstructured resume PDFs into machine-readable profile data that downstream skills can reference during job matching.
Automated Job Scraping and Ranking
The job discovery layer relies on the job-scraper skill defined in .claude/skills/job-scraper/SKILL.md. Rather than hard-coding scrapers in Python, the framework orchestrates portable CLI tools located in .agents/skills/ that query Danish job boards.
Claude Code spawns these external tools, aggregates their JSON results, and feeds the structured postings back to the model for fit evaluation. This architecture separates the scraping mechanics (external CLI tools) from the ranking logic (Claude Code's analysis), allowing the framework to adapt to new job boards by adding skill definitions rather than modifying core code.
The Drafter-Reviewer Application Pipeline
The /apply command implements a sophisticated multi-agent workflow defined in .claude/commands/apply.md. When processing a specific job URL, the command executes a three-stage "drafter-reviewer" process:
- Stage 1: Drafting – A Claude instance generates customized CV and cover letter content based on the candidate profile and job description
- Stage 2: Review – A fresh Claude instance (the reviewer) critiques the drafts against the job requirements
- Stage 3: Revision – The original drafter incorporates feedback and produces the final application documents
This adversarial quality-control loop reduces hallucinations and ensures the output aligns with both the candidate's actual experience and the employer's stated needs.
Security Compliance and Robots.txt Enforcement
The framework enforces ethical web scraping through tools/robots_check.py, which implements two critical safeguards:
- Agent Identification – All HTTP requests identify themselves with the
Claude-Useruser-agent string - Robots.txt Respect – The script checks
robots.txtpolicies before fetching, and only retries with browser-like headers after explicit permission verification
This behavior ensures that autonomous job searches remain compliant with website terms of service while maintaining transparency about automated access.
Architectural Design: Thin-Pointer Pattern
The AGENTS.md file clarifies that Claude Code serves as the reference runtime for the entire framework. Alternative agent frameworks (such as Codex, Antigravity, or Gemini CLI) are designed as thin wrappers that delegate to the same canonical specifications stored in the .claude/ directory.
This design choice guarantees that the candidate's data (stored in .claude/skills/) remains separate from the behavioral logic (the Markdown commands), enabling portability across different AI agent platforms while keeping Claude Code as the authoritative implementation.
Summary
- Claude Code is the core runtime for the AI Job Search Framework, interpreting Markdown commands from
.claude/commands/to orchestrate workflows - Scoped permissions in
.claude/settings.jsonrestrict the autonomous agent to pre-approved, safe operations documented intools/security_guards.py - The /setup command extracts structured candidate profiles from unstructured documents in the
documents/folder - Job scraping uses external CLI tools coordinated by Claude Code skills, with results fed back for AI-powered fit ranking
- The /apply command runs a drafter-reviewer pipeline to generate and refine application materials before final output
- Security compliance via
tools/robots_check.pyensures all web requests respectrobots.txtand identify asClaude-User
Frequently Asked Questions
How do I install and start using the AI Job Search Framework with Claude Code?
Install the Claude Code CLI using the official install script, then clone the repository and run claude from the project root. Once inside the REPL, execute /setup to initialize your candidate profile from documents in the documents/ folder.
What security measures prevent Claude Code from performing unauthorized actions?
The framework ships with a .claude/settings.json file that whitelists only specific approved operations, such as running the salary lookup or PDF verification scripts. Additionally, tools/security_guards.py documents these constraints, ensuring the autonomous agent cannot execute arbitrary commands outside the predefined safe set.
How does the drafter-reviewer pipeline improve application quality?
The /apply command in .claude/commands/apply.md implements a three-stage process where one Claude instance drafts the application materials, a second instance critiques them against the job requirements, and the original drafter revises based on that feedback. This adversarial review reduces errors and ensures alignment between the candidate's profile and the job description.
Can I use this framework with AI agents other than Claude Code?
While the repository is built on Claude Code as the reference runtime, the AGENTS.md specification explains that other agent frameworks can act as thin wrappers around the same .claude/ directory structure. However, all canonical logic is defined for Claude Code execution, making it the primary supported runtime.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →