Skip to content

moonlight-lupin/agent-skills / research/people-enrichment

people-enrichment

Verified

Use when the user has a list of names or companies and wants their job, employer, work history, LinkedIn URLs or company profiles looked up, or wants to find people or companies matching criteria — trigger on phrases like "enrich these contacts", "find their LinkedIn", "look up these people", "who works at X", "find directors at Y", "enrich these companies", or "get firmographics for". Enrich and search People Data Labs (PDL) Person and Company data, writing results to .xlsx. Five operations: enrich named PEOPLE into a profile, employment history and LinkedIn URL; IDENTIFY an ambiguous person as several scored candidates; SEARCH people by criteria (company, title, location); enrich COMPANIES into firmographics (industry, size, employees, HQ, founded, LinkedIn); and SEARCH companies by criteria. Do not scrape LinkedIn directly — this uses a licensed data aggregator (PDL) instead, for legal and reliability reasons.

FileKindSize
README.mdmarkdown2.0 KB
SKILL.mdskill md10.9 KB
references/sample_companies.csvother67 B
references/sample_input.csvother117 B
requirements.txtmanifest93 B
scripts/email_list.pyscript10.0 KB
scripts/enrich.pyscript26.9 KB
tests/__init__.pyscript0 B
tests/test_email_list.pyscript4.1 KB
tests/test_enrich.pyscript24.6 KB

tests/test_email_list.py

View on GitHub
#!/usr/bin/env python3
"""Unit tests for email_list.py and the shared-mailbox rule — offline, fictional addresses only.

Run:  python -m pytest research/people-enrichment/tests/test_email_list.py -v
"""

import sys
import tempfile
import unittest
from pathlib import Path

SCRIPTS_DIR = Path(__file__).resolve().parent.parent / "scripts"
sys.path.insert(0, str(SCRIPTS_DIR))

import email_list  # noqa: E402
import enrich  # noqa: E402

ADDRESSES = ["Jordan.Lee@northwind.example", "info@northwind.example", "someone@gmail.com",
             "sam@globex.example", "not-an-address", "me@own.example", "jordan.lee@northwind.example"]


def _sheet(path, headers, rows):
    from openpyxl import Workbook
    wb = Workbook()
    ws = wb.active
    ws.append(headers)
    for r in rows:
        ws.append(r)
    wb.save(path)


class TestClassify(unittest.TestCase):
    def test_classes(self):
        c = email_list.classify
        self.assertEqual(c("sales@corp.example")[0], "shared mailbox")
        self.assertEqual(c("a@yahoo.co.jp")[0], "webmail")
        self.assertEqual(c("a@sub.own.example", ["own.example"])[0], "excluded")
        self.assertEqual(c("irene@corp.example")[0], "personal")
        self.assertEqual(c("nope")[0], "invalid")


class TestTriageAndMerge(unittest.TestCase):
    def test_one_company_lookup_per_domain_and_no_webmail(self):
        with tempfile.TemporaryDirectory() as d:
            src = Path(d) / "emails.txt"
            src.write_text("\n".join(ADDRESSES), encoding="utf-8")
            r = email_list.triage(src, d, ["own.example"])
            self.assertEqual(r["addresses"], 6)                    # duplicate dropped
            self.assertEqual(r["company_lookups"], 2)              # northwind + globex, once each
            self.assertEqual(r["person_lookups"], 2)
            sent = (Path(d) / "companies.csv").read_text() + (Path(d) / "people.csv").read_text()
            for never in ("gmail.com", "own.example", "info@"):
                self.assertNotIn(never, sent)

    def test_merge_outcomes(self):
        with tempfile.TemporaryDirectory() as d:
            src = Path(d) / "emails.txt"
            src.write_text("\n".join(ADDRESSES), encoding="utf-8")
            email_list.triage(src, d, ["own.example"])
            _sheet(Path(d) / "companies.xlsx", enrich.COMPANY_HEADERS,
                   [["northwind.example", "matched", 8, "Northwind Capital", "investment management",
                     "51-200", 120, 2009, "", "singapore", "northwind.example", "", "", "private", "", ""],
                    ["globex.example", "no_match", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]])
            _sheet(Path(d) / "people.xlsx", enrich.PEOPLE_HEADERS,
                   [["jordan.lee@northwind.example", "needs_review", "", 4, "Jordan Lee", "Director",
                     "Initech", "", "linkedin.com/in/example-jordan", "", "", "", "", "", ""]])
            recs = {r["email"]: r for r in email_list.merge(d)}
        jl = recs["jordan.lee@northwind.example"]
        self.assertEqual(jl["outcome"], "person")
        self.assertIn("below the confidence floor", jl["check"])
        self.assertIn("may have moved", jl["check"])
        self.assertTrue(recs["info@northwind.example"]["outcome"].startswith("company only"))
        self.assertEqual(recs["sam@globex.example"]["outcome"], "not found")
        self.assertTrue(recs["someone@gmail.com"]["outcome"].startswith("webmail"))
        self.assertEqual(recs["me@own.example"]["outcome"], "excluded")


class TestSharedMailboxRule(unittest.TestCase):
    def test_parse_person_drops_shared_mailboxes(self):
        rec = enrich.parse_person({"full_name": "Jordan Lee", "work_email": "info@northwind.example",
                                   "emails": [{"address": "jordan@northwind.example"},
                                              {"address": "sales@northwind.example"}]},
                                  8, 4, "Jordan Lee")
        self.assertEqual(rec["email"], "jordan@northwind.example")
        self.assertTrue(enrich.is_role_address("Investor.Relations@corp.example"))
        self.assertFalse(enrich.is_role_address("irene@corp.example"))


if __name__ == "__main__":
    unittest.main()
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall