---
name: clay-org-chart-builder
description: |
Build an interactive org chart of a target account's current C-Suite and VP leaders from Clay
people search, with reporting lines inferred from titles and always labeled as inferred, a Needs
review tray for anyone with no evidence of a manager, drag-and-drop manager corrections, focus
mode, "new in role" badges from each leader's role start date, a recent-news section, on-click
email and mobile lookups through the viewer's own Clay connection, and optional styling in the
seller's own brand. Use whenever someone asks: org chart for this company, map the leaders at X,
who runs what at this account, build an account map, show me the exec team at X, who reports to
the CTO there, which leaders are new in their role, add more people to the X org chart. Works from
a company name or domain. Do NOT use it to find one named person's email or profile, to build a
prospect list across many companies, to enrich or score a whole account list, or to write
anything to a CRM or sequence.
mechanism: functions
touches: writes-own-output
---
# Clay Org Chart Builder (titles come from Clay; reporting lines are inferred and labeled)
The insight: **Clay's people search returns titles, locations and role start dates, and never who
reports to whom.** Checked on the live response for a 1,500-person software company: every leader
record carried a current title and a start date for that title, and none carried a manager. So an
org chart built from it has two kinds of fact in it, and the whole design keeps them apart: the
people and titles are Clay's, and every line between them is an inference from titles and functions
that the page labels as inferred, gives a reason for, and lets the viewer correct. People with no
evidence for a manager are not parked under the CEO to make the chart look complete; they wait in a
Needs review tray.
The output is one self-contained page with two views:
- **Org chart:** the top executive, with their reports grouped into function lanes. Lines are dashed
when inferred, dotted amber when low confidence, and solid when the viewer set them. Anyone can be
dragged onto someone else's tile to change who they report to.
- **By level:** C-Suite and VP Leadership groups.
Each tile opens a side panel with the reason for its line, the buying role and level (editable), Clay
details, recent news, and "Find email / Find mobile with Clay" buttons that run only when the viewer
clicks and confirms. `references/page-behavior.md` describes every control on the page.
Do not start a step before the steps above it have their answers. If a declared input is missing, ask
for it — never assume a default and continue.
## Declared inputs
**Nothing here ships with a value.** Each one is the installer's, not the author's: ask for it, never
substitute a plausible default, and where an answer does not exist say which step becomes unavailable
rather than guessing. Where a default IS defensible it is named below, and using it means saying so in
the output.
| Input | What the installer supplies | If it is missing |
|---|---|---|
| **Target company** | a company name, or better a website domain | no default — ask. A bare name is resolved and confirmed before any people search (Step 4) |
| **Branding choice** | yes or no: style the page in their own company's brand | ask. No means the default style (off-white page, purple accents) |
| **Their website** | the seller's own site, only if they chose branding | no brand is extracted; the default style is used and the reply says so |
| **First-build size** | how many leader records to pull on the first build | **30 is the author's default and must be stated**; never more than 50 on a first build |
| **Mobile lookup function** | a function in their Clay workspace that finds a mobile number, picked from their own function list (Step 5) | the page offers email lookup only and the reply says so |
| **News window** | how far back the news section looks | **3 months is the author's default and must be stated** |
| **Clay workspace** | whichever workspace their Clay connection is signed in to | confirmed at Step 0, never assumed |
**If an answer sheet is present beside this skill, load it and ask only for what it does not cover.**
A partial sheet is normal; a value it is missing gets asked for on its own rather than restarting the
interview. **Say which values came from the sheet** before using them — a sheet applied silently is a
wrong field nobody catches. **If there is no sheet, say nothing about sheets** — the check is a file
lookup, not a question. At delivery, offer to save the durable answers back (brand website, mobile
lookup function, build size, news window; identifiers only, never a token or a password), private and
never published — and phrase the offer so it explains itself: *"want me to save these settings to a
file, so the next chart you or a teammate builds doesn't ask them again?"* The target company changes
every run, so it is never saved.
## What this skill touches
- **Reads** — Clay company search and people search for the one company you name (current title,
location, LinkedIn URL, role start date); the list of enrichment functions in your Clay workspace,
read only; the computed styles of your own website, if you chose branding; public news pages, through
web search, for the news section.
- **Writes** — its own output only: one self-contained HTML page (published as a private page where the
host can publish pages, otherwise saved as a file). Nothing in Clay, a CRM, a table or a sequence.
- **Never** — runs email, phone or work-history enrichment while building; writes to a CRM, table or
sequence; contacts anyone on the chart; uses your workspace's own CRM record fields for anyone;
puts Clay credentials in the page, a log or a URL.
- **Halts** — Step 2 spend-approval, Step 4 other.
Contact lookups on the finished page are the viewer's own action: each one runs through the viewer's
own Clay connection, only after they click and confirm an inline notice that it uses their Clay
credits.
## Step 0 — Check the platform, say where the work runs
1. Confirm the Clay tools are available: company search, people search, load more search results,
current workspace, and list functions. If they are deferred, load them and read their full
descriptions, especially the search grammar and the people and company field lists.
2. Call the current-workspace tool (or `clay whoami` where the Clay CLI is installed) and tell the user
which Clay workspace the search will run in, in one line.
3. Check that `python3` runs; the page is built by `scripts/orgatlas.py`, which needs only the standard
library.
If any check fails, say which component is missing and the one thing that fixes it (connect the Clay
connector, or sign in with `clay login`), then stop. Do not install, upgrade or fetch anything to repair
it, and never continue with other data.
Say the posture in two sentences before Step 1: *"This reads Clay's search results for one company and
writes one org chart page. It never writes to Clay or a CRM, and it runs no email or phone lookups while
building."* All classification, deduping and line inference runs locally in the script, so it costs
nothing; only the Clay searches can use credits.
## Step 1 — Ask which company
If the user has not named the target company, ask: "Which company do you want to build the org chart
for? A website domain helps me find the right one." Wait for the answer.
## Step 2 — Set expectations and ask about branding (the spend gate)
Send this notice, filled in, **together with** the branding question, as one message:
> I'll search Clay for current C-Suite and VP leaders at **{Company}**: CEOs and other chiefs,
> presidents, EVPs, SVPs and VPs. Former employees, directors, advisors, consultants and board-only
> seats are left out. **The first build includes up to {first-build size, default 30} people**, and you
> can add more later. The search charges per result at your workspace's search pricing, and it runs as
> soon as you answer below. It writes nothing anywhere except the org chart page.
Question: **"Do you want the org chart styled with your company's brand?"**
- **Yes, use my brand** — then ask for their company website.
- **No, use the default style**.
Answering this question is the go-ahead for the search. No search runs before it.
## Step 3 — Extract the seller's brand (only if they said yes)
The brand is the **user's** company (the seller), not the target account.
1. Open the homepage with a browser tool that can run JavaScript and read computed styles: the main
call-to-action buttons' `backgroundColor`, the `fontFamily` of `h1` and `body`, hex custom properties
on `:root`, Google Fonts `` tags and the header logo. A page-to-markdown fetch drops the CSS,
so use one only when no browser is available. Take only what is present:
- **Brand name:** `og:site_name`, the `
` prefix, or the logo `alt` text.
- **Primary color,** in order: the main call-to-action background when it has a hue; custom
properties that name the brand (`--primary`, `--brand`, a named swatch); ``.
Ignore black, white, greys and pale tints; if the only colored button is a pale tint, take the
strongest saturated brand swatch instead.
- **Fonts:** the `family=` values of Google Fonts links, else the first family in the heading and
body declarations.
- **Logo:** only inline `