agentleFS
ZevenueZevenue/headless-gtm/skills/07-campaign-sheet/SKILL.md

07-campaign-sheet

Skill29 starsChanged 4 months agoMITView on GitHub

Turn a terminal records.jsonl into an owner-readable campaign sheet plus a HubSpot-import-shaped CSV - the chain's exit door. Use when a run is ready to hand to an owner: "build the campaign sheet", "export these for HubSpot", "who do I contact first", or as the final step of run-first-campaign. Reads whatever stage produced the records (qualified, signal-ranked, or fully resolved) and degrades gracefully on missing fields - no email column until 06 has run. Nothing sends and nothing downstream reads its output: the sheet and CSV are the human deliverable, approved on screen. To add verified emails first, run 06-resolution-email-person; to rank, 05-signal-builder.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a HubSpot MCP or connector is available in the session, offer an alternative: stage the approved rows directly as contacts with …

    line 83
  2. Distinctive:

    Before any write, confirm the batch size and get an explicit go-ahead, then stage in batches and report what was created.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Campaign sheet (07)

The last step in the chain. Everything upstream produced records.jsonl; this turns those records into what an owner actually uses - a ranked "who to contact first and why" sheet, plus a CSV shaped for a one-click HubSpot import.

It adds no fields to the chain and nothing reads its output. The CSV is a derived, human-facing export (headless-gtm-shared/CONVENTIONS.md) - the canonical record stays records.jsonl, and re-running any upstream skill never depends on this sheet.

What it reads

A terminal records.jsonl from any stage. The script tolerates every shape and degrades instead of failing:

  • Company name from company (or name), site from website (or https:// + domain), phone / city from wherever the discovery step put them.
  • Ranking from 05's signals[] - the highest-score signal per record decides call order; its signal_type, signal_sentence, and source_url become the "why now" line, and its approach (or fallback_approach) the recommended angle. Records with no signals stay in the sheet, ranked last.
  • Contacts from 06's person_name / matched_title / email / verification_status. When 06 has not run, the contact columns are dropped entirely rather than shipped empty.
  • Rows with no website ride through on their listing fields - the sheet does not drop them (a registry row with domain empty is still a real target).

What it writes

runs/<run-id>/ (via common.runs_base(), step prefix 07):

  • campaign-sheet.md - owner-readable. Ranked cards for the top targets (company, city, why now with source, approach, contact or "not resolved"), then a compact table for the rest, then a "before you send" note.
  • campaign-sheet.csv - HubSpot default contact-import headers: First Name, Last Name, Email, Company Name, Website URL, Phone Number, Lifecycle Stage, Notes. Every row is set to Lifecycle Stage = Lead; Notes carries the top signal and the recommended approach. First/Last/Email appear only when at least one record is resolved, and a Listing URL column appears only when at least one record carries one (directory-sourced runs) - so a phone-only registry row still exports a working link. The headers are HubSpot's defaults because it is the most common import target; every field is a plain column, so any other CRM (Salesforce, Pipedrive, Attio) takes the same file after a one-time header remap on import.

Run it

python3 scripts/campaign_sheet.py --records ./runs/<run-id>/records.jsonl --title "HVAC - Ontario"

Stdlib only - no API keys, no network. It runs on a synthetic fixture with zero accounts, so it is safe to demo before any real data exists.

The approval step (must hold)

Present both files on screen. Nothing is send-ready until the owner approves the sheet there. Nothing in this repo sends email - if asked to "just send it", say so plainly and point at the approved sheet and the drafted sequence. The import, and any send, is the owner's step after approval.

Optional: stage into HubSpot (only when a connector is present)

The default path is the CSV import - the owner uploads campaign-sheet.csv in HubSpot and maps the columns (all default properties, so mapping is automatic).

If a HubSpot MCP or connector is available in the session, offer an alternative: stage the approved rows directly as contacts with lifecyclestage = lead. Before any write, confirm the batch size and get an explicit go-ahead, then stage in batches and report what was created. Never create or modify HubSpot records without that on-screen approval, and never stage rows the owner has not approved on the sheet. If no connector is present, do not ask for one - the CSV is the complete path.

Output

End with a one-paragraph recap: rows written, how many carry a resolved contact, the top 3 targets with their one-line reason, and the paths to the two files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.