关于 linkedin-export
用于将 LinkedIn GDPR 导出 ZIP 转为结构化数据的命令行技能,可搜索、分析、导出为 Markdown,或准备语义搜索。适合归档和探索 LinkedIn 活动数据。
主要功能
- 01将导出 CSV 解析为 JSON
- 02按人物、关键词或日期搜索消息
- 03分析联系人公司与时间线
- 04将消息等数据导出为 Markdown
- 05准备 RLAMA 语义搜索文档
适用场景
- 01按人物或主题查找对话
- 02按公司或年份查看联系人
- 03创建 LinkedIn 数据的 Markdown 存档
- 04使用 RLAMA 对导出数据进行语义搜索
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ tdimino/ claude-code-minoan --skill linkedin-export安装后在 Claude Code 中输入/linkedin-export确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdreferences/linkedin-export-format.mdscripts/li_export.pyli_ingest.pyli_network.pyli_parse.pyli_search.py详细介绍
LinkedIn 导出技能
将 LinkedIn GDPR 数据导出文件解析为结构化 JSON,然后搜索消息、分析人脉、导出为 Markdown,并导入 RLAMA 以进行语义搜索。
前提条件
- 通过
uv使用 Python 3.10+ - LinkedIn GDPR 导出 ZIP — 申请路径:LinkedIn → Settings → Data Privacy → Get a copy of your data
- RLAMA + Ollama(可选,用于语义搜索导入)
快速开始
# 1. Parse the export ZIP (run once)
uv run ~/.claude/skills/linkedin-export/scripts/li_parse.py ~/Downloads/Basic_LinkedInDataExport_*.zip
# 2. Search, analyze, export, or ingest
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 读取数据。解析一次,多次查询。
解析 — li_parse.py
解压 LinkedIn GDPR 导出文件,并将其中所有 CSV 解析为结构化 JSON。
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
解析 23 种 CSV 类型:
核心:消息、人脉、个人资料、职位、教育经历、技能、认可、邀请、推荐、分享、回应、证书
扩展:评论(548)、项目(3)、荣誉(2)、组织(3)、志愿服务(1)、语言(9)、活动(12)、关注的会员(828)、职位申请(443,合并自多个文件)、给出的推荐(3)、推断信息(4)
自动检测 CSV 列名(不区分大小写),处理 LinkedIn 的前导文本格式(Connections.csv),并合并拆分的文件(Job Applications)。
搜索消息 — li_search.py
按人物、关键词、日期范围或组合条件搜索消息。
# Search by person
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"
# Date range
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
# Full conversation by 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
# Show context around matches
uv run ~/.claude/skills/linkedin-export/scripts/li_search.py --keyword "AI" --context 3
# Full message content + JSON output
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
人脉分析 — li_network.py
分析人脉关系图谱,包括公司、职位和时间线。
# Summary stats
uv run ~/.claude/skills/linkedin-export/scripts/li_network.py summary
# Top companies by connection count
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
# Role/title distribution
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"
# Export connections to CSV or 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
子命令:summary、companies、timeline、roles、search、export
导出为 Markdown — li_export.py
将解析后的数据转换为简洁的 Markdown 文件。
# Export messages (one file per conversation)
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py messages --output ~/linkedin-archive/messages/
# Export connections as Markdown table
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/
# Export RLAMA-optimized documents
uv run ~/.claude/skills/linkedin-export/scripts/li_export.py rlama --output ~/linkedin-archive/rlama/
子命令:messages、connections、all、rlama
导入 RLAMA — li_ingest.py
准备针对 RLAMA 优化的文档,并创建语义搜索集合。
# Full pipeline: prepare docs + create RLAMA collection
uv run ~/.claude/skills/linkedin-export/scripts/li_ingest.py
# Prepare docs only (no RLAMA required)
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
集合:linkedin-tdimino(fixed/600/100 分块,启用重排器,13 个文档,2.14 MB)
查询(默认:仅检索,由 Claude 综合):
# Retrieve raw chunks — Claude reads and synthesizes (best quality)
python3 ~/.claude/skills/rlama/scripts/rlama_retrieve.py linkedin-tdimino "What projects has Tom built?" -k 10
# Fallback: local LLM answers (only without Claude)
rlama run linkedin-tdimino --query "Who works at Google?"
RLAMA 文档结构(13 个文件):
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— 帖子和活动comments-activity.md— 548 条带日期和链接的评论projects-honors-volunteering.md— 项目、荣誉、志愿服务和组织metadata-languages-events-follows.md— 语言、活动、关注、职位申请、给出的推荐和推断信息INDEX.md— 集合元数据和数量
数据格式参考
完整的 CSV 列文档请参阅 references/linkedin-export-format.md。
LinkedIn 导出 ZIP 中的关键文件(已解析 23 个):
| CSV | 内容 |
|---|---|
messages.csv | 所有消息和 InMail |
Connections.csv | 1 度联系人(前导内容格式) |
Profile.csv | 个人资料数据 |
Positions.csv | 工作经历 |
Education.csv | 教育经历 |
Skills.csv | 列出的技能 |
Endorsement_Received_Info.csv | 收到的技能认可 |
Invitations.csv | 联系邀请 |
Recommendations_Received.csv | 收到的推荐 |
Shares.csv | 帖子和分享 |
Reactions.csv | 对帖子的回应 |
Certifications.csv | 认证 |
Comments.csv | 对帖子的评论 |
Projects.csv | 项目(Bazaar、Dream Daimon 等) |
Honors.csv | 奖项和黑客马拉松获奖记录 |
Organizations.csv | 社团和团体 |
Volunteering.csv | 志愿者经历 |
Languages.csv | 语言熟练程度 |
Events.csv | LinkedIn 活动 |
Member_Follows.csv | 关注的人/公司 |
Jobs/Job Applications*.csv | 求职申请(拆分到多个文件中) |
Recommendations_Given.csv | 撰写的推荐 |
Inferences_about_you.csv | LinkedIn 的推断 |
脚本选择指南
| 任务 | 脚本 | 示例 |
|---|---|---|
| 首次设置 | li_parse.py | 解析 ZIP |
| 查找对话 | li_search.py --person | 按姓名搜索 |
| 查找主题 | li_search.py --keyword | 按关键词搜索 |
| 我最常和谁交谈? | li_search.py --list-partners | 按排序排列的联系人列表 |
| 公司分布 | li_network.py companies | 公司排名 |
| 人脉增长 | li_network.py timeline | 按时间查看联系人 |
| 归档消息 | li_export.py messages | 每段对话生成一个 Markdown 文件 |
| 语义搜索 | li_ingest.py | RLAMA 集合 |