linkedin-export

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LinkedIn Export Skill

LinkedIn导出数据处理技能

Parse LinkedIn GDPR data exports into structured JSON, then search messages, analyze connections, export to Markdown, and ingest into RLAMA for semantic search.
将LinkedIn GDPR数据导出文件解析为结构化JSON,随后可进行消息搜索、人脉分析、导出为Markdown格式,或导入至RLAMA进行语义搜索。

Prerequisites

前置要求

  • Python 3.10+ via
    uv
  • LinkedIn GDPR export ZIP — Request at: LinkedIn → Settings → Data Privacy → Get a copy of your data
  • RLAMA + Ollama (optional, for semantic search ingestion)
  • Python 3.10+(通过
    uv
    安装)
  • LinkedIn GDPR导出ZIP文件 — 申请路径:LinkedIn → 设置 → 数据隐私 → 获取你的数据副本
  • RLAMA + Ollama(可选,用于语义搜索导入)

Quick Start

快速开始

bash
undefined
bash
undefined

1. Parse the export ZIP (run once)

1. 解析导出ZIP文件(仅需运行一次)

uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py ~/Downloads/Basic_LinkedInDataExport_*.zip
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py ~/Downloads/Basic_LinkedInDataExport_*.zip

2. Search, analyze, export, or ingest

2. 搜索、分析、导出或导入数据

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --list-partners uv run ~/.claude/skills/linkedin-export/scripts/li_network.py summary uv run ~/.claude/skills/linkedin-export/scripts/li_export.py all --output ~/linkedin-archive/ uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py

All scripts read from `~/.claude/skills/linkedin-export/data/parsed.json`. Parse once, query many times.

---
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --list-partners uv run ~/.claude/skills/linkedin-export/scripts/li_network.py summary uv run ~/.claude/skills/linkedin-export/scripts/li_export.py all --output ~/linkedin-archive/ uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py

所有脚本均读取`~/.claude/skills/linkedin-export/data/parsed.json`文件。只需解析一次,即可多次查询。

---

Parse —
li_parse.py

解析工具 —
li_parse.py

Unzip and parse all CSVs from the LinkedIn GDPR export into structured JSON.
bash
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py <linkedin-export.zip>
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py <zip> --output /custom/path.json
Output:
~/.claude/skills/linkedin-export/data/parsed.json
Parses: messages, connections, profile, positions, education, skills, endorsements, invitations, recommendations, shares, reactions, certifications.
Auto-detects CSV column names (case-insensitive) to handle LinkedIn format changes between exports.

将LinkedIn GDPR导出文件中的所有CSV解压并解析为结构化JSON格式。
bash
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py <linkedin-export.zip>
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py <zip> --output /custom/path.json
输出文件
~/.claude/skills/linkedin-export/data/parsed.json
可解析内容:消息、人脉、个人资料、工作经历、教育背景、技能、技能认可、人脉邀请、推荐信、动态分享、互动反应、证书。
自动检测CSV列名(不区分大小写),以适配不同版本LinkedIn导出文件的格式变化。

Search Messages —
li_search.py

消息搜索工具 —
li_search.py

Search messages by person, keyword, date range, or combination.
bash
undefined
按联系人、关键词、日期范围或组合条件搜索消息。
bash
undefined

Search by person

按联系人搜索

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --person "Jane Doe"
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --person "Jane Doe"

Search by keyword

按关键词搜索

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "project proposal"
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "project proposal"

Date range

按日期范围搜索

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --after 2025-01-01 --before 2025-06-01
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --after 2025-01-01 --before 2025-06-01

Combined filters

组合条件过滤

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --person "Jane" --keyword "meeting" --after 2025-06-01
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --person "Jane" --keyword "meeting" --after 2025-06-01

Full conversation by ID

按会话ID查看完整对话

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --conversation "CONVERSATION_ID"
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --conversation "CONVERSATION_ID"

List all conversation partners (sorted by message count)

