Skip to content
Career
Command

/add-template

You are helping the user register their own CV or cover letter template with the AI Job Search framework — LaTeX, Typst, or any other toolchain that compiles to PDF from the command line. The framework ships with moderncv (banking style) for CVs and a custom `cover.cls` for

From plugin
ai-job-search
68k12 skills3 agents12 commands
$ npx -y skills add ai-job-search-dev/ai-job-search --agent claude-code

Command definition

add-template.md

/add-template - Register a Custom CV or Cover Letter Template

You are helping the user register their own CV or cover letter template with the AI Job Search framework — LaTeX, Typst, or any other toolchain that compiles to PDF from the command line. The framework ships with moderncv (banking style) for CVs and a custom `cover.cls` for cover letters. This command lets the user swap in their own template: store the template files, capture usage instructions (source extension, compile command, fonts, style rules, page limits), verify the template compiles, and wire it into the `/apply` workflow so every future application uses it.

`$ARGUMENTS` may contain a subcommand, a file path, or nothing.

Follow these steps **in order**.

---

Step 0: Parse Arguments

  • If `$ARGUMENTS` contains `--list`: run **List Mode** below and stop.
  • If `$ARGUMENTS` contains `--use <name>`: run **Switch Mode** below, then continue to **Step 5: Activate** with the resolved template metadata. `--use default` deactivates any custom template and restores the stock guidance (see Step 5).
  • If `$ARGUMENTS` contains a file path or @-mentioned file: treat it as the template source and carry it into Step 1.
  • Otherwise: start the registration flow at Step 1.

List Mode

Use Glob with `templates/**/TEMPLATE.md` to find registered templates. For each, read the manifest and print a table:

## Registered Templates

| Name | Type | Source | Toolchain | Fonts | Active |
|------|------|--------|-----------|-------|--------|
| <name> | CV / Cover letter | .tex/.typ/... | lualatex/typst/... | <main font> | yes/no |

A template is **active** if `05-cv-templates.md` (CV) or `06-cover-letter-templates.md` (cover letter) contains an `ACTIVE-TEMPLATE` managed block naming it. If no custom templates exist, say so and explain that `/add-template` registers one. Stop here.

Switch Mode

If `$ARGUMENTS` contains `--use <name>`:

1. If `<name>` is `default`, skip template resolution and continue to Step 5 with `default` as the activation target. 2. Use Glob with `templates/**/TEMPLATE.md` and find manifests whose parent folder name exactly matches `<name>`. 3. If no manifest matches, stop and say the template is not registered. Suggest `/add-template --list` to see available names. 4. If more than one manifest matches, stop and list the matching manifest paths. Ask the user to rename one of the templates; activation must be unambiguous. 5. Read the matching `TEMPLATE.md` and extract:

  • **Type:** `CV` or `Cover letter`
  • **Source extension:** e.g. `.tex`, `.typ`
  • **Compile command:** the full declared command
  • **Engine/toolchain:** e.g. `lualatex`, `typst` (display label)
  • **Page limit:** `<N> page(s)`
  • **Fonts:** the full font summary line

6. Derive the template folder from the manifest path and verify `template<source-extension>` exists in the same folder. If it is missing, stop with an error; the template registration is incomplete. 7. Derive `<type>` for Step 5 from the manifest path:

  • `templates/cv/<name>/TEMPLATE.md` -> `cv`
  • `templates/cover_letters/<name>/TEMPLATE.md` -> `cover_letters`

8. Continue to Step 5 using the resolved `<name>`, `<type>`, `<source-extension>`, `<compile-command>`, engine/toolchain label, font summary, page limit, template skeleton path, and manifest path. Do not re-run Steps 1-4; `--use` switches an already-registered template.

---

Step 1: Template Type and Source

Ask the user (skip anything already answered by `$ARGUMENTS`):

1. **Type:** Is this a **CV** template or a **cover letter** template? 2. **Source:** Where is the template? Accept any of:

  • A path or @-mention of a source file in any toolchain (`.tex` plus optional `.cls`/`.sty`, `.typ` plus optional local packages, or another compile-to-PDF format)
  • Pasted template content
  • A directory containing the template and its assets (class/package files, fonts, images)

Read every provided file. If the template references an include the declared toolchain doesn't ship by default — a custom `.cls`/`.sty` not part of standard TeX distributions, a Typst package imported via a local `#import`, or an equivalent for another toolchain — confirm the user has the file and ask for it if missing — the template cannot compile without it.

---

Step 2: Capture Template Instructions

Interview the user for the metadata that `/apply` needs to use the template correctly. Infer as much as possible from the source first (LaTeX: documentclass, `\fontspec` calls, geometry, colors; Typst: `#set`/`#show` rules, `#import`s; other toolchains: whatever the format exposes) and present your inferences for confirmation rather than asking blind questions.

Collect:

1. **Name** - short kebab-case identifier (e.g. `awesome-cv`, `classic-serif`). Must not collide with an existing folder in `templates/`. 2. **Source extension** - the main file's extension (`.tex`, `.typ`, ...), inferred from the provided source file. 3. **Compile command** - the full command `/apply` and Step 4's test compile will run, using `<file>` (no extension) as the placeholder for the output basename:

  • **`.tex` source**: infer the engine the same way as before - if the source uses `fontspec` or loads font files by path, it requires `xelatex` or `lualatex`; tell the user this rather than letting them pick `pdflatex`. Render as `rm -f <file>.pdf && mkdir -p build && lualatex -interaction=nonstopmode -output-directory=build <file>.tex && mv build/<file>.pdf ./` (or the appropriate engine).
  • **`.typ` source**: default to `typst compile <file>.typ <file>.pdf` - Typst has a single binary, no engine choice.
  • **Anything else**: no built-in guidance; ask the user for the exact compile command.

**Build directory rule:** if the toolchain can redirect its intermediate files, the declared command sends them to a `build/` folder beside the source, and still leaves the PDF next to the source, where `/apply` reads it. For LaTeX, use `-output-

Read more
@madslorentzen
Ships withai-job-search

The job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.

68k3 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
68.5k
Star history of MadsLorentzen/ai-job-search on GitHub, a chart by star-history.com

Other commands on ai-job-search.

add-portal

add-portal

Command

You are helping the user build a job-portal search skill for a job board in their market. The repo ships worked examples of the…

apply

apply

Command

You are orchestrating a two-agent job application workflow. The job posting is provided below as `$ARGUMENTS` (either a URL or…

expand

expand

Command

You are enriching the candidate profile by discovering competencies hidden in documents and public online presence. This command…

gmail-sync

gmail-sync

Command

You are scanning the user's Gmail for status signals on tracked job applications (interview invites, assessment links, offers,…

interview

interview

Command

You are preparing the user for a real, scheduled interview on one of their applications. The frameworks for this already exist -…

More commands from other plugins.

setup

setup

Command

Setup wizard for lockedin. Walks the user through: (1) wiring the HUD into Claude Code's statusLine, (2) default Q&A interview…

lockedin5mo127
@daypunk@daypunkInstall Command