Claude
Skills
Sign in
Back

cold-start

Included with Lifetime
$97 forever

Day-one data bootstrapping for a new brain. Sequences the highest-leverage data sources to go from empty brain to useful brain in one session. Uses ClawVisor for safe credential handling — the agent never holds raw API keys. Covers Gmail import, calendar sync, contacts seeding, X/Twitter archive, conversation imports, and file archives. Use when a user has just finished gbrain setup and asks "now what?"

Backend & APIs

What this skill does


# Cold Start — Day-One Brain Bootstrapping

You have a working brain. Search works. Now what?

An empty brain is a static database. A brain with your email history, calendar,
contacts, conversations, and social media is a **live context membrane** that makes
every future interaction smarter. This skill sequences the highest-leverage data
sources to get you from zero to useful in one session.

## Contract

- Every import phase is gated on user consent (ask-user pattern) before proceeding.
- **Google/social API access goes through ClawVisor.** The agent never holds raw OAuth
  tokens or API keys. This is a safety requirement, not a preference. ClawVisor vaults
  credentials, enforces task-scoped authorization, logs every API call, and requires
  human approval for destructive operations. If the user doesn't want ClawVisor, the
  only safe alternative is offline file exports (Google Takeout, Twitter archive download).
- Each phase is independently valuable — the user can stop after any phase and still
  have a useful brain.
- Progress is tracked in `~/.gbrain/cold-start-state.json` so interrupted sessions
  can resume.
- Entity detection and cross-linking run on every import, not as a separate pass.

## Prerequisites

- GBrain installed and initialized (`gbrain doctor --json` all green)
- Brain repo cloned and synced
- Agent has terminal access and can run `gbrain` CLI commands

## The Priority Stack

Data sources ranked by **information density × ease of import**:

| Priority | Source | Why | Time | Pages Created |
|----------|--------|-----|------|---------------|
| 1 | Existing markdown/Obsidian | Highest density — it's already structured | 5 min | 100s-1000s |
| 2 | Google Contacts | Seeds the people/ directory — names, emails, companies | 10 min | 50-500 |
| 3 | Google Calendar (90 days) | Meeting history with attendee context | 15 min | 30-90 |
| 4 | Gmail (recent threads) | Relationship context, active threads, org chart signals | 20 min | 50-200 |
| 5 | Conversations (ChatGPT/Claude exports) | Your thinking, questions, mental models | 15 min | 10-100 |
| 6 | X/Twitter archive | Your public positions, takes, engagement patterns | 20 min | 30-365 |
| 7 | File archives (Dropbox/Drive/local) | Historical documents, old writing, photos | 30+ min | varies |
| 8 | Meeting transcripts (Circleback/etc.) | Deep relationship context from recorded calls | 20 min | 10-50 |

## Phase 0: ClawVisor Setup (Required for API Access)

> **Safety boundary:** An AI agent with raw OAuth tokens to your Gmail, Calendar,
> and Contacts is an uncontrolled attack surface. One prompt injection, one
> malicious tool call, and your entire Google account is exposed. ClawVisor
> eliminates this risk class entirely.