列出所有对话联系人(按消息数量排序)

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --list-partners
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --list-partners

Show context around matches

显示匹配结果的上下文内容

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "AI" --context 3
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "AI" --context 3

Full message content + JSON output

显示完整消息内容并输出JSON格式

uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "proposal" --full --json

**Flags**: `--person`, `--keyword`, `--after`, `--before`, `--conversation`, `--list-partners`, `--context N`, `--full`, `--limit N`, `--json`

---
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "proposal" --full --json

**可用参数**:`--person`, `--keyword`, `--after`, `--before`, `--conversation`, `--list-partners`, `--context N`, `--full`, `--limit N`, `--json`

---

Network Analysis —
li_network.py

人脉网络分析工具 —
li_network.py

Analyze the connection graph — companies, roles, timeline.
bash
undefined
分析人脉关系图谱——包括所属公司、职位、时间线等。
bash
undefined

Summary stats

查看汇总统计

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py summary
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py summary

Top companies by connection count

按人脉数量查看Top公司

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py companies --top 20
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py companies --top 20

Connection timeline

人脉增长时间线

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py timeline --by year uv run ~/.claude/skills/linkedin-export/scripts/li_network.py timeline --by month
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py timeline --by year uv run ~/.claude/skills/linkedin-export/scripts/li_network.py timeline --by month

Role/title distribution

职位/头衔分布

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py roles --top 20
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py roles --top 20

Search connections

搜索人脉

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py search "Anthropic"
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py search "Anthropic"

Export connections to CSV or JSON

将人脉导出为CSV或JSON格式

uv run ~/.claude/skills/linkedin-export/scripts/li_network.py export --format csv uv run ~/.claude/skills/linkedin-export/scripts/li_network.py export --format json

**Subcommands**: `summary`, `companies`, `timeline`, `roles`, `search`, `export`

---
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py export --format csv uv run ~/.claude/skills/linkedin-export/scripts/li_network.py export --format json

**可用子命令**:`summary`, `companies`, `timeline`, `roles`, `search`, `export`

---

Export to Markdown —
li_export.py

Markdown导出工具 —
li_export.py

Convert parsed data to clean Markdown files.
bash
undefined
将解析后的数据转换为整洁的Markdown文件。
bash
undefined

Export messages (one file per conversation)

导出消息(每个对话一个文件)

uv run ~/.claude/skills/linkedin-export/scripts/li_export.py messages --output ~/linkedin-archive/messages/
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py messages --output ~/linkedin-archive/messages/

Export connections as Markdown table

将人脉导出为Markdown表格

uv run ~/.claude/skills/linkedin-export/scripts/li_export.py connections --output ~/linkedin-archive/connections.md
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py connections --output ~/linkedin-archive/connections.md

Export everything

导出所有数据

uv run ~/.claude/skills/linkedin-export/scripts/li_export.py all --output ~/linkedin-archive/
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py all --output ~/linkedin-archive/

Export RLAMA-optimized documents

导出适配RLAMA的优化文档

uv run ~/.claude/skills/linkedin-export/scripts/li_export.py rlama --output ~/linkedin-archive/rlama/

**Subcommands**: `messages`, `connections`, `all`, `rlama`

---
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py rlama --output ~/linkedin-archive/rlama/

**可用子命令**:`messages`, `connections`, `all`, `rlama`

---

RLAMA Ingestion —
li_ingest.py

RLAMA导入工具 —
li_ingest.py

Prepare RLAMA-optimized documents and create a semantic search collection.
bash
undefined
生成适配RLAMA的优化文档并创建语义搜索集合。
bash
undefined

Full pipeline: prepare docs + create RLAMA collection

完整流程:生成文档 + 创建RLAMA集合

uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py
uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py

Prepare docs only (no RLAMA required)

仅生成文档(无需RLAMA)

uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py --prepare-only
uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py --prepare-only

Rebuild existing collection

