Claude Skills Guide

Claude Code GitHub Actions Notification Setup

Setting up notifications for GitHub Actions when working with Claude Code ensures you stay informed about workflow status, test results, and deployment outcomes. This guide walks you through configuring notifications across multiple channels.

Why Configure GitHub Actions Notifications

When Claude Code executes workflows through skills like the TDD skill or automation pipelines, you need visibility into what happens in your CI/CD environment. Without proper notifications, you might miss failed builds, broken tests, or successful deployments that require your attention.

GitHub Actions provides native notification mechanisms, but extending these to Slack, Discord, email, or custom webhooks gives you flexibility. The setup involves understanding workflow triggers, artifact handling, and notification channels.

Basic GitHub Actions Notification Workflow

The foundation of notification setup starts with your workflow file. Here’s a basic configuration that triggers on workflow completion:

name: Claude Code Build Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Run Claude Code Task
        run: |
          # Your Claude Code execution here
          claude --print "$(cat CLAUDE.md)"
      
      - name: Run Tests
        run: npm test
      
      - name: Upload Results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: test-results
          path: test-results/

The if: always() condition ensures artifacts upload regardless of success or failure, which is critical for debugging.

Slack Notification Configuration

Slack remains popular for team notifications. Create an incoming webhook in your Slack workspace, then add a notification step:

- name: Notify Slack
  if: always()
  uses: 8398a7/action-slack@v3
  with:
    status: ${{ job.status }}
    fields: repo,message,commit,author,action
    channel: '#ci-notifications'
  env:
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

For more detailed notifications, customize message formatting with a raw curl call:

- name: Custom Slack Message
  if: failure()
  run: |
    curl -X POST -H 'Content-type: application/json' \
    --data '{"text":"Build failed: ${{ github.repository }} - ${{ github.workflow }}"}' \
    ${{ secrets.SLACK_WEBHOOK_URL }}

If you use the Slack MCP server with Claude Code, you can further automate response handling when notifications arrive, enabling you to trigger Claude Code actions directly from Slack messages.

Discord Webhook Notifications

Discord offers similar functionality with its webhook system:

- name: Discord Notification
  if: always()
  run: |
    curl -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "content": null,
      "embeds": [{
        "title": "Workflow ${{ job.status }}",
        "description": "${{ github.repository }} - ${{ github.workflow }}",
        "color": ${{ job.status == 'success' && 3066993 || 15158332 }},
        "fields": [
          {"name": "Branch", "value": "${{ github.ref }}", "inline": true},
          {"name": "Commit", "value": "${{ github.sha }}", "inline": true}
        ]
      }]
    }' \
    ${{ secrets.DISCORD_WEBHOOK_URL }}

Email Notifications with GitHub

For teams preferring email, GitHub’s native notification system works well. Configure branch protection rules to require status checks, then subscribe to workflow run notifications:

  1. Go to your repository Settings
  2. Click Notifications
  3. Enable “Workflow runs” under GitHub Actions

For custom email handling with templates, use a GitHub App or action:

- name: Send Email Notification
  if: failure()
  uses: dawidd6/action-send-mail@v3
  with:
    server_address: smtp.gmail.com
    server_port: 465
    username: ${{ secrets.MAIL_USERNAME }}
    password: ${{ secrets.MAIL_PASSWORD }}
    subject: "Build Failed: ${{ github.repository }}"
    body: |
      Workflow ${{ github.workflow }} failed
      
      Branch: ${{ github.ref }}
      Commit: ${{ github.sha }}
      
      View logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
    to: "team@example.com"
    from: "CI Notification <notifications@example.com>"

Conditional Notifications Based on Changes

You can reduce notification noise by filtering based on file changes or authors:

name: Conditional Notifications

on:
  push:
    paths-ignore:
      - '**.md'
      - 'docs/**'
  pull_request:
    paths-ignore:
      - '**.md'

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - name: Check changed files
        id: changes
        uses: dorny/paths-filter@v2
        with:
          filters: |
            src:
              - 'src/**'
              - 'lib/**'
              - '*.js'
              - '*.ts'
      
      - name: Notify on source changes
        if: steps.changes.outputs.src == 'true'
        run: |
          echo "Source code changed - notifying team"

Integrating with Claude Code Skills

Several Claude skills enhance notification workflows. The supermemory skill can track notification history and patterns, helping you understand which types of failures require immediate attention versus those that can wait.

For frontend projects using the frontend-design skill, you might want notifications specifically about visual regression test failures:

- name: Visual Regression Check
  uses: chromaui/action@v1
  with:
    projectDirectory: .
    buildScriptName: test:visual
  
- name: Notify on Visual Changes
  if: failure()
  run: |
    echo "Visual regression detected - review required"

The pdf skill can attach test reports to notifications. After generating test results, use the /pdf skill in Claude Code to create a formatted report, then attach it as an artifact:

- name: Attach Report to Notification
  uses: actions/upload-artifact@v4
  with:
    name: test-report-pdf
    path: report.pdf

Best Practices

  1. Use status-specific channels: Send failures to a high-priority channel and successes to a lower-priority one.

  2. Include actionable information: Always provide links to logs, run IDs, and direct commits.

  3. Filter noise: Use path filters and branch conditions to avoid notifications for documentation-only changes.

  4. Secure your secrets: Store webhook URLs and credentials in GitHub Secrets, never in workflow files.

  5. Test your notifications: Create a manual workflow dispatch to verify notification delivery before relying on it.

Troubleshooting Notification Issues

If notifications aren’t arriving, verify these common issues:

For Slack, use the Slack API’s test endpoint to confirm connectivity. For Discord, the developer portal provides webhook testing tools.

Setting up proper GitHub Actions notifications for Claude Code workflows transforms your CI/CD pipeline from a black box into a transparent, observable system. Teams can respond faster to issues, track deployment success rates, and maintain confidence in their automated workflows.

Built by theluckystrike — More at zovo.one