| name | linear-cost-tuning |
| description | Optimize Linear API usage, reduce unnecessary calls, and maximize
efficiency within rate limit budgets.
Trigger: "linear cost", "reduce linear API calls", "linear efficiency",
"linear API usage", "optimize linear costs", "linear budget".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linear","api","cost-optimization"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Linear Cost Tuning
Overview
Optimize Linear API usage to stay within rate budgets and minimize infrastructure costs. Linear's API is free (no per-request billing), but rate limits (5,000 requests/hour, 250,000 complexity/hour) constrain throughput. Efficient patterns let you do more within these limits.
Cost Factors
| Factor | Budget Impact | Optimization |
|---|
| Request count | 5,000/hr limit | Batch operations, coalesce requests |
| Query complexity | 250,000/hr limit | Flat queries, small page sizes |
| Payload size | Bandwidth + latency | Select only needed fields |
| Polling frequency | Wastes budget | Replace with webhooks |
| Webhook volume | Processing costs | Filter by event type and team |
Instructions
Step 1: Audit Current Usage
import { LinearClient } from "@linear/sdk";
class UsageTracker {
private requests = 0;
private totalComplexity = 0;
private startTime = Date.now();
track(complexity: number) {
this.requests++;
this.totalComplexity += complexity;
}
report() {
const elapsedHours = (Date.now() - this.startTime) / 3600000;
{
: .,
: .(. / elapsedHours),
: .,
: .(. / elapsedHours),
: {
: ,
: ,
},
};
}
}
tracker = ();