Skip to content
Back to skills

Clari Upgrade Migration

BSecurity

'Handle Clari API version changes and export schema migrations. Use when Clari updates their API, export format changes, or migrating from v3 to v4 API. Trigger with phrases like \"upgrade clari\", \"clari api migration\", \"clari schema change\", \"clari v4 migration\". '

  • 3 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 12, 2026
ai-agentspythongobashsqlgitapidatabase

Works with

  • cli
  • api

Security analysis

B88/100
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill clari-upgrade-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clari Upgrade Migration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clari Upgrade Migration
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/thedixitjain-clari-upgrade-migration/badge)](https://www.skillsdirectory.com/skills/thedixitjain-clari-upgrade-migration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clari-upgrade-migration
description: "'Handle Clari API version changes and export schema migrations. Use when Clari updates their API, export format changes, or migrating from v3 to v4 API. Trigger with phrases like \"upgrade clari\", \"clari api migration\", \"clari schema change\", \"clari v4 migration\". '"
allowed-tools: "Read, Write, Edit, Bash(curl:*), Grep"
category: engineering-core
source_repo: jeremylongshore/claude-code-plugins-plus-skills
source_path: "plugins/saas-packs/clari-pack/skills/clari-upgrade-migration/SKILL.md"
source_url: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/plugins/saas-packs/clari-pack/skills/clari-upgrade-migration/SKILL.md
---

# Clari Upgrade & Migration

## Overview

Handle Clari API changes: version migrations, export schema updates, and Copilot API adoption.

## Instructions

### Step 1: Check Current API Version

```bash
# v4 is the current version
curl -s -H "apikey: ${CLARI_API_KEY}" \
  https://api.clari.com/v4/export/forecast/list | jq .

# If using v3 (deprecated), migrate to v4
```

### Step 2: Schema Change Detection

```python
def detect_schema_changes(
    current_export: dict, expected_fields: set[str]
) -> dict:
    if not current_export.get("entries"):
        return {"status": "empty", "changes": []}

    actual_fields = set(current_export["entries"][0].keys())
    new_fields = actual_fields - expected_fields
    removed_fields = expected_fields - actual_fields

    return {
        "status": "changed" if new_fields or removed_fields else "compatible",
        "new_fields": list(new_fields),
        "removed_fields": list(removed_fields),
    }

# Track expected schema
EXPECTED_FIELDS = {
    "ownerName", "ownerEmail", "forecastAmount", "quotaAmount",
    "crmTotal", "crmClosed", "adjustmentAmount", "timePeriod"
}
```

### Step 3: Database Schema Migration

```sql
-- Add new columns when Clari adds export fields
ALTER TABLE clari_forecasts ADD COLUMN IF NOT EXISTS new_field_name VARCHAR;

-- Backfill historical data
UPDATE clari_forecasts SET new_field_name = 'default' WHERE new_field_name IS NULL;
```

### Rollback

Keep the previous client version alongside the new one until migration is verified:

```python
# Pin client to specific behavior
client_v4 = ClariClient(ClariConfig(api_key=api_key, base_url="https://api.clari.com/v4"))
```

## Resources

- [Clari Developer Portal](https://developer.clari.com)
- [Clari Community](https://community.clari.com)

## Next Steps

For CI integration, see `clari-ci-integration`.

---

**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `plugins/saas-packs/clari-pack/skills/clari-upgrade-migration/SKILL.md`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.