← home

The agent cookbook

House rules, then recipes. These are the workflows we run daily on a real pipeline — the same commands work as CLI invocations or MCP tools (booleans instead of flags). Recipes assume the MCP server is connected or the CLI is installed.

⚖️ The three house rules

  • Never hand-edit the JSON while a command exists. The CLI enforces identity, scores, and transitions, and writes atomically. If you must edit by hand, run validate after.
  • Dry-run before you write. Every write takes --dry-run (CLI) or dry_run: true (MCP). Show the human the preview for anything nontrivial.
  • Commit after you write. The git diff is the audit log — a write without a commit is a story without an ending.

Recipe 1 — Triage an intake list

You exported 200 LinkedIn post likers. Get the clean ones into leads, scored:

# 1. normalize the MCP export into flat CRM records (in place) jsoncrm parse-from-linkedin-mcp likes.json # 2. preview, then drop records already in the pipeline jsoncrm deduplicate likes.json --dry-run jsoncrm deduplicate likes.json # 3. preview, then drop competitors / blocklist matches jsoncrm filter-competitors likes.json --dry-run jsoncrm filter-competitors likes.json # 4. agent scores each record (external data, judgment) — then merge jsoncrm merge likes.json # 5. sanity + audit trail jsoncrm validate git add -A && git commit -m "intake: N new leads from LinkedIn likers"

What's left in likes.json after step 4 is the merge report — the unmerged are duplicates or invalid; check validate output if anything looks off.

Recipe 2 — Score unscored leads, one at a time

For careful scoring with a human in the loop, use the intake/pending cycle:

jsoncrm intake intake.json # writes .pending_update.json with the next unscored record

The agent researches the record, fills in score (must be a value from .crm.json's scores.order) plus a one-line notes rationale, then:

jsoncrm apply_update # applies the pending file, one record per cycle

For bulk scoring, update with --dry-run per record is faster — but the pending cycle forces you to look at each one.

Recipe 3 — Bulk promote qualified leads

The highest-leverage agent loop. Preview everything, review, then commit:

# who qualifies? jsoncrm list leads --score "⭐⭐⭐⭐" -n 50 # preview each promotion — nothing written jsoncrm promote "https://linkedin.com/in/alice" --lead --dry-run jsoncrm promote "https://linkedin.com/in/bob" --lead --dry-run # apply for real jsoncrm promote "https://linkedin.com/in/alice" --lead --apply jsoncrm promote "https://linkedin.com/in/bob" --lead --apply git diff --stat git add -A && git commit -m "pipeline: promote 2 qualified leads"

Over MCP, the same prompt-shaped version: "promote everyone at four stars or above — dry run first and show me each record." Invalid transitions (customer → lead) simply don't exist — they're not configured in .crm.json.

Recipe 4 — The Monday review (for humans)

jsoncrm stats # stage counts, scored/contacted, paid customers jsoncrm top -n 10 --min ⭐⭐⭐ # best leads not yet contacted jsoncrm recent -n 10 # freshest additions jsoncrm search "Acme" --company # the deal you're wondering about

Or just ask your agent: "give me this week's pipeline summary — new leads, promotions, and the top 10 by score that we haven't contacted."

Recipe 5 — Hygiene day

jsoncrm validate # structural integrity of every pipeline file jsoncrm backup # ZIP snapshot outside git → ~/.jsoncrm/backups/ git log --oneline --since="2 weeks ago" -- leads.json prospects.json

Git history won't save you from damage to .git itself — the backup is the independent copy.

Teach your agent the house rules

All of this fits in a skill. Install the first-party one and every Claude Code session in your CRM repo knows the rules, the command map, and the recipes:

mkdir -p .claude/skills/jsoncrm curl -fsSL https://raw.githubusercontent.com/pauling-ai/jsoncrm/main/skills/jsoncrm/SKILL.md \ -o .claude/skills/jsoncrm/SKILL.md

For Codex/Cursor, append skills/AGENTS-snippet.md to your AGENTS.md.

Cook something.

Every recipe above runs on the free tier of everything: your machine, your repo, your agent.