Configure and manage GitHub Actions for CI/CD pipelines, automated testing, and deployment workflows.
/plugin marketplace add marcel-Ngan/ai-dev-team/plugin install marcel-ngan-ai-dev-team@marcel-Ngan/ai-dev-teamThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Configure and manage GitHub Actions for CI/CD pipelines, automated testing, and deployment workflows.
gh CLI (GitHub CLI){
"owner": "{{github.owner}}",
"repo": "{{github.repo}}",
"defaultBranch": "{{github.defaultBranch}}"
}
# List all workflows
gh workflow list
# View specific workflow
gh workflow view "CI"
# View workflow file
gh workflow view "CI" --yaml
# Run workflow manually
gh workflow run "CI"
# Run with inputs
gh workflow run "deploy" -f environment=staging
# Run on specific branch
gh workflow run "CI" --ref feature-branch
# List recent runs
gh run list
# List runs for specific workflow
gh run list --workflow "CI"
# List failed runs
gh run list --status failure
# View specific run
gh run view <run-id>
# View run logs
gh run view <run-id> --log
# Watch run in progress
gh run watch <run-id>
# Re-run failed jobs
gh run rerun <run-id>
# Re-run all jobs
gh run rerun <run-id> --failed
# Cancel run
gh run cancel <run-id>
# Download artifacts
gh run download <run-id>
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Build
run: npm run build
name: CI Matrix
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18, 20, 22]
exclude:
- os: windows-latest
node: 18
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm test
name: PR Checks
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
required: true
default: 'staging'
type: choice
options:
- staging
- production
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment || 'staging' }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install and Build
run: |
npm ci
npm run build
- name: Deploy to ${{ github.event.inputs.environment || 'staging' }}
run: |
echo "Deploying to ${{ github.event.inputs.environment || 'staging' }}"
# Add deployment commands here
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
env:
DATABASE_URL: postgres://test:test@localhost:5432/test
jobs:
deploy-staging:
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- run: echo "Deploying to staging"
deploy-production:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- run: echo "Deploying to production"
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "Building"
test:
needs: build
runs-on: ubuntu-latest
steps:
- run: echo "Testing"
deploy:
needs: [build, test]
runs-on: ubuntu-latest
steps:
- run: echo "Deploying"
steps:
- name: Deploy
env:
API_KEY: ${{ secrets.API_KEY }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: ./deploy.sh
# List secrets
gh secret list
# Set secret
gh secret set API_KEY
# Set secret from file
gh secret set API_KEY < api-key.txt
# Set secret for environment
gh secret set API_KEY --env production
# Delete secret
gh secret delete API_KEY
# In workflow file
env:
ACTIONS_STEP_DEBUG: true
ACTIONS_RUNNER_DEBUG: true
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
| Issue | Cause | Solution |
|---|---|---|
| Permission denied | Missing permissions | Add permissions block |
| Secret not found | Wrong name or scope | Verify secret exists |
| Cache miss | Key changed | Check cache key pattern |
| Timeout | Long-running job | Increase timeout or optimize |
name: Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Scheduled Tasks
on:
schedule:
- cron: '0 0 * * *' # Daily at midnight
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- run: echo "Running scheduled cleanup"
// On workflow failure, create bug
Atlassian:createJiraIssue({
cloudId: "{{jira.cloudId}}",
projectKey: "{{jira.bugs.projectKey}}",
issueTypeName: "Bug",
summary: "CI Pipeline Failure: {{workflowName}}",
description: `## CI Pipeline Failure
**Workflow:** {{workflowName}}
**Run:** [#{{runId}}]({{runUrl}})
**Branch:** {{branch}}
**Commit:** {{commitSha}}
### Error
\`\`\`
{{errorOutput}}
\`\`\`
### Failed Jobs
{{#each failedJobs}}
- {{jobName}}: {{error}}
{{/each}}`,
labels: ["ci-failure", "automated"]
})
| Agent | GitHub Actions Use |
|---|---|
| DevOps Engineer | Primary - creates and maintains workflows |
| Senior Developer | Reviews workflow changes |
| QA Engineer | Monitors test workflow results |
| Project Manager | Tracks deployment status |
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.