AgentSkillsCN

linkedin-intelligence

将LinkedIn数据导出转换为交互式浏览器仪表板。分析用户的联系人、帖子、活动规律以及社交网络集群。当用户希望分析自己的LinkedIn数据、构建LinkedIn仪表板,或探索自己的社交网络时,可启用此技能。

SKILL.md
--- frontmatter
name: linkedin-intelligence
description: Turns LinkedIn data exports into an interactive browser dashboard. Analyzes connections, posts, activity patterns, and network clusters. Use when the user wants to analyze their LinkedIn data, build a LinkedIn dashboard, or explore their network.

LinkedIn Intelligence

A Claude skill that turns LinkedIn data exports into an interactive browser dashboard. Analyzes your connections, posts, activity patterns, and network clusters — all locally, no data leaves your machine.

What It Does

Takes a standard LinkedIn data export (ZIP/folder) and generates a single self-contained dashboard.html file with:

Connection Analysis

  • Full searchable table of all connections with multi-filter system
  • Filter by seniority (C-Level, VP, Director, etc.), company, year, position keywords
  • Stack multiple filters, remove them individually
  • Seniority auto-classification from job titles
  • Names link directly to LinkedIn profiles

Network Visualization

  • Top companies and positions in your network (bar charts)
  • Seniority distribution (donut chart)
  • Network growth over time — monthly and cumulative (line charts)
  • Yearly connection breakdown
  • Network clusters: companies with 5+ connections (donut + table)
  • Dormant connections: people connected 2+ years ago

Post Analysis

  • All posts with content preview, type classification, word count, and comment cross-referencing
  • Post type distribution: Long Text, Short Text, Media, Link Share, Repost
  • Posting patterns: day of week, hour of day
  • Word count distribution
  • Posts per month timeline
  • Filter by type, search by content, link to original post

Activity Patterns

  • Monthly activity timeline: posts, comments, reactions
  • Reaction type distribution (LIKE, PRAISE, EMPATHY, etc.)
  • Reaction activity over time

How to Use

Step 1: Export Your Data from LinkedIn

  1. Go to linkedin.com/mypreferences/d/download-my-data
  2. Select all available data (or at minimum: Connections, Shares, Comments, Reactions)
  3. Click Request archive — LinkedIn emails a download link within 24 hours
  4. Download the ZIP and extract it (or leave it as a folder)

Step 2: Place the Export

Copy the extracted folder into this project directory. The folder name typically looks like:

code
Complete_LinkedInDataExport_MM-DD-YYYY.zip/

Step 3: Update the Path

Edit build_dashboard.py and set EXPORT_DIR to your folder name:

python
EXPORT_DIR = "./Complete_LinkedInDataExport_01-20-2026.zip"

Step 4: Generate the Dashboard

bash
pip install pandas openpyxl
python build_dashboard.py

Step 5: Open

bash
open dashboard.html   # macOS
xdg-open dashboard.html  # Linux
start dashboard.html  # Windows

Required Files from LinkedIn Export

FileUsed For
Connections.csvNetwork analysis, filters, clusters, dormant detection
Shares.csvPost content, type classification, posting patterns
Comments.csvComment cross-referencing per post
Reactions.csvReaction types and activity timeline
Profile.csvName and headline (for dashboard header)

Dashboard Tabs

TabContent
Overview6 stat cards + 4 summary charts
ConnectionsAll connections, searchable with stackable multi-filters
CompaniesTop 20 companies bar chart + table
SenioritySeniority donut + top 20 positions
GrowthCumulative line chart, monthly bars, yearly breakdown
PostsDeep post analysis with 5 charts + scrollable feed
ActivityMonthly posts/comments/reactions + reaction type breakdown
ClustersCompanies with 5+ connections
DormantConnections from 2+ years ago

Filter System (Connections Tab)

Click + Add Filter to add any combination of:

  • Seniority: C-Level / Founder, VP, Director, Head of, Manager / Lead, Senior IC, IC / Specialist, Junior / Associate
  • Company: Dropdown of top 100 companies in your network
  • Connection Year: Any year present in your data
  • Position Contains: Free text search (e.g., "Engineer", "Sales", "Product")

Filters appear as blue tags. Click x on any tag to remove it. Filters stack — results must match ALL active filters.

Technical Details

  • Output: Single self-contained HTML file (no server required)
  • Charts: Chart.js 4.x loaded from CDN
  • Dependencies: Python 3.9+, pandas, openpyxl (for CSV parsing only)
  • Performance: Handles 10k+ connections; tables cap at 500 rows with a prompt to filter
  • Seniority detection: Rule-based keyword matching on job titles

Data Handling & Privacy

  • All processing happens locally — no data is sent anywhere
  • The generated dashboard.html contains your connection data embedded as JSON
  • Do NOT publish dashboard.html or your LinkedIn export publicly
  • .gitignore is preconfigured to exclude all personal data
  • LinkedIn CSVs often have 2-3 metadata rows before the header — the script handles this automatically
  • Multiline post content in CSVs is handled with on_bad_lines="skip"

