import-hubspot
Skill6 starsChanged 4 months agoMITView on GitHub
Deterministically import the demo-world CRM structure (companies, contacts, deals, associations) into a dedicated HubSpot test account, then verify it. No prose generation, no judgment calls. Every step is a single command with a machine-checkable exit code. Use when asked to seed, refresh, or verify the HubSpot connector-test account.
- Reads credentials
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backfill-oppsSkill
- pipeline-updateSkill
- setupSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Read the printed company/contact/deal counts.
- Very specific: line 91
Never: run --confirm on hubspot:purge without an explicit operator instruction to do so, and never on anything but the dedicated test …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
/import-hubspot
Everything here is deterministic. Never hand-edit state/world.json,
HubSpot records, or the mapping code to "fix" a result. If a step fails, stop
and report it. This skill is designed to be run by a lightweight model: read
each command's output, act on it exactly as instructed, and don't improvise.
Preconditions
HUBSPOT_ACCESS_TOKENmust be set in.env. That is a HubSpot private-app access token. Seedocs/connectors/hubspot.mdfor the required scopes. If it's missing, every command below fails fast with a clear message. Report that and stop. Do not invent a token or guess scopes.state/world.jsonmust exist (npm run initwas already run). If not, stop and report. Do not create or edit the ledger yourself.
Steps
Provision the schema (idempotent, so it is safe to always run first):
npm run hubspot:setupConfirm it prints
Done. created=… existing=…with no error. Any thrown error (e.g. "exists but is not unique") means a property was hand-created in HubSpot incorrectly. Report the exact message and stop.Preflight the import with
--dry-runfor the scope you were asked to run (pick exactly one; never mix flags across scopes):If asked to… Scope flags smoke-test the connector (no flags). Bounded pilot, 3 accounts × 3 deals debug one deal --opp=<id>import everything --allnpm run hubspot:import -- --all --dry-runRead the printed company/contact/deal counts. If they look wildly wrong (e.g. 0 accounts for
--all), stop and report. Do not proceed to a write.Run the real import (same scope flags, no
--dry-run):npm run hubspot:import -- --allThis is idempotent. Rerunning it, even after a partial failure, updates existing records by
demo_world_idrather than duplicating them. Rerunning the same command is always safe. Read the summary block:errors=0→ proceed to step 4.errors>0→ the per-error lines below the summary are the message to report verbatim. Do not attempt to reinterpret or silently retry more than once. If a rerun doesn't reduce the error count, stop and report.- Note the printed run-report path (
runs/hubspot-import-*.json) in your final report to the operator.
Verify the same scope:
npm run hubspot:verify -- --allissues=0and the closingAll checked records and associations match the ledger. ✓line mean success. Report the final counts to the operator. Any printed✗ [missing|mismatch|missing-association]line is a concrete, actionable failure. Report them verbatim. Amissingcompany/contact/deal almost always means step 3's import silently dropped that record. Rerun step 3 once, then re-verify. Persistentmismatchissues mean the mapping code and the verifier have drifted. That is a bug to report, not to patch.- Report. Summarize for the operator: scope run, final
created/updated/error counts (companies/contacts/deals/associations), the
run-report path, and verification's
issuescount. Stop here. Do not runhubspot:purgeunless the operator explicitly asks for it. It is destructive, though reversible for 90 days.
If something looks wrong
- Never edit
state/world.json,src/connectors/hubspot/, orscripts/hubspot-*.tsto work around a failure. Those are the deterministic package's job. - Never guess at a missing credential or scope; quote the exact error and stop.
- Never run
--confirmonhubspot:purgewithout an explicit operator instruction to do so, and never on anything but the dedicated test portal.
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
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.

