---
name: ccrm-linkedhelper
description: Inspect, plan, or modify LinkedHelper import and webhook work in the CCRM recruiting system. Use when Codex handles LinkedHelper CSV imports, linkedhelper-webhook payloads, candidate deduplication by LinkedIn URL, employment history extraction, webhook replay, or migration/export planning for LinkedHelper-derived candidate data.
---

# CCRM LinkedHelper

## Overview

Use this skill for LinkedHelper-derived inbound data. In this repo LinkedHelper is an import/source pipeline for LinkedIn profile data, not the outbound LinkedIn sender. Keep LinkedHelper import separate from Unipile outreach execution.

## Workflow

1. Read `references/linkedhelper-imports.md` before changing import behavior or planning data migration.
2. Inspect `supabase/functions/linkedhelper-webhook/index.ts` for webhook ingestion.
3. Inspect `src/lib/linkedHelperImport.ts` for CSV upload/import behavior.
4. Preserve deduplication by normalized `linkedin_url`.
5. Preserve employment-history extraction and company creation behavior unless the migration plan explicitly replaces it.

## Repository Touchpoints

- `supabase/functions/linkedhelper-webhook/index.ts`
- `supabase/functions/retry-failed-webhooks/index.ts`
- `supabase/functions/extract-employment-history/index.ts`
- `src/lib/linkedHelperImport.ts`
- `supabase/migrations/*webhook_logs*`
- `supabase/migrations/*employment_history*`
- Core tables: `candidates`, `clients`, `employment_history`, `webhook_logs`

## Safety Rules

- Do not treat imported LinkedIn profile data as consent for automated outreach.
- Preserve `consent_outreach=false` defaults for imported candidates unless the user explicitly defines a compliant consent source.
- Never overwrite richer existing candidate/contact data with sparse webhook data.
- Log raw webhook payloads before transformation so failed imports can be replayed.
- Keep field mapping tolerant: LinkedHelper exports may use title-case CSV columns or lowercase webhook keys.
- Keep import idempotent; repeated webhooks should merge/update, not duplicate people.

## Implementation Bias

- Prefer staging tables or dry-run imports when migrating historical LinkedHelper data.
- Validate counts before and after import: candidates, companies/clients, contacts, employment-history rows, failed webhook logs.
- Keep Unipile outbound work in the Unipile skill; do not overload LinkedHelper import code with sending.