Limitations

  • No likes/views counts: LinkedIn's data export does not include impression or reaction counts on your own posts. The export only contains the content you posted and your own outbound activity (reactions/comments you gave to others).
  • Comment counts are partial: The "comments" shown per post are your own replies cross-referenced by URL, not the total comment count from others.
  • No engagement rate: Without impressions data, engagement rate cannot be calculated.
  • Position/title parsing: Seniority classification is heuristic-based and may misclassify unusual titles.

Querying Your Data (Natural Language)

Users can ask natural language questions about their LinkedIn data. When a user asks a question about their connections, posts, comments, or reactions, use query_linkedin.py to retrieve the data and answer conversationally.

How to Handle Queries

  1. Determine what data the user needs
  2. Run python3 query_linkedin.py with appropriate flags from the project directory
  3. Parse the JSON output
  4. Answer the user's question in natural language
  5. For follow-ups, re-query with different/additional filters

Query Script Reference

bash
# Overview stats
python3 query_linkedin.py --type summary

# Connections — filter by company, seniority, position, year, recency
python3 query_linkedin.py --type connections --company "Google"
python3 query_linkedin.py --type connections --seniority "VP" --seniority "Director"
python3 query_linkedin.py --type connections --position "Engineer"
python3 query_linkedin.py --type connections --year 2025
python3 query_linkedin.py --type connections --recent 90
python3 query_linkedin.py --type connections --search "John"

# Posts — filter by search term, type, year
python3 query_linkedin.py --type posts --search "RevOps"
python3 query_linkedin.py --type posts --post-type "Long Text"
python3 query_linkedin.py --type posts --year 2025

# Comments — filter by search, year
python3 query_linkedin.py --type comments --search "congratulations"

# Reactions — distribution by type
python3 query_linkedin.py --type reactions --year 2025

# Messages — conversations with search, recency, and follow-up detection
python3 query_linkedin.py --type messages --recent 30
python3 query_linkedin.py --type messages --awaiting-reply
python3 query_linkedin.py --type messages --search "Tim"
python3 query_linkedin.py --type messages --recent 30 --awaiting-reply

# Control output size
python3 query_linkedin.py --type connections --company "Netguru" --limit 20

Flags

FlagDescription
--typesummary, connections, posts, comments, reactions, messages
--companyFilter connections by company (partial match, case-insensitive)
--seniorityFilter by seniority level (can repeat for multiple levels)
--positionFilter by position keyword (partial match)
--searchFull-text search across relevant fields
--yearFilter by year
--recent NConnections/messages from last N days
--post-typeFilter posts: Long Text, Short Text, Media, Link Share, Repost
--awaiting-replyMessages only: show conversations where the other person messaged last
--limit NMax results (default 500)

Example Conversations

User: "Who do I know at Google?" → Run: python3 query_linkedin.py --type connections --company "Google" → Present the list with names, positions, and connection dates

User: "Show me VP and Director level connections" → Run: python3 query_linkedin.py --type connections --seniority "VP" --seniority "Director" → Summarize by company, list the connections

User: "Summarize my posts about RevOps" → Run: python3 query_linkedin.py --type posts --search "RevOps" → Read the post content, generate a thematic summary

User: "How many people did I connect with last month?" → Run: python3 query_linkedin.py --type connections --recent 30 → Count and describe the results

User: "What are the top companies in my network?" → Run: python3 query_linkedin.py --type summary → Present the top_companies from the summary

User: "Find all founders I'm connected with" → Run: python3 query_linkedin.py --type connections --seniority "C-Level / Founder" → List or summarize the results

User: "Summarize my recent LinkedIn conversations" → Run: python3 query_linkedin.py --type messages --recent 30 → Summarize conversations, highlight which need follow-up

User: "Do I need to reply to anyone?" → Run: python3 query_linkedin.py --type messages --recent 30 --awaiting-reply → Show conversations where the other person messaged last, categorize by priority (genuine vs spam/cold outreach)

User: "What did I discuss with Tim?" → Run: python3 query_linkedin.py --type messages --search "Tim" → Show matching conversations

Tips for Query Handling

  • Combine multiple filters for precise queries (e.g., --seniority "VP" --company "Stripe")
  • Use --search for fuzzy matching across name, company, and position fields
  • For post content analysis, use --type posts --search "topic" and then reason over the full content in results
  • When the user asks about trends or patterns, query the raw data and compute the analysis yourself
  • The summary endpoint is lightweight — use it for overview questions without pulling full records

Common Issues

IssueFix
ParserError on CSVScript uses on_bad_lines="skip" — some multiline posts may be skipped
Dates not parsingUses format="mixed" with dayfirst=True for LinkedIn's format
Empty company/positionFilled with "Not Specified" automatically
Charts don't renderOpen in Chrome/Firefox/Edge — Safari may lag on large datasets
Too many connections to displayUse filters to narrow down — table shows max 500 rows