Skip to content

wrsmith108/linear-claude-skill

Managing Linear issues, projects, and teams. Use when working with Linear tasks, creating issues, updating status, querying projects, or managing team workflows.

FileKindSize
SKILL.mdskill md22.7 KB
scripts/__tests__/bulk-create.test.tsscript5.0 KB
scripts/__tests__/issue-description.test.tsscript6.8 KB
scripts/__tests__/lin-cli.test.tsscript3.8 KB
scripts/__tests__/lint-issues.test.tsscript2.3 KB
scripts/__tests__/retry.test.tsscript8.2 KB
scripts/__tests__/smoke.test.tsscript7.0 KB
scripts/__tests__/validate-description.test.tsscript4.3 KB
scripts/build.mjsscript1.4 KB
scripts/bulk-create.tsscript12.5 KB
scripts/create-initiative-update.tsscript5.8 KB
scripts/create-issue-with-project.tsscript8.0 KB
scripts/create-project-update.tsscript5.5 KB
scripts/extract-image.tsscript2.2 KB
scripts/lib/agent-selection.tsscript8.7 KB
scripts/lib/exit-codes.tsscript357 B
scripts/lib/index.tsscript3.1 KB
scripts/lib/initiative.tsscript5.0 KB
scripts/lib/issue-description.tsscript7.1 KB
scripts/lib/labels.tsscript7.6 KB
scripts/lib/lin-cli.tsscript7.3 KB
scripts/lib/linear-utils.tsscript9.3 KB
scripts/lib/project-template.tsscript8.8 KB
scripts/lib/retry.tsscript4.8 KB
scripts/lib/taxonomy-data.tsscript8.1 KB
scripts/lib/taxonomy-validation.tsscript10.0 KB
scripts/lib/taxonomy.tsscript3.6 KB
scripts/lib/verify.tsscript6.6 KB
scripts/linear-api.mjsexecutablescript12.1 KB
scripts/linear-ops.tsscript69.1 KB
scripts/lint-issues.tsscript6.9 KB
scripts/phase-complete.tsscript12.4 KB
scripts/query.shexecutablescript498 B
scripts/query.tsscript3.5 KB
scripts/run.shexecutablescript321 B
scripts/setup.tsscript8.6 KB
scripts/sync-skill-version.mjsscript2.0 KB
scripts/sync.tsscript5.7 KB
scripts/upload-image.tsscript4.4 KB

scripts/create-project-update.ts

View on GitHub
#!/usr/bin/env npx tsx

/**
 * Create a project update (status report) in Linear
 *
 * Looks up project by name, posts markdown content, and returns the update URL.
 *
 * Usage:
 *   LINEAR_API_KEY=lin_api_xxx npx tsx create-project-update.ts "Project Name" "## Update\n\nBody content" [health]
 *
 * Arguments:
 *   projectName - Name of the project (case-insensitive partial match)
 *   body        - Markdown content for the update
 *   health      - Optional: onTrack (default), atRisk, offTrack
 *
 * Examples:
 *   npx tsx create-project-update.ts "Phase 1" "## Progress\n\n- Feature A complete"
 *   npx tsx create-project-update.ts "Phase 1" "## At Risk\n\nBlocked on API" atRisk
 */

import { LinearClient } from '@linear/sdk';
import { EXIT_CODES } from './lib/exit-codes.js';
import {
  HealthStatus,
  VALID_HEALTH_VALUES,
  isValidHealth,
  getLinearClient,
  findProjectByName,
} from './lib/linear-utils.js';

function printUsage(): void {
  console.error('Usage:');
  console.error('  LINEAR_API_KEY=lin_api_xxx npx tsx create-project-update.ts "Project Name" "Body content" [health]');
  console.error('');
  console.error('Arguments:');
  console.error('  projectName - Name of the project (case-insensitive partial match)');
  console.error('  body        - Markdown content for the update');
  console.error('  health      - Optional: onTrack (default), atRisk, offTrack');
  console.error('');
  console.error('Examples:');
  console.error('  npx tsx create-project-update.ts "Phase 1" "## Progress\\n\\n- Feature complete"');
  console.error('  npx tsx create-project-update.ts "Phase 1" "## Blocked\\n\\nAPI issues" atRisk');
}

