Skip to content
Skillv1.0.0

clari-local-dev-loop

Set up local development for Clari API integrations with mock data. Use when building forecast dashboards, testing export pipelines, or iterating on Clari data transformations locally. Trigger with ph

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/clari-local-dev-loop/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill clari-local-dev-loop. Copyright stays with the author (MIT).

Clari Local Dev Loop

Overview

Local development workflow for Clari integrations: mock forecast data for offline testing, schedule recurring exports, and build data transformation pipelines.

Prerequisites

  • Completed clari-install-auth setup
  • Python 3.10+ or Node.js 18+
  • Local database or data warehouse access for testing

Instructions

Step 1: Project Structure

clari-integration/
├── src/
│   ├── clari_client.py       # API client wrapper
│   ├── export_pipeline.py    # Export and transform pipeline
│   ├── models.py             # Data models for forecast data
│   └── config.py             # Environment config
├── tests/
│   ├── fixtures/
│   │   ├── forecast_export.json    # Sample export response
│   │   └── job_status.json         # Sample job status
│   └── test_pipeline.py
├── .env.local                # Dev credentials (git-ignored)
├── .env.example
└── requirements.txt

Step 2: Mock Forecast Data for Testing

# tests/fixtures/forecast_export.json
MOCK_FORECAST = {
    "entries": [
        {
            "ownerName": "Jane Smith",
            "ownerEmail": "jane@example.com",
            "forecastAmount": 250000,
            "quotaAmount": 300000,
            "crmTotal": 180000,
            "crmClosed": 120000,
            "adjustmentAmount": 15000,
            "timePeriod": "2026_Q1"
        },
        {
            "ownerName": "Bob Johnson",
            "ownerEmail": "bob@example.com",
            "forecastAmount": 180000,
            "quotaAmount": 250000,
            "crmTotal": 140000,
            "crmClosed": 90000,
            "adjustmentAmount": 0,
            "timePeriod": "2026_Q1"
        }
    ]
}

Step 3: Test Pipeline Without API Calls

# tests/test_pipeline.py
import pytest
from src.export_pipeline import transform_forecast_data

def test_forecast_aggregation():
    data = MOCK_FORECAST
    result = transform_forecast_data(data)
    assert result["total_forecast"] == 430000
    assert result["total_quota"] == 550000
    assert result["attainment_percent"] == pytest.approx(78.2, rel=0.1)
    assert len(result["reps"]) == 2

def test_handles_empty_export():
    result = transform_forecast_data({"entries": []})
    assert result["total_forecast"] == 0

Step 4: Development Run Script

#!/bin/bash
# scripts/dev-export.sh
set -euo pipefail

source .env.local

echo "=== Clari Dev Export ==="
python3 src/export_pipeline.py \
  --forecast "company_forecast" \
  --period "2026_Q1" \
  --format json \
  --output ./data/latest-export.json

echo "Export saved to ./data/latest-export.json"
echo "Records: $(jq '.entries | length' ./data/latest-export.json)"

Error Handling

Error Cause Solution
Import error Missing dependency pip install -r requirements.txt
Empty export Wrong time period Use a period with submitted forecasts
Mock data stale Schema changed Re-download a sample from API
.env.local not loading Missing dotenv pip install python-dotenv

Output

The development run produces a local, access-controlled fixture or explicitly approved sanitized export plus a manifest with period, schema version, record count, transformation result, and test status. Never commit .env.local, live tokens, temporary download URLs, or raw production forecast records.

Examples

Run the pipeline against a synthetic fixture, assert the aggregate totals, and write only the sanitized result to the local data directory. If a developer needs a real schema sample, obtain a limited read-only export, redact it before use, and delete it under the project retention rule after the test completes.

Resources

Next Steps

See clari-sdk-patterns for production-ready API wrappers.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clari-local-dev-loop/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-clari-local-dev-loop.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-clari-local-dev-loop",
  "kind": "skill",
  "name": "clari-local-dev-loop",
  "description": "Set up local development for Clari API integrations with mock data. Use when building forecast dashboards, testing export pipelines, or iterating on Clari data transformations locally. Trigger with phrases like \"clari dev setup\", \"clari local testing\", \"develop with clari\", \"clari mock data\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "revenue-intelligence",
      "forecasting",
      "clari",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Set up local development for Clari API integrations with mock data. Use when building forecast dashboards, testing export pipelines, or iterating on Clari data transformations locally. Trigger with phrases like \"clari dev setup\", \"clari local testing\", \"develop with clari\", \"clari mock data\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/clari-local-dev-loop/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/clari-local-dev-loop/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/clari-local-dev-loop/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Bash(python3:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Clari Local Dev Loop\n\n## Overview\n\nLocal development workflow for Clari integrations: mock forecast data for offline testing, schedule recurring exports, and build data transformation pipelines.\n\n## Prerequisites\n\n- Completed `clari-install-auth` setup\n- Python 3.10+ or Node.js 18+\n- Local database or data warehouse access for testing\n\n## Instructions\n\n### Step 1: Project Structure\n\n```\nclari-integration/\n├── src/\n│   ├── clari_client.py       # API client wrapper\n│   ├── export_pipeline.py    # Export and transform pipeline\n│   ├── models.py             # Data models for forecast data\n│   └",
  "cost": {
    "context_tokens": 983
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clari-local-dev-loop/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.