Back to Skills

lindy-cost-tuning

verified
View on GitHub

Marketplace

claude-code-plugins-plus

jeremylongshore/claude-code-plugins-plus-skills

Plugin

lindy-pack

ai-ml

Repository

jeremylongshore/claude-code-plugins-plus-skills
1.1kstars

plugins/saas-packs/lindy-pack/skills/lindy-cost-tuning/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/lindy-pack/skills/lindy-cost-tuning/SKILL.md -a claude-code --skill lindy-cost-tuning

Installation paths:

Claude
.claude/skills/lindy-cost-tuning/
Powered by add-skill CLI

Instructions

# Lindy Cost Tuning

## Overview
Optimize Lindy AI costs while maintaining service quality.

## Prerequisites
- Access to Lindy billing dashboard
- Usage data available
- Understanding of pricing tiers

## Instructions

### Step 1: Analyze Current Usage
```typescript
import { Lindy } from '@lindy-ai/sdk';

async function analyzeUsage() {
  const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });

  const usage = await lindy.usage.monthly({
    startDate: '2025-01-01',
    endDate: '2025-01-31',
  });

  const analysis = {
    totalRuns: usage.agentRuns.total,
    totalCost: usage.billing.total,
    costPerRun: usage.billing.total / usage.agentRuns.total,
    topAgents: usage.byAgent
      .sort((a: any, b: any) => b.cost - a.cost)
      .slice(0, 5),
    peakHours: usage.byHour
      .sort((a: any, b: any) => b.runs - a.runs)
      .slice(0, 5),
  };

  console.log('Usage Analysis:', analysis);
  return analysis;
}
```

### Step 2: Implement Usage Budgets
```typescript
interface Budget {
  monthly: number;
  daily: number;
  perAgent: number;
}

const budget: Budget = {
  monthly: 500, // $500/month
  daily: 20,    // $20/day
  perAgent: 50, // $50/agent/month
};

async function checkBudget(): Promise<boolean> {
  const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });

  const usage = await lindy.usage.current();

  if (usage.billing.monthly >= budget.monthly) {
    console.error('Monthly budget exceeded!');
    await sendAlert('Budget exceeded', { usage, budget });
    return false;
  }

  if (usage.billing.today >= budget.daily) {
    console.warn('Daily budget exceeded');
    return false;
  }

  return true;
}
```

### Step 3: Optimize Agent Costs
```typescript
// Cost-optimized agent configuration
const optimizedAgent = {
  name: 'Cost-Efficient Agent',
  instructions: 'Be brief. Answer in 1-2 sentences.',
  config: {
    model: 'gpt-3.5-turbo', // Cheaper model
    maxTokens: 100,         // Limit output
    temperature: 0.3,       // Less crea

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4750 chars