jeremylongshore/claude-code-plugins-plus-skills
linear-pack
plugins/saas-packs/linear-pack/skills/linear-data-handling/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-data-handling/SKILL.md -a claude-code --skill linear-data-handlingInstallation paths:
.claude/skills/linear-data-handling/# Linear Data Handling
## Overview
Implement reliable data synchronization, backup, and consistency for Linear integrations.
## Prerequisites
- Linear API access
- Database for local storage
- Understanding of eventual consistency
## Instructions
### Step 1: Data Model Mapping
```typescript
// models/linear-entities.ts
import { z } from "zod";
// Core entity schemas
export const LinearIssueSchema = z.object({
id: z.string(),
identifier: z.string(),
title: z.string(),
description: z.string().nullable(),
priority: z.number(),
estimate: z.number().nullable(),
stateId: z.string(),
stateName: z.string(),
teamId: z.string(),
teamKey: z.string(),
assigneeId: z.string().nullable(),
projectId: z.string().nullable(),
cycleId: z.string().nullable(),
createdAt: z.string(),
updatedAt: z.string(),
completedAt: z.string().nullable(),
canceledAt: z.string().nullable(),
});
export type LinearIssue = z.infer<typeof LinearIssueSchema>;
export const LinearProjectSchema = z.object({
id: z.string(),
name: z.string(),
description: z.string().nullable(),
state: z.string(),
progress: z.number(),
targetDate: z.string().nullable(),
createdAt: z.string(),
updatedAt: z.string(),
});
export type LinearProject = z.infer<typeof LinearProjectSchema>;
```
### Step 2: Full Sync Implementation
```typescript
// sync/full-sync.ts
import { LinearClient, Issue } from "@linear/sdk";
import { db } from "../lib/database";
import { LinearIssueSchema } from "../models/linear-entities";
interface SyncStats {
total: number;
created: number;
updated: number;
deleted: number;
errors: number;
}
export async function fullSync(client: LinearClient): Promise<SyncStats> {
const stats: SyncStats = { total: 0, created: 0, updated: 0, deleted: 0, errors: 0 };
console.log("Starting full sync...");
// Fetch all issues with pagination
const remoteIssues = new Map<string, LinearIssue>();
let hasMore = true;
let cursor: string | undefined;