jeremylongshore/claude-code-plugins-plus-skills
lindy-pack
plugins/saas-packs/lindy-pack/skills/lindy-cost-tuning/SKILL.md
January 22, 2026
Select agents to install to:
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-tuningInstallation paths:
.claude/skills/lindy-cost-tuning/# 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