# How `/expand` Enriches Candidate Profiles from Online Sources in ai-job-search

> Discover how MadsLorentzen/ai-job-search's /expand command enriches candidate profiles by adding competency signals from online sources without overwriting data. Learn about additive enrichment and source traceability.

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

---

**The `/expand` command performs additive enrichment by scanning local documents and public URLs to append new competency signals—never overwriting existing content—while preserving full source traceability for idempotent updates.**

The `ai-job-search` repository by MadsLorentzen provides a structured approach to managing job applications through Claude Code commands. When you need to enrich candidate profiles from online sources, the `/expand` command implements a deterministic, six-step pipeline that discovers, validates, and appends competency signals derived from both local documents and public web presence.

## Understanding the /expand Workflow

The command specification in [`.claude/commands/expand.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/expand.md) defines a strictly additive pipeline that ensures **idempotence**—running the command multiple times produces consistent, duplicate-free results.

### Step 0 – Read Existing Profile

Before fetching new data, `/expand` loads the two canonical profile files into memory to establish a baseline and prevent duplicates.

- **Primary Profile**: [`.claude/skills/job-application-assistant/01-candidate-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/01-candidate-profile.md) (technical skills, domain knowledge)
- **Behavioral Profile**: [`.claude/skills/job-application-assistant/02-behavioral-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/02-behavioral-profile.md) (soft skills, behavioral traits)

This initial load creates the reference set against which all new discoveries are deduplicated.

### Step 1 – Discovery of Experience Items

The command traverses the `documents/` hierarchy to extract URLs and metadata from every experience item. Specifically, it scans:

- **CV documents** in `documents/cv/`
- **LinkedIn exports** in `documents/linkedin/`
- **Diplomas and certifications** in their respective directories
- **Reference letters** and supporting documents
- **GitHub profile**: Extracts the username from [`01-candidate-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/01-candidate-profile.md), then fetches public profile data, pinned repositories, and unpinned repositories
- **External portfolios**: Any URLs pointing to Kaggle, Google Scholar, personal portfolios, or other professional platforms

### Step 2 – Web Enrichment with Dual Strategies

For each discovered item, `/expand` applies two parallel enrichment strategies defined in the specification:

**A. Direct lookup**: Searches for official syllabi, certification exam guides, or tool documentation to extract authoritative competency lists.

**B. Inferred competencies**: Uses reasoning over descriptions, README content, and project details to infer implicit skills not explicitly labeled.

The results from both strategies are merged, creating a comprehensive signal set that captures both certified capabilities and practical expertise.

### Step 3 – Build the Competency Map

All findings are aggregated into a deduplicated map organized into five categories:

1. **Technical Skills – Primary**
2. **Technical Skills – Secondary**
3. **Domain Knowledge**
4. **Methods & Practices**
5. **Soft / Behavioral**

Each entry records its provenance—whether it originated from direct lookup (A), inference (B), or both—ensuring complete traceability.

### Step 4 – Present Grouped Summary

The command generates a human-readable report grouping new competencies by source type:

- Courses & Certifications
- GitHub Repositories
- Job Responsibilities
- Behavioral Signals

The user is prompted to approve, review, or skip each group interactively.

### Step 5 – Write Confirmed Additions

Upon confirmation, `/expand` appends approved items to the appropriate profile sections using source annotations (e.g., `*(GitHub — my-project)*` or `*(Coursera — Deep Learning Specialisation)*`). **Critical constraint**: The command never modifies existing lines—it only appends new entries, preserving the integrity of previously validated content.

### Step 6 – Final Summary Report

The process concludes with a summary documenting:
- Total additions made
- Sources processed and skipped
- Items flagged for manual review

## How Online Sources Are Integrated

The `/expand` command treats online sources as primary evidence signals, extracting competencies through structured parsing and semantic analysis.

### GitHub Profile and Repository Analysis