interface ProjectUpdateResult {
  success: boolean;
  projectUpdate?: {
    id: string;
    url: string;
    createdAt: string;
  };
}

async function createProjectUpdate(
  client: LinearClient,
  projectId: string,
  body: string,
  health: HealthStatus
): Promise<ProjectUpdateResult> {
  // Use rawRequest since SDK may not have projectUpdateCreate typed
  const mutation = `
    mutation CreateProjectUpdate($projectId: String!, $body: String!, $health: ProjectUpdateHealthType!) {
      projectUpdateCreate(input: {
        projectId: $projectId,
        body: $body,
        health: $health
      }) {
        success
        projectUpdate {
          id
          url
          createdAt
        }
      }
    }
  `;

  const result = await client.client.rawRequest(mutation, {
    projectId,
    body,
    health
  });

  return (result.data as { projectUpdateCreate: ProjectUpdateResult }).projectUpdateCreate;
}

async function main(): Promise<void> {
  const projectName = process.argv[2];
  const body = process.argv[3];
  const healthArg = process.argv[4] || 'onTrack';

  if (!projectName) {
    console.error('Error: Project name is required');
    console.error('');
    printUsage();
    process.exit(EXIT_CODES.INVALID_ARGUMENTS);
  }

  if (!body) {
    console.error('Error: Update body content is required');
    console.error('');
    printUsage();
    process.exit(EXIT_CODES.INVALID_ARGUMENTS);
  }

  if (!isValidHealth(healthArg)) {
    console.error(`Error: Invalid health value "${healthArg}"`);
    console.error(`Valid values: ${VALID_HEALTH_VALUES.join(', ')}`);
    process.exit(EXIT_CODES.VALIDATION_ERROR);
  }

  let client: LinearClient;
  try {
    client = getLinearClient();
  } catch (error) {
    console.error(`Error: ${(error as Error).message}`);
    console.error('');
    printUsage();
    process.exit(EXIT_CODES.MISSING_API_KEY);
  }

  // Step 1: Look up project by name
  console.log(`Looking up project: "${projectName}"...`);
  const project = await findProjectByName(client, projectName);

  if (!project) {
    console.error(`Error: Project not found matching "${projectName}"`);
    console.error('');
    console.error('Tip: Check project name spelling or use Linear CLI to list projects:');
    console.error('  linear projects list');
    process.exit(EXIT_CODES.RESOURCE_NOT_FOUND);
  }

  console.log(`Found project: ${project.name} (${project.id})`);

  // Step 2: Create the project update
  console.log(`Creating update with health: ${healthArg}...`);

  try {
    const result = await createProjectUpdate(client, project.id, body, healthArg);

    if (!result.success || !result.projectUpdate) {
      console.error('Error: Failed to create project update');
      console.error('The API returned success: false');
      process.exit(EXIT_CODES.API_ERROR);
    }

    // Step 3: Output success with URL
    console.log('');
    console.log('Project update created successfully!');
    console.log('');
    console.log(`URL: ${result.projectUpdate.url}`);
    console.log(`ID: ${result.projectUpdate.id}`);
    console.log(`Created: ${result.projectUpdate.createdAt}`);
    console.log(`Health: ${healthArg}`);

    // Also output as JSON for programmatic use
    console.log('');
    console.log('JSON Output:');
    console.log(JSON.stringify({
      success: true,
      project: {
        id: project.id,
        name: project.name
      },
      update: result.projectUpdate,
      health: healthArg
    }, null, 2));

  } catch (error) {
    console.error('Error creating project update:');
    if (error instanceof Error) {
      console.error(error.message);

      // Check for common GraphQL errors
      if ('errors' in error && Array.isArray((error as Record<string, unknown>).errors)) {
        console.error('\nGraphQL Errors:');
        console.error(JSON.stringify((error as Record<string, unknown>).errors, null, 2));
      }
    } else {
      console.error(error);
    }
    process.exit(EXIT_CODES.API_ERROR);
  }
}

main();
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall