Agent skill
clari-upgrade-migration
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".
Install this agent skill to your Project
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/main/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
# 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
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
-- 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:
# Pin client to specific behavior
client_v4 = ClariClient(ClariConfig(api_key=api_key, base_url="https://api.clari.com/v4"))
Resources
Next Steps
For CI integration, see clari-ci-integration.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dockerfile-generator
Dockerfile Generator - Auto-activating skill for DevOps Basics. Triggers on: dockerfile generator, dockerfile generator Part of the DevOps Basics skill category.
branch-naming-helper
Branch Naming Helper - Auto-activating skill for DevOps Basics. Triggers on: branch naming helper, branch naming helper Part of the DevOps Basics skill category.
readme-generator
Readme Generator - Auto-activating skill for DevOps Basics. Triggers on: readme generator, readme generator Part of the DevOps Basics skill category.
makefile-generator
Makefile Generator - Auto-activating skill for DevOps Basics. Triggers on: makefile generator, makefile generator Part of the DevOps Basics skill category.
gitignore-generator
Gitignore Generator - Auto-activating skill for DevOps Basics. Triggers on: gitignore generator, gitignore generator Part of the DevOps Basics skill category.
pre-commit-hook-setup
Pre Commit Hook Setup - Auto-activating skill for DevOps Basics. Triggers on: pre commit hook setup, pre commit hook setup Part of the DevOps Basics skill category.
Didn't find tool you were looking for?