# What Are Agent Commands in the AI Job Search Framework?

> Discover agent commands in the AI Job Search Framework. Learn how markdown-driven specifications interpret slash commands like /apply and /setup for reproducible job application pipelines.

- Repository: [Mads Lorentzen/ai-job-search](https://github.com/MadsLorentzen/ai-job-search)
- Tags: internals
- Published: 2026-08-26

---

**Agent commands in the AI Job Search Framework are markdown-driven workflow specifications stored in the `.claude/commands/` directory that interpret slash commands like `/apply` or `/setup` as deterministic, reproducible job application pipelines.**

The **MadsLorentzen/ai-job-search** repository implements a declarative command architecture where natural language instructions become executable code. Each **agent command** is a standalone markdown document that Claude Code parses sequentially, orchestrating file system operations, external API calls, and skill invocations to automate the entire job search lifecycle.

## How Agent Commands Work

Agent commands function as the primary interface between the user and the framework's automation capabilities. They transform simple text triggers into complex, multi-step workflows while maintaining strict data boundaries.

### File Structure and Invocation

Agent commands reside as **`.md` files** within the hidden `.claude/commands/` directory. When a user types a slash command such as `/apply`, `/setup`, or `/rank`, Claude Code locates the corresponding file—for example, [`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md) or [`.claude/commands/setup.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/setup.md)—and executes the declared workflow step by step. The public command catalog is documented in [`README.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/README.md) between lines 147-162, which maps each slash command to its underlying markdown specification.

### Execution Flow and Data Handling

Each markdown file contains a step-by-step recipe that may invoke other commands or call specialized skills. For instance, the `/apply` command internally calls `/rank` to score job postings before generating application materials. Commands operate on a **data-only** model: they read from and write to the framework's own data files including `documents/`, `job_search_tracker.csv`, and [`outcome.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/outcome.md), but never modify external resources without explicit user consent. The permission allowlist in [`.claude/settings.json`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/settings.json) enforces this boundary by guaranteeing only documented commands can be invoked by the model.

## Core Command Categories

The framework organizes functionality into four distinct categories, all implemented as discrete markdown command files in `.claude/commands/`.

### Core Workflow Commands

These commands bootstrap the system and execute the primary job application pipeline:

- **`/setup`** – Initializes candidate profiles from the `documents/` directory or via interactive interviews, as defined in [`.claude/commands/setup.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/setup.md).
- **`/scrape`** – Invokes portal-specific CLI tools located under `.agents/skills/*/cli` to fetch job postings from supported Danish job boards.
- **`/apply`** – Runs the full draft-review-revise pipeline, reading `job_search_tracker.csv` and outputting finalized PDFs.

### Post-Apply Utilities

Manage interview preparation and result tracking:

- **`/interview`** – Prepares interview packs from processed applications.
- **`/outcome`** – Updates [`outcome.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/outcome.md) and synchronizes status back to `job_search_tracker.csv`.
- **`/gmail-sync`** – Auto-detects application status from Gmail threads.
- **`/notion-sync`** – Generates a read-only Notion view of the tracker without modifying external data.

### Enhancement and Analysis

Optimize application quality through scoring and enrichment:

- **`/rank`** – Batch-scores scraped postings against the fit framework defined in [`.claude/commands/rank.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/rank.md).
- **`/expand`** – Enriches existing profile documents with additional context.
- **`/upskill`** – Generates learning plans based on identified skill gaps.
- **`/html-report`** – Renders an offline dashboard from tracker data for local analysis.

### Customization and Maintenance

Extend framework capabilities for specific user needs:

- **`/add-template`** – Registers custom LaTeX or Typst templates by specifying source paths, compile commands, and font dependencies.
- **`/add-portal`** – Scaffolds new search skills for unsupported job boards under `.agents/skills/`.
- **`/reset`** – Optionally wipes personal data from the repository while preserving command and skill definitions.

## Integration with Skills

Agent commands do not encapsulate business logic directly. Instead, they invoke **skills**—modular capabilities defined in `.claude/skills/`—to perform specialized tasks. The **`job-application-assistant`** skill, documented in [`.claude/skills/job-application-assistant/SKILL.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/SKILL.md), provides the core evaluation framework that `/apply` and `/rank` utilize to score job fit against candidate profiles. This architectural separation allows commands to remain purely declarative while skills encapsulate complex, reusable logic.

## Practical Usage Examples

Execute these commands within Claude Code to operate the framework:

```text

# Initialize your candidate profile from existing documents

/setup

```

```text

# Scrape supported portals and generate a ranked shortlist

/scrape
/rank

```

```text

# Apply to a specific job posting with full automation

/apply https://jobindex.dk/job/1234567

```

```text

# Register a custom CV template and scaffold a new portal skill

/add-template
/add-portal

```

```text

# Synchronize outcomes to Notion (read-only operation)

/notion-sync

```

## Summary

- **Agent commands** are markdown specifications stored in `.claude/commands/` that define executable workflows for the AI Job Search Framework.
- Execution follows a **data-only** model, restricting modifications to repository-local files like `job_search_tracker.csv` and [`outcome.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/outcome.md).
- The command ecosystem spans four categories: **core workflow**, **post-apply utilities**, **enhancement tools**, and **customization generators**.
- Security is enforced through [`.claude/settings.json`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/settings.json), which maintains an allowlist of permitted slash commands.
- Skills located in `.claude/skills/` provide the underlying logic, while commands in `.claude/commands/` provide the orchestration layer.

## Frequently Asked Questions

### Where are agent commands stored in the repository?

Agent commands reside as individual markdown files within the `.claude/commands/` directory. According to the source code structure, each filename corresponds directly to its slash command invocation (e.g., [`setup.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/setup.md) for `/setup` and [`apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/apply.md) for `/apply`).

### How do I add a new agent command to the framework?

Create a new `.md` file in `.claude/commands/` containing the step-by-step workflow instructions in markdown format. The continuous integration pipeline automatically lints the syntax and validates the new command against the permission allowlist defined in [`.claude/settings.json`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/settings.json).

### What is the difference between an agent command and a skill?

Agent commands are high-level orchestrators stored in `.claude/commands/` that manage workflows and coordinate data flow between files. **Skills** are modular capabilities located in `.claude/skills/` that encapsulate specific domain logic, such as the `job-application-assistant` skill used by `/apply` and `/rank` to evaluate job fit.

### Can agent commands modify files outside the repository?

No. The framework implements a strict data-only philosophy where commands read and write only within the repository's own file structure, specifically targeting `documents/`, `job_search_tracker.csv`, and [`outcome.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/outcome.md). External systems like Gmail or Notion are accessed read-only or via explicit user-approved integrations, ensuring the permission model in [`.claude/settings.json`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/settings.json) cannot be bypassed.