Email Affiliation email-affiliation

Resolves a contributor email address and optional date to JSON containing its affiliated domain and friendly organization name (or 'Individual' / 'Undisclosed') using Chromium's affiliations.json5 and org-list.txt files.

Use it when determining which company or organization a Chromium contributor, commit author, or reviewer is or was affiliated with.

Works in Claude, ChatGPT, Codex and more
Our test
—
not tested yet
GitHub stars
26k
chromium/chromium
Added by
0
members
Updated
Dec 6
commit 8cf236c
Content
4 files
2 scripts · 16 KB
License
BSD 3-Clause
free to use

What our test found

Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.

View on GitHub ↗
name: email-affiliation
description: >-
  Resolves a contributor email address and optional date to JSON containing its
  affiliated domain and friendly organization name (or 'Individual' /
  'Undisclosed') using Chromium's affiliations.json5 and org-list.txt files. Use
  when determining which company or organization a Chromium contributor, commit
  author, or reviewer is or was affiliated with.

Contributor Email Affiliation Lookup

Resolves an email address (currently or on a given YYYY-MM-DD date) to a JSON object {"domain": <str|null>, "organization": <str|null>} using and .

Usage

Run from the Chromium src directory:

# Current affiliation (defaults to today's local date):
vpython3 agents/skills/email-affiliation/scripts/email_affiliation.py \
  user@chromium.org

# Affiliation on a specific date (e.g., a commit's %as author date):
vpython3 agents/skills/email-affiliation/scripts/email_affiliation.py \
  schenney@chromium.org 2020-06-01

Prints single-line JSON to stdout, for example:

  • {"domain": "microsoft.com", "organization": "Microsoft"}
  • {"domain": "gmail.com", "organization": "Individual"}
  • {"domain": null, "organization": "Undisclosed"}
  • {"domain": "citrolabs.ai", "organization": null} (domain not mapped to a known organization in org-list.txt)

Exits non-zero on invalid email or date arguments.

Resolution Rules

  1. Look up <email> (case-insensitive) in third_party/blink/tools/commit_stats/affiliations.json5. If listed, scan affiliations (ordered most recent start first) for the first entry with start <= date:
  2. If its domain is Individual or Undisclosed, return domain: null and that value as organization.
  3. Otherwise use that lowercase domain for step 3.
  4. If date precedes every listed start date for that account, return {"domain": null, "organization": "Undisclosed"}.
  5. If unlisted in affiliations.json5, resolve domain to google.com for @chromium.org addresses and the email's lowercase domain otherwise.
  6. Look up domain in third_party/blink/tools/commit_stats/org-list.txt: map Unknown or unmapped domains to null, and return all other friendly organization names verbatim.

Caveats

  • Do not consult [`AUTHORS`](/AUTHORS) to infer affiliation: people listed in the individuals section of AUTHORS may still be contributing on behalf of their organization (for example, when a corporate CLA authorizes specific employees rather than a *@domain wildcard).
  • Best-effort accuracy: because this data is derived primarily from self-attested and public information, results may not be 100% accurate.

Testing

vpython3 agents/skills/email-affiliation/scripts/email_affiliation_unittest.py