Claude Skills Guide

Automated GitHub Issue Triage with Claude Skills

Managing GitHub issues at scale quickly becomes overwhelming. When your repository accumulates hundreds of issues, manually triaging each one—categorizing, labeling, assigning priority, and routing to the right maintainers—eats away development time. Claude skills offer a practical solution by automating these workflows while maintaining accuracy.

This guide covers how to build an automated GitHub issue triage system using Claude skills, with concrete examples you can adapt to your project.

Claude skills are Markdown files stored in ~/.claude/skills/ and invoked with /skill-name inside a Claude Code session. They give Claude standing instructions for recurring tasks without requiring you to re-explain the context each time.

Understanding the Triage Pipeline

Before implementing automation, identify the stages where Claude skills add value:

  1. Issue intake — New issues arrive and need initial classification
  2. Label application — Tags like bug, enhancement, help-wanted get applied
  3. Priority assessment — Issues are ranked by severity or impact
  4. Routing — Issues get assigned to appropriate team members or projects

Each stage can use Claude skills to process the issue content intelligently.

Extracting Issue Content with Claude Code

The foundation of automated triage is reading issue data reliably. Claude Code can fetch issue data directly via the GitHub CLI:

# Fetch issue details as structured JSON
gh issue view 123 --json title,body,labels,author,reactions > issue_123.json

# List all open unlabeled issues
gh issue list --label "" --json number,title,body --limit 50 > unlabeled_issues.json

With the data in hand, you can paste it into a Claude Code session or reference the file directly.

Creating a Triage Skill

Build a custom triage skill at ~/.claude/skills/issue-triage.md:

# Issue Triage

Classify and label GitHub issues systematically.

## Instructions

Given an issue title and body:
1. Determine issue type: bug, feature-request, question, documentation, or needs-info
2. Assess priority: high (data loss, crash, security), medium (functional bug, common use case), low (enhancement, cosmetic)
3. Suggest labels from the project's label set
4. Identify if a "needs-information" label is warranted (missing steps to reproduce, vague description)
5. Suggest an assignee if the affected area maps to a known owner

Output a JSON block with: type, priority, labels[], assignee, comment_if_needed

Invoke it against a batch of issues:

/issue-triage
Here are 10 unlabeled issues from our repository. Classify each one.

[paste issue JSON from gh issue list output]

Applying Labels with GitHub CLI

Once Claude provides triage decisions, apply them programmatically:

# Apply labels from triage output
gh issue edit 123 --add-label "bug,high-priority"

# Add a comment requesting more information
gh issue comment 123 --body "Thanks for the report! Could you share steps to reproduce this issue and the version of the library you're using?"

# Close a duplicate
gh issue close 456 --comment "Closing as duplicate of #123"

Integrating with GitHub Actions

For a fully automated pipeline, combine shell-based triage with GitHub Actions:

name: Issue Triage
on:
  issues:
    types: [opened, edited]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - name: Fetch issue data
        id: issue
        run: |
          gh issue view ${{ github.event.issue.number }} \
            --json title,body,labels,reactions \
            --repo ${{ github.repository }} > issue_data.json
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Classify and label
        run: |
          # Call your classification script
          python triage_classifier.py issue_data.json
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

The classification script uses Claude’s API to analyze the issue, then applies labels via gh issue edit. This is separate from Claude skills—it’s a standalone script that calls the Anthropic API programmatically for a server-side automation task.

Practical Triage Rules

Rather than relying entirely on AI classification, establish rules that can be applied consistently:

Bug detection — Issues containing error messages, stack traces, or words like “crashes”, “broken”, “fails” receive the bug label automatically.

Feature requests — Body text containing “should add”, “would be nice”, “implement”, or “new feature” gets tagged as enhancement.

Priority scoring — Issues with many reactions or comments from multiple users indicate community priority:

def calculate_priority(issue_data):
    """Score issue priority based on multiple factors."""
    score = 0

    if issue_data['author_association'] == 'MEMBER':
        score += 2
    elif issue_data['author_association'] == 'CONTRIBUTOR':
        score += 1

    score += min(issue_data['reactions']['+1'] / 5, 3)

    if 'steps to reproduce' in issue_data['body'].lower():
        score += 1

    return 'high' if score >= 4 else 'medium' if score >= 2 else 'low'

Using supermemory for Pattern Tracking

The supermemory skill tracks historical patterns across triage sessions. Invoke it to record what you learn:

/supermemory store: issues mentioning "authentication" are usually assigned to @sarah - she owns the auth module
/supermemory store: "export fails" issues are almost always the CSV encoder - label them bug + csv-export
/supermemory Which labels does the payments module use?

Over time, supermemory builds a reference that makes triage faster and more consistent.

Handling Edge Cases

Duplicate detection — Before labeling a new issue, search for existing ones:

# Search for potentially duplicate issues
gh issue list --search "authentication token expires" --json number,title

Pass the results to Claude Code for similarity assessment:

/issue-triage
New issue title: "JWT tokens expire too quickly"
Existing open issues on this topic: [paste list]
Are any of these duplicates? If so, which one should we close as a duplicate of which?

Needs more info — Issues lacking reproduction steps get a needs-information label and a polite comment. Your triage skill’s output includes a comment_if_needed field—use that text with gh issue comment.

Skills Worth Adding to Your Triage Workflow

Monitoring and Iteration

Track triage accuracy over time. Log when humans override AI-generated labels:

def log_triage_feedback(issue_id, ai_labels, human_labels):
    """Record triage accuracy for improvement."""
    with open('triage_feedback.log', 'a') as f:
        f.write(f"{issue_id}: {ai_labels} -> {human_labels}\n")

Review these logs monthly. Patterns emerge—perhaps certain issue types are consistently misclassified, or priority scoring needs adjustment based on your team’s actual velocity.

Summary

Automated GitHub issue triage using Claude skills reduces maintainer burden while ensuring consistent classification. Start with a custom /issue-triage skill for interactive triage sessions, then layer in GitHub Actions for automated labeling on new issues. Use supermemory to accumulate pattern knowledge, and maintain a feedback loop for continuous improvement.

The initial investment pays dividends as your issue queue grows. What once required hours of manual triage becomes a background process that keeps your project organized and helps contributors get their issues addressed faster.


Built by theluckystrike — More at zovo.one