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/lib/verify.ts

View on GitHub
/**
 * Post-Execution Verification Utilities
 *
 * Verifies that project creation completed successfully:
 * - Project linked to initiative
 * - Project has content/description
 * - All expected issues created
 * - All labels applied
 */
import { getLinearClient } from './linear-utils'
import { isProjectLinkedToInitiative, DEFAULT_INITIATIVE_ID } from './initiative'
import { verifyLabelsApplied } from './labels'

export interface ProjectVerification {
  project: {
    id: string
    name: string
    exists: boolean
    linkedToInitiative: boolean
    hasDescription: boolean
    descriptionLength: number
    state: string
  }
  issues: {
    expected: number
    found: number
    missing: string[]
    withLabels: number
    withoutLabels: string[]
  }
  overall: {
    passed: boolean
    issues: string[]
  }
}

/**
 * Verify a project was created correctly
 */
export async function verifyProjectCreation(
  projectName: string,
  expectedIssueCount: number,
  expectedLabels?: Record<string, string[]>,
  initiativeId: string = DEFAULT_INITIATIVE_ID
): Promise<ProjectVerification> {
  const verification: ProjectVerification = {
    project: {
      id: '',
      name: projectName,
      exists: false,
      linkedToInitiative: false,
      hasDescription: false,
      descriptionLength: 0,
      state: ''
    },
    issues: {
      expected: expectedIssueCount,
      found: 0,
      missing: [],
      withLabels: 0,
      withoutLabels: []
    },
    overall: {
      passed: true,
      issues: []
    }
  }

  // Find project
  const projects = await getLinearClient().projects({
    filter: { name: { contains: projectName } }
  })

  const project = projects.nodes.find(p =>
    p.name.toLowerCase().includes(projectName.toLowerCase())
  )

  if (!project) {
    verification.overall.passed = false
    verification.overall.issues.push(`Project not found: ${projectName}`)
    return verification
  }

  verification.project.id = project.id
  verification.project.name = project.name
  verification.project.exists = true
  verification.project.state = project.state
  verification.project.descriptionLength = project.description?.length || 0
  verification.project.hasDescription = (project.description?.length || 0) > 10

  // Check initiative link
  verification.project.linkedToInitiative = await isProjectLinkedToInitiative(
    project.id,
    initiativeId
  )

  if (!verification.project.linkedToInitiative) {
    verification.overall.passed = false
    verification.overall.issues.push('Project not linked to initiative')
  }

  if (!verification.project.hasDescription) {
    verification.overall.passed = false
    verification.overall.issues.push('Project has no description')
  }

  // Get project issues
  const issues = await getLinearClient().issues({
    filter: { project: { id: { eq: project.id } } },
    first: 100
  })

  verification.issues.found = issues.nodes.length

  if (verification.issues.found < expectedIssueCount) {
    verification.overall.passed = false
    verification.overall.issues.push(
      `Expected ${expectedIssueCount} issues, found ${verification.issues.found}`
    )
  }

  // Check labels if provided
  if (expectedLabels) {
    for (const issue of issues.nodes) {
      const expectedForIssue = expectedLabels[issue.identifier]
      if (expectedForIssue) {
        const labelCheck = await verifyLabelsApplied(issue.id, expectedForIssue)
        if (labelCheck.missing.length === 0) {
          verification.issues.withLabels++
        } else {
          verification.issues.withoutLabels.push(
            `${issue.identifier}: missing ${labelCheck.missing.join(', ')}`
          )
        }
      }
    }

    if (verification.issues.withoutLabels.length > 0) {
      verification.overall.passed = false
      verification.overall.issues.push(
        `${verification.issues.withoutLabels.length} issues missing labels`
      )
    }
  }

  return verification
}

/**
 * Verify all projects for an initiative
 *
 * @param initiativeId - The initiative ID to verify projects against
 * @param projectFilter - Optional filter (e.g., { name: { contains: 'MyProject' } })
 */
export async function verifyProjectsForInitiative(
  initiativeId: string = DEFAULT_INITIATIVE_ID,
  projectFilter?: { name?: { contains?: string; eq?: string } }
): Promise<{
  projects: ProjectVerification[]
  summary: {
    total: number
    passed: number
    failed: number
    issues: string[]
  }
}> {
  if (!initiativeId) {
    throw new Error('initiativeId is required. Set LINEAR_DEFAULT_INITIATIVE_ID or pass explicitly.')
  }

  const projects = await getLinearClient().projects(projectFilter ? { filter: projectFilter } : undefined)

  const verifications: ProjectVerification[] = []
  const summary = {
    total: projects.nodes.length,
    passed: 0,
    failed: 0,
    issues: [] as string[]
  }

  for (const proj of projects.nodes) {
    // Get issue count for project
    const issues = await getLinearClient().issues({
      filter: { project: { id: { eq: proj.id } } }
    })

    const verification = await verifyProjectCreation(
      proj.name,
      issues.nodes.length,
      undefined,
      initiativeId
    )

    verifications.push(verification)

    if (verification.overall.passed) {
      summary.passed++
    } else {
      summary.failed++
      summary.issues.push(
        `${proj.name}: ${verification.overall.issues.join('; ')}`
      )
    }
  }

  return { projects: verifications, summary }
}

/**
 * Print verification report
 */
export function printVerificationReport(verification: ProjectVerification): void {
  console.log(`\n=== Project Verification: ${verification.project.name} ===`)
  console.log(`\nProject:`)
  console.log(`  ID: ${verification.project.id || 'N/A'}`)
  console.log(`  Exists: ${verification.project.exists ? '✓' : '✗'}`)
  console.log(`  State: ${verification.project.state || 'N/A'}`)
  console.log(`  Linked to Initiative: ${verification.project.linkedToInitiative ? '✓' : '✗'}`)
  console.log(`  Has Description: ${verification.project.hasDescription ? '✓' : '✗'} (${verification.project.descriptionLength} chars)`)

  console.log(`\nIssues:`)
  console.log(`  Expected: ${verification.issues.expected}`)
  console.log(`  Found: ${verification.issues.found}`)
  console.log(`  With Labels: ${verification.issues.withLabels}`)

  if (verification.issues.withoutLabels.length > 0) {
    console.log(`  Missing Labels:`)
    verification.issues.withoutLabels.forEach(i => console.log(`    - ${i}`))
  }

  console.log(`\nOverall: ${verification.overall.passed ? '✅ PASSED' : '❌ FAILED'}`)
  if (verification.overall.issues.length > 0) {
    console.log(`Issues:`)
    verification.overall.issues.forEach(i => console.log(`  - ${i}`))
  }
}

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