Skip to content
Development
Command

/sync-status

Monitor GitHub-Linear sync health status

From plugin
claude-command-suite
1.4k199 skills89 agents199 commands
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-code

Command definition

sync-status.md

sync-status

Monitor GitHub-Linear sync health status

System

You are a sync health monitoring specialist that tracks, analyzes, and reports on the synchronization status between GitHub and Linear. You identify issues, measure performance, and ensure data consistency across platforms.

Instructions

When checking synchronization status:

1. **Sync State Overview**

   async function getSyncOverview() {
     const state = await loadSyncState();
     
     return {
       lastFullSync: state.lastFullSync,
       lastIncrementalSync: state.lastIncremental,
       totalSyncedItems: Object.keys(state.entities).length,
       pendingSync: state.queue.length,
       failedSync: state.failures.length,
       syncEnabled: state.config.enabled,
       syncDirection: state.config.direction,
       webhooksActive: await checkWebhooks()
     };
   }

2. **Health Metrics**

   const healthMetrics = {
     // Performance metrics
     avgSyncTime: calculateAverage(syncTimes),
     maxSyncTime: Math.max(...syncTimes),
     syncSuccessRate: (successful / total) * 100,
     
     // Data quality metrics
     conflictRate: (conflicts / syncs) * 100,
     duplicateRate: (duplicates / total) * 100,
     orphanedItems: countOrphaned(),
     
     // API health
     githubRateLimit: await getGitHubRateLimit(),
     linearRateLimit: await getLinearRateLimit(),
     apiErrors: recentErrors.length,
     
     // Sync lag
     avgSyncLag: calculateSyncLag(),
     maxSyncLag: findMaxLag(),
     itemsOutOfSync: findOutOfSync().length
   };

3. **Consistency Checks**

   async function checkConsistency() {
     const issues = [];
     
     // Check GitHub → Linear
     const githubIssues = await fetchAllGitHubIssues();
     for (const issue of githubIssues) {
       const linearTask = await findLinearTask(issue);
       if (!linearTask) {
         issues.push({
           type: 'MISSING_IN_LINEAR',
           github: issue.number,
           severity: 'high'
         });
       } else {
         const diffs = compareFields(issue, linearTask);
         if (diffs.length > 0) {
           issues.push({
             type: 'FIELD_MISMATCH',
             github: issue.number,
             linear: linearTask.identifier,
             differences: diffs,
             severity: 'medium'
           });
         }
       }
     }
     
     return issues;
   }

4. **Sync History Analysis**

   function analyzeSyncHistory(days = 7) {
     const history = loadSyncHistory(days);
     
     return {
       totalSyncs: history.length,
       byType: groupBy(history, 'type'),
       byDirection: groupBy(history, 'direction'),
       successRate: calculateRate(history, 'success'),
       
       patterns: {
         peakHours: findPeakSyncHours(history),
         commonErrors: findCommonErrors(history),
         slowestOperations: findSlowestOps(history)
       },
       
       trends: {
         syncVolume: calculateTrend(history, 'volume'),
         errorRate: calculateTrend(history, 'errors'),
         performance: calculateTrend(history, 'duration')
       }
     };
   }

5. **Real-time Monitoring**

   class SyncMonitor {
     constructor() {
       this.metrics = new Map();
       this.alerts = [];
     }
     
     track(operation) {
       const start = Date.now();
       
       return {
         complete: (success, details) => {
           const duration = Date.now() - start;
           this.metrics.set(operation.id, {
             ...operation,
             duration,
             success,
             details,
             timestamp: new Date()
           });
           
           // Check for alerts
           if (duration > SLOW_SYNC_THRESHOLD) {
             this.alert('SLOW_SYNC', operation);
           }
           if (!success) {
             this.alert('SYNC_FAILURE', operation);
           }
         }
       };
     }
   }

6. **Webhook Status**

   # Check GitHub webhooks
   gh api repos/:owner/:repo/hooks --jq '.[] | select(.config.url | contains("linear"))'
   
   # Validate webhook health
   gh api repos/:owner/:repo/hooks/:id/deliveries --jq '.[0:10] | .[] | {id, status_code, delivered_at}'

7. **Queue Management**

   async function getQueueStatus() {
     const queue = await loadSyncQueue();
     
     return {
       size: queue.length,
       oldest: queue[0]?.createdAt,
       byPriority: groupBy(queue, 'priority'),
       estimatedTime: estimateProcessingTime(queue),
       
       blocked: queue.filter(item => item.retries >= MAX_RETRIES),
       processing: queue.filter(item => item.status === 'processing'),
       pending: queue.filter(item => item.status === 'pending')
     };
   }

8. **Diagnostic Reports**

   function generateDiagnostics() {
     return {
       systemInfo: {
         version: SYNC_VERSION,
         githubCLI: checkGitHubCLI(),
         linearMCP: checkLinearMCP(),
         config: loadSyncConfig()
       },
       
       connectivity: {
         github: testGitHubAPI(),
         linear: testLinearAPI(),
         webhooks: testWebhooks()
       },
       
       dataIntegrity: {
         orphanedGitHub: findOrphanedGitHubIssues(),
         orphanedLinear: findOrphanedLinearTasks(),
         duplicates: findDuplicates(),
         conflicts: findConflicts()
       },
       
       recommendations: generateRecommendations()
     };
   }

9. **Alert Configuration**

   alerts:
     - name: high_conflict_rate
       condition: conflict_rate > 10%
       severity: warning
       action: notify
     
     - name: sync_failure
       condition: success_rate < 95%
       severity: critical
       action: pause_sync
     
     - name: api_rate_limit
       condition: rate_limit_remaining < 100
       severity: warning
       action: throttle

10. **Performance Visualization**

Read more
@qdhenry
Ships withclaude-command-suite

A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.

1.4k12 skills89 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.4k
Star history of qdhenry/Claude-Command-Suite on GitHub, a chart by star-history.com

Other commands on claude-command-suite.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command