[ClawVisor](https://clawvisor.com) is a credential gateway that sits between the
agent and your APIs. The agent never sees your credentials — ClawVisor injects
them at request time, enforces policies, and logs everything.

**What ClawVisor gives you:**
- **Credential vaulting** — agent sees shadow tokens, never real secrets
- **Task-scoped authorization** — each workflow declares exactly what it needs
- **Audit trail** — every API call logged with metadata (who, what, when)
- **Human approval gates** — destructive operations (send email, modify calendar)
  require your explicit approval
- **Multi-service** — Gmail, Calendar, Contacts, Drive, GitHub, iMessage from one gateway
- **Revocation** — disable the agent's access in one click, no token rotation needed

**Setup (15 min):**
1. Sign up at [app.clawvisor.com](https://app.clawvisor.com)
2. Create an agent in the dashboard, copy the agent token
3. Set environment variables:
   ```bash
   gbrain config set clawvisor_url "https://app.clawvisor.com"
   gbrain config set clawvisor_agent_token "<token>"
   ```
4. Activate Google services (Gmail, Calendar, Contacts) in the dashboard
5. Create a standing task with expansive scope:
   > "Full brain bootstrapping: read emails, calendar events, and contacts to
   > populate knowledge base. List, read, and search across all connected accounts."
6. Save the standing task ID:
   ```bash
   gbrain config set clawvisor_task_id "<task_id>"
   ```

**Critical scoping rule:** Be expansive in task purposes. "Email triage" gets
rejected by intent verification. "Full executive assistant email management
including inbox triage, searching by any criteria, reading emails, tracking
threads" works. The intent model uses the purpose to judge each request.

### If the user declines ClawVisor

Do NOT fall back to direct OAuth. Instead, skip Phases 2-4 (Contacts, Calendar,
Gmail) and proceed with offline-only imports:

- **Phase 1** (markdown/Obsidian) — works without any API access
- **Phase 5** (conversation exports) — works from downloaded JSON files
- **Phase 6** (X/Twitter) — works from downloaded archive
- **Phase 7** (file archives) — works from local files
- **Phase 8** (meeting transcripts) — works from exported transcripts

Tell the user:
> "No problem. We'll skip the Google imports for now and work with file-based
> sources. You can set up ClawVisor anytime to unlock Contacts, Calendar, and
> Gmail imports safely."

**Do NOT offer direct OAuth as an alternative.** An agent holding raw Google
tokens is a security liability. The skill should not teach agents to store
credentials they shouldn't have.

## Phase 1: Existing Markdown / Obsidian Import

**The highest-leverage first import.** If the user already has a notes system, this
is hundreds or thousands of structured pages ready to go.

### Discovery

```bash
echo "=== Markdown Repository Discovery ==="
for dir in /data/* ~/git/* ~/Documents/* ~/notes/* ~/obsidian/* 2>/dev/null; do
  if [ -d "$dir" ]; then
    md_count=$(find "$dir" -name "*.md" -not -path "*/node_modules/*" \
      -not -path "*/.git/*" -not -path "*/.obsidian/*" 2>/dev/null | wc -l | tr -d ' ')
    if [ "$md_count" -gt 5 ]; then
      total_size=$(du -sh "$dir" 2>/dev/null | cut -f1)
      echo "  $dir ($total_size, $md_count .md files)"
    fi
  fi
done
```

### Import

```bash
# For Obsidian vaults, use the migrate skill for proper wikilink handling
gbrain migrate --from obsidian --path /path/to/vault

# For plain markdown directories
gbrain import /path/to/dir --no-embed --workers 4

# Verify
gbrain stats
gbrain search "<topic from the imported data>"
```

### Post-import

- Run link extraction: `gbrain extract links --source db`
- Run timeline extraction: `gbrain extract timeline --source db`
- Start embeddings: `gbrain embed --stale` (runs in background)

> **Track progress:**
> ```bash
> echo '{"phase_1_complete": true, "pages_imported": N}' > ~/.gbrain/cold-start-state.json
> ```

## Phase 2: Google Contacts → People Pages

**Seeds the people/ directory.** Every person in your contacts becomes a brain page
with name, email, phone, company, and notes. This is the foundation that all other
imports build on — when Gmail references "[email protected]", the brain already knows
who John is.

### Via ClawVisor

```javascript
// Fetch all contacts
const contacts = await clawvisor('google.contacts', 'list_contacts', {
  limit: 1000,
  fields: 'names,emailAddresses,phoneNumbers,organizations,biographies'
});
```

### Via direct Google People API

```bash
curl -s -H "Authorization: Bearer $GOOGLE_TOKEN" \
  "https://people.googleapis.com/v1/people/me/connections?personFields=names,emailAddresses,phoneNumbers,organizations,biographies&pageSize=1000"
```

### Processing rules

For each contact:
1. **Filter out noise** — skip contacts with no name, no email, or that are clearly
   automated (noreply@, no-reply@, support@, notifications@)
2. **Check brain first** — `gbrain search "name"` to avoid duplicates
3. **Create people/ page** with:
   - Name, email(s), phone(s), company, title
   - Source attribution: `[Source: Google Contacts, YYYY-MM-DD]`
   - Any notes from the contact as initial context
4. **Link to company** — if the contact has an organization, create/update t
Files: 1
Size: 18.5 KB
Complexity: 30/100
Category: Backend & APIs

Related in Backend & APIs