From clari-pack
Manages Clari API v3 to v4 migrations, detects export schema changes with Python, and applies SQL database updates. Use for API upgrades or schema drifts.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin clari-packThis skill is limited to using the following tools:
Handle Clari API changes: version migrations, export schema updates, and Copilot API adoption.
Upgrades klaviyo-api SDK versions and migrates from v1/v2 legacy APIs to current REST API, handling breaking changes between revisions.
Configures Clari API key authentication, environment setup, and connectivity tests for forecast data exports to Snowflake, BigQuery, or Redshift.
Migrates Attio API v1 to v2 integrations: updates endpoints, record queries to POST JSON filters, UUIDs to slugs, pagination, and webhooks.
Share bugs, ideas, or general feedback.
Handle Clari API changes: version migrations, export schema updates, and Copilot API adoption.
# 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
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"
}
-- 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;
Keep the previous client version alongside the new one until migration is verified:
# Pin client to specific behavior
client_v4 = ClariClient(ClariConfig(api_key=api_key, base_url="https://api.clari.com/v4"))
For CI integration, see clari-ci-integration.