重建现有集合

uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py --rebuild

**Collection**: `linkedin-tdimino` (fixed/600/100 chunking, BM25-heavy hybrid search)

**Query examples**:
```bash
rlama run linkedin-tdimino --query "What did I discuss with [person]?"
rlama run linkedin-tdimino --query "Who works at [company]?"
rlama run linkedin-tdimino --query "What are my top skills?"
RLAMA document structure:
  • messages-conversations-{a-f,g-l,m-r,s-z}.md
    — Conversations grouped alphabetically
  • connections-companies.md
    — Connections by company
  • connections-timeline.md
    — Connections by year
  • profile-positions-education.md
    — Resume data
  • endorsements-skills.md
    — Skills and endorsements
  • shares-reactions.md
    — Posts and activity
  • INDEX.md
    — Collection metadata

uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py --rebuild

**集合名称**:`linkedin-tdimino`(固定600/100分块,侧重BM25的混合搜索)

**查询示例**:
```bash
rlama run linkedin-tdimino --query "我和[某人]讨论过什么内容?"
rlama run linkedin-tdimino --query "谁在[某公司]工作?"
rlama run linkedin-tdimino --query "我的核心技能有哪些?"
RLAMA文档结构
  • messages-conversations-{a-f,g-l,m-r,s-z}.md
    — 按字母分组的对话内容
  • connections-companies.md
    — 按公司分类的人脉
  • connections-timeline.md
    — 按年份分类的人脉
  • profile-positions-education.md
    — 简历相关数据
  • endorsements-skills.md
    — 技能与技能认可
  • shares-reactions.md
    — 动态与互动
  • INDEX.md
    — 集合元数据

Data Format Reference

数据格式参考

See
references/linkedin-export-format.md
for complete CSV column documentation.
Key files in the LinkedIn export ZIP:
CSVContents
messages.csv
All messages and InMail
Connections.csv
1st-degree connections
Profile.csv
Profile data
Positions.csv
Work history
Education.csv
Education
Skills.csv
Listed skills
Endorsement_Received_Info.csv
Endorsements
Invitations.csv
Connection requests
Recommendations_Received.csv
Recommendations
Shares.csv
Posts and shares
Reactions.csv
Post reactions
Certifications.csv
Certifications

完整CSV列说明请查看
references/linkedin-export-format.md
LinkedIn导出ZIP中的关键文件
CSV文件内容
messages.csv
所有消息和站内信
Connections.csv
一级人脉
Profile.csv
个人资料数据
Positions.csv
工作经历
Education.csv
教育背景
Skills.csv
已列出的技能
Endorsement_Received_Info.csv
获得的技能认可
Invitations.csv
人脉邀请
Recommendations_Received.csv
收到的推荐信
Shares.csv
动态与分享内容
Reactions.csv
动态互动反应
Certifications.csv
证书

Script Selection Guide

脚本选择指南

TaskScriptExample
First-time setup
li_parse.py
Parse the ZIP
Find a conversation
li_search.py --person
Search by person name
Find a topic
li_search.py --keyword
Search by keyword
Who do I talk to most?
li_search.py --list-partners
Sorted partner list
Company breakdown
li_network.py companies
Top companies
Network growth
li_network.py timeline
Connections over time
Archive messages
li_export.py messages
Markdown per conversation
Semantic search
li_ingest.py
RLAMA collection
任务对应脚本示例
首次配置
li_parse.py
解析ZIP文件
查找特定对话
li_search.py --person
按联系人姓名搜索
查找特定主题
li_search.py --keyword
按关键词搜索
查看对话最频繁的联系人
li_search.py --list-partners
按消息数排序的联系人列表
公司分布统计
li_network.py companies
查看Top公司
人脉增长趋势
li_network.py timeline
按时间查看人脉增长
归档消息
li_export.py messages
按对话导出为Markdown
语义搜索
li_ingest.py
创建RLAMA搜索集合