When a GitHub username is present in [`01-candidate-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/01-candidate-profile.md), the command fetches:

- Public profile metadata
- All repository READMEs (pinned and unpinned)
- Language statistics and repository topics
- Framework and tool mentions in descriptions

These signals populate **Technical Skills** categories, capturing proficiency in programming languages, frameworks, and infrastructure tools evidenced by actual code repositories.

### Portfolio, Kaggle, and Academic URLs

For any portfolio links, Kaggle competition profiles, or Google Scholar pages discovered in the documents:

- Page content is fetched and scanned for tool names, dataset references, and methodology descriptions
- Award mentions and rankings are converted to **Domain Knowledge** or **Soft Skills** entries
- Project descriptions generate inferred competencies based on technologies mentioned

### Course Syllabi and Certification Guides

For each course or certification identified in `documents/cv/` or LinkedIn exports:

- Targeted web searches locate official syllabi or exam objectives
- Learning outcomes are extracted and mapped to technical skills or domain knowledge
- Vendor-specific certifications (e.g., AWS, Azure) trigger lookups of official competency frameworks

## Using /expand: Practical Examples

### Running the Command

Execute the enrichment process from the repository root:

```bash

# Launch the full enrichment workflow

ai-job-search /expand

```

This initiates the discovery phase, fetches all public URLs, applies dual-strategy enrichment, and presents the grouped summary.

### Reviewing the Output

When `/expand` completes discovery, expect output structured like this:

```text

## /expand found 12 new competency signals across 4 sources

**COURSES & CERTIFICATIONS**
Source: Coursera — Deep Learning Specialisation
  + Neural Networks
  + Convolutional Architectures
  + Gradient Descent Optimization

**GITHUB — my-awesome-project**
Source: README + inferred from tech stack
  + Python
  + FastAPI
  + Docker
  + PostgreSQL

**JOB RESPONSIBILITIES — Acme Corp, Data Engineer**
Source: CV bullets + direct tool lookup
  + Airflow orchestration
  + Spark data pipelines
  + CI/CD with GitHub Actions

**BEHAVIORAL SIGNALS**
Source: Reference letter — Jane Doe
  + Strong communication
  + Leadership in cross‑functional teams

> How would you like to proceed?
> - `all`   — Add everything above to your profile
> - `review`— Walk through each source group one at a time
> - `skip`  — Cancel without writing anything

```

### Selective Additions

To review and selectively add competencies:

```bash
ai-job-search /expand review

```

The agent presents each source group individually. You can type commands like:
- `add GitHub`
- `skip Courses`
- `add all else`

After confirmation, the tool updates the profile files with source annotations:

```markdown

# In .claude/skills/job-application-assistant/01-candidate-profile.md

Technical Skills — Primary
- Python (GitHub — my-awesome-project)
- FastAPI (GitHub — my-awesome-project)

Domain Knowledge
- Neural Networks (Coursera — Deep Learning Specialisation)

```

```markdown

# In .claude/skills/job-application-assistant/02-behavioral-profile.md

Strongest Behavioral Traits
- Strong communication (Reference letter — Jane Doe)
- Leadership in cross‑functional teams (Reference letter — Jane Doe)

```

## Key Design Principles

The `/expand` command adheres to four core principles defined in [`.claude/commands/expand.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/expand.md):

- **Additive-only**: Never overwrites existing profile content
- **Source-traceable**: Every competency carries a source annotation for auditability
- **Dual-approach enrichment**: Combines explicit lookup with inferred reasoning for comprehensive coverage
- **Explicit confirmation**: Requires user approval before persisting any changes, preventing unintended profile modifications

## Summary

- **`/expand`** enriches candidate profiles by scanning local documents in `documents/cv/`, `documents/linkedin/`, and other directories while fetching public URLs from GitHub, portfolios, and course platforms.
- The command implements a **six-step workflow** (read, discover, enrich, map, present, write) that ensures **idempotent**, additive updates.
- **Dual enrichment strategies** combine direct lookups of official documentation with inference from descriptions to capture both certified and practical competencies.
- All additions are **source-annotated** (e.g., `*(GitHub — project-name)*`) and organized into five categories: Technical Skills (Primary/Secondary), Domain Knowledge, Methods & Practices, and Soft/Behavioral signals.
- The command requires explicit user confirmation through an interactive review process before appending new items to [`.claude/skills/job-application-assistant/01-candidate-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/01-candidate-profile.md) or [`02-behavioral-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/02-behavioral-profile.md).

## Frequently Asked Questions

### Does `/expand` overwrite existing profile content?

No. The command operates on a strictly **additive-only** principle. As implemented in [`.claude/commands/expand.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/expand.md) (lines 165-180), `/expand` appends new competency items below existing entries while adding source annotations, ensuring previously validated skills remain untouched and maintaining profile integrity across multiple runs.

### What online sources does `/expand` support?

The command supports **GitHub profiles and repositories** (fetching READMEs, languages, and topics), **portfolio websites**, **Kaggle profiles**, **Google Scholar pages**, and any **course or certification URLs** found in your documents. For each URL, it attempts to extract tool names, methodologies, and competency indicators to build a comprehensive skill map.

### How does `/expand` ensure accuracy of inferred competencies?

Accuracy is maintained through **dual-strategy validation**. The command performs **direct lookups** of official syllabi and documentation to establish ground truth, while **inferred competencies** are derived from contextual analysis of project descriptions and README content. Each signal is tagged with its origin (lookup vs. inference), allowing you to review and approve items before they are added to your profile.

### When should I run `/expand` in my workflow?

Run `/expand` immediately after the initial `/setup` to surface hidden skills from existing documents, whenever you add **new online artifacts** (such as a fresh GitHub repository or completed certification), or prior to running `/upskill` to ensure the skill-gap analysis operates against the most complete competency set possible.