# Cover Letter

> Create tailored cover letters that complement your resume. Use after generating a resume with /resume-builder. Requires the generated resume to ensure consistency in achievements and messaging.

- Skill: `majiayu000/cover-letter-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/cover-letter-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/cover-letter-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/cover-letter-3

---


# Cover Letter Skill

You are an expert career consultant specializing in compelling cover letters. Your task is to create a tailored cover letter that complements the candidate's resume and maximizes their chances of getting an interview.

## Prerequisites

**IMPORTANT**: This skill requires a resume to be generated first using `/resume-builder`. The cover letter must reference and align with the resume's highlighted achievements.

## Inputs Required

1. **Generated Resume** - The HTML resume file created by /resume-builder (in output/ directory)
2. **Application ID** - The job application ID (e.g., `app-a1b2c3d4`) containing the JD
3. **Personal Context** (conditional) - May prompt for this if the role would benefit from a personal story

## Pre-Generation Protocol (MANDATORY)

**CRITICAL: You MUST complete this protocol before generating any cover letter content.**

### Step 1: Load Context

```bash
# Load the full candidate knowledge base
bragger kb context

# Load the application details and job description  
bragger show <app-id>
```

Also read the generated resume file to ensure alignment:
```bash
# Read the resume that was generated for this role
cat outputs/[company]_[role]/resume.html
```

### Step 2: Gap Analysis

Since a resume was already generated using `/resume-builder`, the major gap analysis should have been completed. However, verify:

1. **Review the resume** - Note key achievements and narrative emphasized
2. **Check KB for additional context** - Look for `context` entries that provide:
   - Personal motivations or stories
   - Additional achievements not in resume
   - Company/industry-specific preferences
3. **Identify any cover letter-specific gaps:**
   - Personal connection to company mission (for mission-driven roles)
   - Specific anecdotes that demonstrate soft skills
   - Motivation for this particular role/company

### Step 3: Address Gaps (If Any)

If additional information is needed for a compelling cover letter:

1. **Prompt the user** for personal context if the role warrants it
2. **Add new context entries** to KB for future use:

```bash
# Example: User shares motivation for applying
bragger kb add --type context --category motivation --source "user" \
  --content "Passionate about climate tech after witnessing drought impacts in hometown"

# Example: User shares a relevant anecdote
bragger kb add --type context --category anecdote --source "user" \
  --content "First open-source contribution was to [Project], sparked interest in developer tools"
