jeremylongshore/claude-code-plugins-plus-skills
linear-pack
plugins/saas-packs/linear-pack/skills/linear-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/linear-pack/skills/linear-cost-tuning/SKILL.md -a claude-code --skill linear-cost-tuningInstallation paths:
.claude/skills/linear-cost-tuning/# Linear Cost Tuning
## Overview
Optimize Linear API usage to maximize efficiency and minimize costs.
## Prerequisites
- Working Linear integration
- Monitoring in place
- Understanding of usage patterns
## Cost Factors
### API Request Costs
| Factor | Impact | Optimization Strategy |
|--------|--------|----------------------|
| Request count | Direct rate limit | Batch operations |
| Query complexity | Complexity limit | Minimal field selection |
| Payload size | Bandwidth/latency | Pagination, filtering |
| Webhook volume | Processing costs | Event filtering |
## Instructions
### Step 1: Audit Current Usage
```typescript
// lib/usage-tracker.ts
interface UsageStats {
requests: number;
complexity: number;
bytesTransferred: number;
period: { start: Date; end: Date };
}
class UsageTracker {
private stats: UsageStats = {
requests: 0,
complexity: 0,
bytesTransferred: 0,
period: { start: new Date(), end: new Date() },
};
recordRequest(complexity: number, bytes: number): void {
this.stats.requests++;
this.stats.complexity += complexity;
this.stats.bytesTransferred += bytes;
this.stats.period.end = new Date();
}
getStats(): UsageStats {
return { ...this.stats };
}
getDaily(): {
avgRequestsPerHour: number;
avgComplexityPerRequest: number;
projectedMonthlyRequests: number;
} {
const hours =
(this.stats.period.end.getTime() - this.stats.period.start.getTime()) /
(1000 * 60 * 60);
return {
avgRequestsPerHour: this.stats.requests / Math.max(hours, 1),
avgComplexityPerRequest: this.stats.complexity / Math.max(this.stats.requests, 1),
projectedMonthlyRequests: (this.stats.requests / Math.max(hours, 1)) * 24 * 30,
};
}
reset(): void {
this.stats = {
requests: 0,
complexity: 0,
bytesTransferred: 0,
period: { start: new Date(), end: new Date() },
};
}
}
export const usageTracker = new UsageTracker();
```
### Step 2: Re