agentleFS
calven-aicalven-ai/demoverse/.claude/skills/import-hubspot/SKILL.md

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

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
  1. Very specific:

    Read the printed company/contact/deal counts.

    line 46
  2. Very specific:

    Never: run --confirm on hubspot:purge without an explicit operator instruction to do so, and never on anything but the dedicated test …

    line 91

≈ “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.

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

/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_TOKEN must be set in .env. That is a HubSpot private-app access token. See docs/connectors/hubspot.md for 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.json must exist (npm run init was already run). If not, stop and report. Do not create or edit the ledger yourself.

Steps

  1. Provision the schema (idempotent, so it is safe to always run first):

    npm run hubspot:setup

    Confirm 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.

  2. Preflight the import with --dry-run for 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--all
    npm run hubspot:import -- --all --dry-run

    Read 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.

  3. Run the real import (same scope flags, no --dry-run):

    npm run hubspot:import -- --all

    This is idempotent. Rerunning it, even after a partial failure, updates existing records by demo_world_id rather 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.
  4. Verify the same scope:

    npm run hubspot:verify -- --all

    issues=0 and the closing All 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. A missing company/contact/deal almost always means step 3's import silently dropped that record. Rerun step 3 once, then re-verify. Persistent mismatch issues mean the mapping code and the verifier have drifted. That is a bug to report, not to patch.

  5. Report. Summarize for the operator: scope run, final created/updated/error counts (companies/contacts/deals/associations), the run-report path, and verification's issues count. Stop here. Do not run hubspot:purge unless 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/, or scripts/hubspot-*.ts to 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 --confirm on hubspot:purge without an explicit operator instruction to do so, and never on anything but the dedicated test portal.

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.