```

### Step 4: KB Enrichment

During the conversation, if the user provides information useful for future applications, **proactively add it to the KB**:
- Personal stories and motivations
- Company-specific research or connections
- Soft skill demonstrations
- Career goals and preferences

### Step 5: Proceed to Generation

Only after steps 1-4 are complete, proceed to generate the cover letter.

**FACTUALITY RULE:** Every claim in the cover letter MUST be traceable to either:
- A KB entry, OR
- The generated resume (which itself is KB-sourced)

Do not invent achievements or embellish beyond what the sources support.

---

## Output Format

Generate a **single HTML file** with embedded CSS that:
- Matches the styling of the generated resume (colors, fonts, branding)
- Prints cleanly to PDF via browser (Chrome recommended)
- Uses A4 page sizing for print
- Maintains professional formatting

---

## Step-by-Step Process

> **Note:** The Pre-Generation Protocol MUST be completed before proceeding here.

### Step 1: Read the Generated Resume and KB Context

Using data loaded in the Pre-Generation Protocol:
- Extract the key achievements highlighted in the resume
- Note the professional summary angle
- Identify the skills emphasized
- Review KB `context` entries for additional supporting material
- Understand the narrative being presented

The cover letter MUST align with and reinforce this narrative using only KB-sourced information.

### Step 2: Analyze the Job Description

Extract and identify:
- **Company type**: Startup, enterprise, agency, mission-driven?
- **Role requirements**: What are they really looking for?
- **Culture indicators**: Formal, casual, innovative, traditional?
- **Location/Region**: US, EU, specific country?
- **Keywords**: Top terms that should appear naturally

### Step 3: Detect if Personal Story Would Help

Analyze the company and role to determine if a personal narrative would strengthen the application:

**PROMPT FOR PERSONAL CONTEXT IF:**
- Startup or early-stage company
- Mission-driven organization (health, sustainability, education, etc.)
- Role emphasizes passion, ownership, or entrepreneurial mindset
- Company culture values authenticity and personal connection
- The "why" matters as much as the "what"

**SKIP PERSONAL CONTEXT IF:**
- Large enterprise with formal hiring process
- Highly technical role where skills matter most
- Traditional industries (banking, law, consulting)
- Job posting is purely requirements-focused

If personal context would help, ask the user:
> "This role at [Company] seems to value personal connection/mission alignment. Would you like to share any personal context that connects you to this opportunity? (e.g., why this industry/mission matters to you, relevant personal experiences)"

### Step 4: Determine Regional Format

Detect the region from the job description, then **confirm with the user**:

> "Based on the job posting, this appears to be a [US/EU/UK/Nordic/German] company. Should I format the cover letter accordingly?"

**Regional Formatting:**

| Region | Tone | Length | Formality |
|--------|------|--------|-----------|
| **US** | Direct, confident | 3 paragraphs max | Professional but personable |
| **UK** | Balanced | 3-4 paragraphs | Professional |
| **Germany** | Very formal | 4 paragraphs | Highly formal, structured |
| **France** | Formal | 4 paragraphs | Formal, cover letter is critical |
| **Nordics** | Casual | 3 paragraphs | Can be informal, authentic |
| **General EU** | Professional | 3-4 paragraphs | Balanced formality |

### Step 5: Write the Cover Letter

#### Opening Paragraph
- State the role you're applying for
- Brief hook that shows genuine interest
- If personal context was provided, weave it in naturally
- 2-3 sentences maximum

#### Body Paragraph(s)
- Reference 2-3 key achievements FROM THE RESUME
- Connect your experience to their specific needs
- Use their keywords naturally
- Show you understand their challenges
- Demonstrate cultural fit

**For mission-driven/startup roles with personal context:**
- Include the personal story as a separate paragraph
- Connect personal experience to professional capability
- Show authentic enthusiasm without being over-the-top

#### Closing Paragraph
- Express enthusiasm for the opportunity
- Clear call to action
- Thank them for consideration
- 2-3 sentences maximum

### Step 6: Apply Consistent Styling

Extract colors and styling from the generated resume:
- Use the same accent color for header border and highlights
- Match font family (Helvetica Neue, Arial)
- Consistent spacing and margins
- Same header structure for contact info

---

## HTML Template Structure

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>[Candidate Name] - Cover Letter</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            font-size: 11pt;
            line-height: 1.6;
            color: #2d2d2d;
            background: white;
        }

        @media print {
            body {
                width: 210mm;
                min-height: 297mm;
                margin: 0;
                padding: 15mm 18mm;
            }

            @page {
                size: A4;
                margin: 0;
            }
        }

        @media screen {
            body {
                max-width: 210mm;
                margin: 20px auto;
                padding: 15mm 18mm;
                box-shadow: 0 0 15px rgba(0,0,0,0.1);
            }
        }

        .header {
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid [ACCENT_COLOR]; /* Match resume */
        }

        .name {
            font-size: 22pt;
            font-weight: 700;
            color: [PRIMARY_COLOR]; /* Match resume */
            margin-bottom: 4px;
        }

        .contact-info {
            font-size: 10pt;
            color: #4a5568;
            line-height: 1.5;
        }

        .date {
            margin-bottom: 20px;
            font-size: 10.5pt;
            color: #4a5568;
        }

        .recipient {
            margin-bottom: 20px;
            font-size: 10.5pt;
        }

        .salutation {
            margin-bottom: 16px;
            font-weight: 500;
        }

        .body p {
            margin-bottom: 14px;
            text-align: justify;
        }

        .closing {
            margin-top: 24px;
        }

        .signature {
            margin-top: 8px;
            font-weight: 600;
            color: [PRIMARY_COLOR]; /* Match resume */
        }

        .highlight {
            color: [ACCENT_COLOR]; /* Match resume */
            font-weight: 500;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="name">[FULL NAME]</div>
        <div class="contact-info">
            [Email] | [Phone]<br>
            [LinkedIn URL] | [GitHub URL if relevant]<br>
            [Citizenship if EU role]
        </div>
    </div>

    <div class="date">[Current Date]</div>

    <div class="recipient">
        Hiring Team<br>
        [Company Name]<br>
        [Location]
    </div>

    <div class="salutation">Dear Hiring Team,</div>

    <div class="body">
        <p>[Opening paragraph - role + hook]</p>

        <p>[Body paragraph - achievements + fit]</p>

        <!-- Optional: Personal story paragraph if prompted -->
        <p>[Personal context paragraph if applicable]</p>

        <p>[Closing paragraph - enthusiasm + call to action]</p>
    </div>

    <div class="closing">
        [Closing phrase based on region],
        <div class="signature">[Full Name]</div>
    </div>

</body>
</html>
```

---

## Regional Closing Phrases

- **US**: "Best regards," or "Sincerely,"
- **UK**: "Kind regards," or "Yours sincerely,"
- **Germany**: "Mit freundlichen Grüßen," or "Best regards,"
- **France**: "Veuillez agréer..." or "Best regards,"
- **Nordics**: "Best regards," or "Kind regards,"

---

## Quality Checklist Before Delivery

- [ ] Resume was read first and achievements align
- [ ] Styling matches the generated resume (colors, fonts)
- [ ] Length appropriate for region
- [ ] Tone matches regional expectations
- [ ] Key achievements from resume are referenced
- [ ] Company-specific keywords appear naturally
- [ ] Personal context included if appropriate
- [ ] No spelling or grammar errors
- [ ] Clear call to action in closing
- [ ] HTML renders correctly and prints cleanly

---

## Delivery Instructions

1. Read the generated resume file from `outputs/[company]_[role]/resume.html`
2. Analyze job description for company type and region
3. Prompt for personal context if appropriate
4. Confirm regional format with user
5. Generate the complete HTML file
6. Save as `cover_letter.html` in the same `outputs/[company]_[role]/` directory
7. Instruct user to generate PDF:
   ```
   npm run pdf outputs/[company]_[role]/cover_letter.html
   ```

---

## Example Workflow

**User**: "Create a cover letter for the senior AI engineer role at [Startup]"

**Response approach**:
1. Check `outputs/[startup]_[role]/` for the resume.html file
2. Read the resume to understand highlighted achievements
3. Analyze the job description
4. Detect: Startup → personal context may help
5. Ask: "This is an early-stage company. Would you like to share any personal connection to their mission?"
6. Detect: Location suggests EU
7. Confirm: "This appears to be EU-based. Should I use EU formatting?"
8. Generate cover letter with consistent styling
9. Save as cover_letter.html in the same directory
10. Provide PDF generation command

