| name | linear-debug-bundle |
| description | Comprehensive debugging toolkit for Linear integrations.
Use when setting up logging, tracing API calls,
or building debug utilities for Linear.
Trigger: "debug linear integration", "linear logging",
"trace linear API", "linear debugging tools".
|
| allowed-tools | Read, Write, Edit, Grep, Bash(node:*), Bash(npx:*) |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linear","api","debugging","logging"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Linear Debug Bundle
Overview
Production-ready debugging tools for Linear API integrations: instrumented client with request/response logging, request tracer with performance metrics, health check endpoint, environment validator, and interactive debug console.
Prerequisites
@linear/sdk installed and configured
- Node.js 18+
- Optional: pino or winston for structured logging
Instructions
Tool 1: Debug Client Wrapper
Intercept all API calls with timing, logging, and error capture by wrapping the SDK's underlying fetch.
import { LinearClient } from "@linear/sdk";
interface DebugOptions {
logRequests?: boolean;
logResponses?: boolean;
onRequest?: (query: string, variables: any) => void;
onResponse?: (query: string, duration: number, data: any) => void;
onError?: (query: string, duration: number, error: any) => void;
}
function createDebugClient(apiKey: string, opts: = {}): {
{ logRequests = , logResponses = } = opts;
({
apiKey,
: { : },
});
}
debugQuery<T>(
: ,
: <T>,
?:
): <T> {
start = .();
.();
{
result = ();
ms = .() - start;
.();
opts?.?.(label, ms, result);
result;
} (error) {
ms = .() - start;
.(, error);
opts?.?.(label, ms, error);
error;
}
}
client = ({ : process..! });
teams = (, client.());
issues = (, client.({ : }));