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/__tests__/smoke.test.ts

View on GitHub
/**
 * Smoke tests for the Linear CLI build output.
 *
 * These tests validate that:
 * - esbuild produces the expected dist/ files
 * - __BUNDLED__ is replaced at build time
 * - CLI commands exit with expected codes
 * - External dependencies are not inlined
 *
 * Run: npm test (requires: npm run build)
 * Requires: dist/ to exist (run `npm run build` first)
 */

import { describe, it, before } from 'node:test';
import assert from 'node:assert';
import { execSync } from 'node:child_process';
import { readdirSync, readFileSync, existsSync } from 'node:fs';
import { join } from 'node:path';

const ROOT = join(import.meta.dirname, '..', '..');
const DIST = join(ROOT, 'dist');
const SCRIPTS = join(ROOT, 'scripts');

describe('smoke tests', () => {
  before(() => {
    if (!existsSync(join(DIST, 'linear-ops.js'))) {
      throw new Error('dist/ not built — run `npm run build` first');
    }
  });

  it('all scripts/*.ts files have corresponding dist/*.js files', () => {
    const tsFiles = readdirSync(SCRIPTS)
      .filter(f => f.endsWith('.ts'));
    for (const ts of tsFiles) {
      const js = ts.replace(/\.ts$/, '.js');
      assert.ok(
        existsSync(join(DIST, js)),
        `Missing dist/${js} for scripts/${ts}`
      );
    }
  });

  it('__BUNDLED__ is replaced in dist/linear-ops.js', () => {
    const content = readFileSync(join(DIST, 'linear-ops.js'), 'utf8');
    assert.ok(
      !content.includes('__BUNDLED__'),
      'dist/linear-ops.js still contains __BUNDLED__ placeholder'
    );
    assert.ok(
      content.includes('true'),
      'dist/linear-ops.js should contain the replaced value "true"'
    );
  });

  it('CLI help exits 0', () => {
    execSync(`node ${join(DIST, 'linear-ops.js')} help`, {
      stdio: 'pipe',
      cwd: ROOT,
      env: { ...process.env, LINEAR_API_KEY: '' }
    });
  });

  it('CLI labels taxonomy exits 0 without API key', () => {
    execSync(`node ${join(DIST, 'linear-ops.js')} labels taxonomy`, {
      stdio: 'pipe',
      cwd: ROOT,
      env: { ...process.env, LINEAR_API_KEY: '' }
    });
  });

  it('CLI create-issue exits non-0 without API key', () => {
    try {
      execSync(`node ${join(DIST, 'linear-ops.js')} create-issue`, {
        stdio: 'pipe',
        cwd: ROOT,
        env: { ...process.env, LINEAR_API_KEY: '' }
      });
      assert.fail('Expected create-issue to exit non-0 without API key');
    } catch (err: unknown) {
      const error = err as { status: number; stderr?: Buffer };
      assert.ok(
        error.status !== 0,
        `Expected non-0 exit code, got ${error.status}`
      );
    }
  });

  it('CLI update-issue exits non-0 with no args', () => {
    try {
      execSync(`node ${join(DIST, 'linear-ops.js')} update-issue`, {
        stdio: 'pipe',
        cwd: ROOT,
        env: { ...process.env, LINEAR_API_KEY: '' }
      });
      assert.fail('Expected update-issue to exit non-0 with no args');
    } catch (err: unknown) {
      const error = err as { status: number };
      assert.ok(
        error.status !== 0,
        `Expected non-0 exit code, got ${error.status}`
      );
    }
  });

  it('CLI update-issue exits non-0 with unknown field', () => {
    try {
      execSync(`node ${join(DIST, 'linear-ops.js')} update-issue ENG-1 bogus "value"`, {
        stdio: 'pipe',
        cwd: ROOT,
        env: { ...process.env, LINEAR_API_KEY: 'test_key_for_arg_validation' }
      });
      assert.fail('Expected update-issue to exit non-0 with unknown field');
    } catch (err: unknown) {
      const error = err as { status: number };
      assert.ok(
        error.status !== 0,
        `Expected non-0 exit code, got ${error.status}`
      );
    }
  });

  it('CLI update-issue requires --force in non-interactive mode before API work', () => {
    try {
      execSync(`node ${join(DIST, 'linear-ops.js')} update-issue ENG-1 title "New title"`, {
        stdio: 'pipe',
        cwd: ROOT,
        env: { ...process.env, LINEAR_API_KEY: '' }
      });
      assert.fail('Expected update-issue to require --force in non-interactive mode');
    } catch (err: unknown) {
      const error = err as { status: number };
      assert.strictEqual(
        error.status,
        2,
        `Expected exit 2 (INVALID_ARGUMENTS), got ${error.status}`
      );
    }
  });

  it('CLI update-issue description exits 5 (VALIDATION_ERROR) on strict AC failure', () => {
    try {
      execSync(`node ${join(DIST, 'linear-ops.js')} update-issue ENG-1 description "too short" --force`, {
        stdio: 'pipe',
        cwd: ROOT,
        env: { ...process.env, LINEAR_API_KEY: '' }
      });
      assert.fail('Expected update-issue description to exit non-0 on invalid description');
    } catch (err: unknown) {
      const error = err as { status: number };
      assert.strictEqual(
        error.status,
        5,
        `Expected exit 5 (VALIDATION_ERROR), got ${error.status}`
      );
    }
  });

  it('CLI help includes update-issue', () => {
    const output = execSync(`node ${join(DIST, 'linear-ops.js')} help`, {
      stdio: 'pipe',
      cwd: ROOT,
      env: { ...process.env, LINEAR_API_KEY: '' }
    }).toString();
    assert.ok(output.includes('update-issue <issue-id>'));
    assert.ok(output.includes('--force'));
  });

  it('npm run ops -- help forwards args correctly', () => {
    execSync('npm run ops -- help', {
      stdio: 'pipe',
      cwd: ROOT,
      env: { ...process.env, LINEAR_API_KEY: '' }
    });
  });

  it('external SDK is not bundled into dist/linear-ops.js', () => {
    const content = readFileSync(join(DIST, 'linear-ops.js'), 'utf8');
    assert.ok(
      content.includes('@linear/sdk'),
      'dist/linear-ops.js should reference @linear/sdk as an external import'
    );
  });

  it('CLI create-issue exits 5 (VALIDATION_ERROR) on strict AC failure', () => {
    // Validation runs BEFORE the API call, so no LINEAR_API_KEY is needed.
    try {
      execSync(
        `node ${join(DIST, 'linear-ops.js')} create-issue "X" "Y" "too short"`,
        { stdio: 'pipe', cwd: ROOT, env: { ...process.env, LINEAR_API_KEY: '' } }
      );
      assert.fail('Expected create-issue to exit non-0 on invalid description');
    } catch (err: unknown) {
      const error = err as { status: number };
      assert.strictEqual(
        error.status,
        5,
        `Expected exit 5 (VALIDATION_ERROR), got ${error.status}`
      );
    }
  });

  it('SKILL.md frontmatter version matches package.json version', () => {
    const skill = readFileSync(join(ROOT, 'SKILL.md'), 'utf8');
    const fm = skill.match(/^---\n([\s\S]*?)\n---\n/);
    assert.ok(fm, 'SKILL.md must start with YAML frontmatter');
    const versionLine = fm[1].match(/^version:\s*(.+)$/m);
    assert.ok(versionLine, 'SKILL.md frontmatter must contain a version: line');
    const skillVersion = versionLine[1].trim();
    const pkgVersion = JSON.parse(
      readFileSync(join(ROOT, 'package.json'), 'utf8')
    ).version;
    assert.strictEqual(
      skillVersion,
      pkgVersion,
      `SKILL.md version (${skillVersion}) must equal package.json version (${pkgVersion}). Run 'node scripts/sync-skill-version.mjs ${pkgVersion}' to fix.`
    );
  });
});
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