[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C0STW2DXTWG95ZMZ7RR35Y":3,"skill-same:01M7C0STW2DXTWG95ZMZ7RR35Y":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7C0STW2DXTWG95ZMZ7RR35Y","github-workflow-automation",null,"Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) and modern DevOps practices.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fgithub-workflow-automation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: github-workflow-automation\ndescription: \"Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) and modern DevOps practices.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# 🔧 GitHub Workflow Automation\n\n> Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) and modern DevOps practices.\n\n## When to Use This Skill\n\nUse this skill when:\n\n- Automating PR reviews with AI\n- Setting up issue triage automation\n- Creating GitHub Actions workflows\n- Integrating AI into CI\u002FCD pipelines\n- Automating Git operations (rebases, cherry-picks)\n\n---\n\n## 1. Automated PR Review\n\n### 1.1 PR Review Action\n\n```yaml\n# .github\u002Fworkflows\u002Fai-review.yml\nname: AI Code Review\n\non:\n  pull_request:\n    types: [opened, synchronize]\n\njobs:\n  review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Get changed files\n        id: changed\n        run: |\n          files=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD)\n          echo \"files\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$files\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: Get diff\n        id: diff\n        run: |\n          diff=$(git diff origin\u002F${{ github.base_ref }}...HEAD)\n          echo \"diff\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$diff\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: AI Review\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const { Anthropic } = require('@anthropic-ai\u002Fsdk');\n            const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });\n\n            const response = await client.messages.create({\n              model: \"claude-3-sonnet-20240229\",\n              max_tokens: 4096,\n              messages: [{\n                role: \"user\",\n                content: `Review this PR diff and provide feedback:\n                \n                Changed files: ${{ steps.changed.outputs.files }}\n                \n                Diff:\n                ${{ steps.diff.outputs.diff }}\n                \n                Provide:\n                1. Summary of changes\n                2. Potential issues or bugs\n                3. Suggestions for improvement\n                4. Security concerns if any\n                \n                Format as GitHub markdown.`\n              }]\n            });\n\n            await github.rest.pulls.createReview({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              pull_number: context.issue.number,\n              body: response.content[0].text,\n              event: 'COMMENT'\n            });\n        env:\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n```\n\n### 1.2 Review Comment Patterns\n\n````markdown\n# AI Review Structure\n\n## 📋 Summary\n\nBrief description of what this PR does.\n\n## ✅ What looks good\n\n- Well-structured code\n- Good test coverage\n- Clear naming conventions\n\n## ⚠️ Potential Issues\n\n1. **Line 42**: Possible null pointer exception\n   ```javascript\n   \u002F\u002F Current\n   user.profile.name;\n   \u002F\u002F Suggested\n   user?.profile?.name ?? \"Unknown\";\n   ```\n````\n\n2. **Line 78**: Consider error handling\n   ```javascript\n   \u002F\u002F Add try-catch or .catch()\n   ```\n\n## 💡 Suggestions\n\n- Consider extracting the validation logic into a separate function\n- Add JSDoc comments for public methods\n\n## 🔒 Security Notes\n\n- No sensitive data exposure detected\n- API key handling looks correct\n\n````\n\n### 1.3 Focused Reviews\n\n```yaml\n# Review only specific file types\n- name: Filter code files\n  run: |\n    files=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD | \\\n            grep -E '\\.(ts|tsx|js|jsx|py|go)$' || true)\n    echo \"code_files=$files\" >> $GITHUB_OUTPUT\n\n# Review with context\n- name: AI Review with context\n  run: |\n    # Include relevant context files\n    context=\"\"\n    for file in ${{ steps.changed.outputs.files }}; do\n      if [[ -f \"$file\" ]]; then\n        context+=\"=== $file ===\\n$(cat $file)\\n\\n\"\n      fi\n    done\n\n    # Send to AI with full file context\n````\n\n---\n\n## 2. Issue Triage Automation\n\n### 2.1 Auto-label Issues\n\n```yaml\n# .github\u002Fworkflows\u002Fissue-triage.yml\nname: Issue Triage\n\non:\n  issues:\n    types: [opened]\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    permissions:\n      issues: write\n\n    steps:\n      - name: Analyze issue\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const issue = context.payload.issue;\n\n            \u002F\u002F Call AI to analyze\n            const analysis = await analyzeIssue(issue.title, issue.body);\n\n            \u002F\u002F Apply labels\n            const labels = [];\n\n            if (analysis.type === 'bug') {\n              labels.push('bug');\n              if (analysis.severity === 'high') labels.push('priority: high');\n            } else if (analysis.type === 'feature') {\n              labels.push('enhancement');\n            } else if (analysis.type === 'question') {\n              labels.push('question');\n            }\n\n            if (analysis.area) {\n              labels.push(`area: ${analysis.area}`);\n            }\n\n            await github.rest.issues.addLabels({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: issue.number,\n              labels: labels\n            });\n\n            \u002F\u002F Add initial response\n            if (analysis.type === 'bug' && !analysis.hasReproSteps) {\n              await github.rest.issues.createComment({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                issue_number: issue.number,\n                body: `Thanks for reporting this issue!\n\nTo help us investigate, could you please provide:\n- Steps to reproduce the issue\n- Expected behavior\n- Actual behavior\n- Environment (OS, version, etc.)\n\nThis will help us resolve your issue faster. 🙏`\n              });\n            }\n```\n\n### 2.2 Issue Analysis Prompt\n\n```typescript\nconst TRIAGE_PROMPT = `\nAnalyze this GitHub issue and classify it:\n\nTitle: {title}\nBody: {body}\n\nReturn JSON with:\n{\n  \"type\": \"bug\" | \"feature\" | \"question\" | \"docs\" | \"other\",\n  \"severity\": \"low\" | \"medium\" | \"high\" | \"critical\",\n  \"area\": \"frontend\" | \"backend\" | \"api\" | \"docs\" | \"ci\" | \"other\",\n  \"summary\": \"one-line summary\",\n  \"hasReproSteps\": boolean,\n  \"isFirstContribution\": boolean,\n  \"suggestedLabels\": [\"label1\", \"label2\"],\n  \"suggestedAssignees\": [\"username\"] \u002F\u002F based on area expertise\n}\n`;\n```\n\n### 2.3 Stale Issue Management\n\n```yaml\n# .github\u002Fworkflows\u002Fstale.yml\nname: Manage Stale Issues\n\non:\n  schedule:\n    - cron: \"0 0 * * *\" # Daily\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fstale@v9\n        with:\n          stale-issue-message: |\n            This issue has been automatically marked as stale because it has not had \n            recent activity. It will be closed in 14 days if no further activity occurs.\n\n            If this issue is still relevant:\n            - Add a comment with an update\n            - Remove the `stale` label\n\n            Thank you for your contributions! 🙏\n\n          stale-pr-message: |\n            This PR has been automatically marked as stale. Please update it or it \n            will be closed in 14 days.\n\n          days-before-stale: 60\n          days-before-close: 14\n          stale-issue-label: \"stale\"\n          stale-pr-label: \"stale\"\n          exempt-issue-labels: \"pinned,security,in-progress\"\n          exempt-pr-labels: \"pinned,security\"\n```\n\n---\n\n## 3. CI\u002FCD Integration\n\n### 3.1 Smart Test Selection\n\n```yaml\n# .github\u002Fworkflows\u002Fsmart-tests.yml\nname: Smart Test Selection\n\non:\n  pull_request:\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    outputs:\n      test_suites: ${{ steps.analyze.outputs.suites }}\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Analyze changes\n        id: analyze\n        run: |\n          # Get changed files\n          changed=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD)\n\n          # Determine which test suites to run\n          suites=\"[]\"\n\n          if echo \"$changed\" | grep -q \"^src\u002Fapi\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"api\"]')\n          fi\n\n          if echo \"$changed\" | grep -q \"^src\u002Ffrontend\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"frontend\"]')\n          fi\n\n          if echo \"$changed\" | grep -q \"^src\u002Fdatabase\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"database\", \"api\"]')\n          fi\n\n          # If nothing specific, run all\n          if [ \"$suites\" = \"[]\" ]; then\n            suites='[\"all\"]'\n          fi\n\n          echo \"suites=$suites\" >> $GITHUB_OUTPUT\n\n  test:\n    needs: analyze\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        suite: ${{ fromJson(needs.analyze.outputs.test_suites) }}\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run tests\n        run: |\n          if [ \"${{ matrix.suite }}\" = \"all\" ]; then\n            npm test\n          else\n            npm test -- --suite ${{ matrix.suite }}\n          fi\n```\n\n### 3.2 Deployment with AI Validation\n\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml\nname: Deploy with AI Validation\n\non:\n  push:\n    branches: [main]\n\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Get deployment changes\n        id: changes\n        run: |\n          # Get commits since last deployment\n          last_deploy=$(git describe --tags --abbrev=0 2>\u002Fdev\u002Fnull || echo \"\")\n          if [ -n \"$last_deploy\" ]; then\n            changes=$(git log --oneline $last_deploy..HEAD)\n          else\n            changes=$(git log --oneline -10)\n          fi\n          echo \"changes\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$changes\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: AI Risk Assessment\n        id: assess\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            \u002F\u002F Analyze changes for deployment risk\n            const prompt = `\n            Analyze these changes for deployment risk:\n\n            ${process.env.CHANGES}\n\n            Return JSON:\n            {\n              \"riskLevel\": \"low\" | \"medium\" | \"high\",\n              \"concerns\": [\"concern1\", \"concern2\"],\n              \"recommendations\": [\"rec1\", \"rec2\"],\n              \"requiresManualApproval\": boolean\n            }\n            `;\n\n            \u002F\u002F Call AI and parse response\n            const analysis = await callAI(prompt);\n\n            if (analysis.riskLevel === 'high') {\n              core.setFailed('High-risk deployment detected. Manual review required.');\n            }\n\n            return analysis;\n        env:\n          CHANGES: ${{ steps.changes.outputs.changes }}\n\n  deploy:\n    needs: validate\n    runs-on: ubuntu-latest\n    environment: production\n    steps:\n      - name: Deploy\n        run: |\n          echo \"Deploying to production...\"\n          # Deployment commands here\n```\n\n### 3.3 Rollback Automation\n\n```yaml\n# .github\u002Fworkflows\u002Frollback.yml\nname: Automated Rollback\n\non:\n  workflow_dispatch:\n    inputs:\n      reason:\n        description: \"Reason for rollback\"\n        required: true\n\njobs:\n  rollback:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Find last stable version\n        id: stable\n        run: |\n          # Find last successful deployment\n          stable=$(git tag -l 'v*' --sort=-version:refname | head -1)\n          echo \"version=$stable\" >> $GITHUB_OUTPUT\n\n      - name: Rollback\n        run: |\n          git checkout ${{ steps.stable.outputs.version }}\n          # Deploy stable version\n          npm run deploy\n\n      - name: Notify team\n        uses: slackapi\u002Fslack-github-action@v1\n        with:\n          payload: |\n            {\n              \"text\": \"🔄 Production rolled back to ${{ steps.stable.outputs.version }}\",\n              \"blocks\": [\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"mrkdwn\",\n                    \"text\": \"*Rollback executed*\\n• Version: `${{ steps.stable.outputs.version }}`\\n• Reason: ${{ inputs.reason }}\\n• Triggered by: ${{ github.actor }}\"\n                  }\n                }\n              ]\n            }\n```\n\n---\n\n## 4. Git Operations\n\n### 4.1 Automated Rebasing\n\n```yaml\n# .github\u002Fworkflows\u002Fauto-rebase.yml\nname: Auto Rebase\n\non:\n  issue_comment:\n    types: [created]\n\njobs:\n  rebase:\n    if: github.event.issue.pull_request && contains(github.event.comment.body, '\u002Frebase')\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Setup Git\n        run: |\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n\n      - name: Rebase PR\n        run: |\n          # Fetch PR branch\n          gh pr checkout ${{ github.event.issue.number }}\n\n          # Rebase onto main\n          git fetch origin main\n          git rebase origin\u002Fmain\n\n          # Force push\n          git push --force-with-lease\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Comment result\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number,\n              body: '✅ Successfully rebased onto main!'\n            })\n```\n\n### 4.2 Smart Cherry-Pick\n\n```typescript\n\u002F\u002F AI-assisted cherry-pick that handles conflicts\nasync function smartCherryPick(commitHash: string, targetBranch: string) {\n  \u002F\u002F Get commit info\n  const commitInfo = await exec(`git show ${commitHash} --stat`);\n\n  \u002F\u002F Check for potential conflicts\n  const targetDiff = await exec(\n    `git diff ${targetBranch}...HEAD -- ${affectedFiles}`\n  );\n\n  \u002F\u002F AI analysis\n  const analysis = await ai.analyze(`\n    I need to cherry-pick this commit to ${targetBranch}:\n    \n    ${commitInfo}\n    \n    Current state of affected files on ${targetBranch}:\n    ${targetDiff}\n    \n    Will there be conflicts? If so, suggest resolution strategy.\n  `);\n\n  if (analysis.willConflict) {\n    \u002F\u002F Create branch for manual resolution\n    await exec(\n      `git checkout -b cherry-pick-${commitHash.slice(0, 7)} ${targetBranch}`\n    );\n    const result = await exec(`git cherry-pick ${commitHash}`, {\n      allowFail: true,\n    });\n\n    if (result.failed) {\n      \u002F\u002F AI-assisted conflict resolution\n      const conflicts = await getConflicts();\n      for (const conflict of conflicts) {\n        const resolution = await ai.resolveConflict(conflict);\n        await applyResolution(conflict.file, resolution);\n      }\n    }\n  } else {\n    await exec(`git checkout ${targetBranch}`);\n    await exec(`git cherry-pick ${commitHash}`);\n  }\n}\n```\n\n### 4.3 Branch Cleanup\n\n```yaml\n# .github\u002Fworkflows\u002Fbranch-cleanup.yml\nname: Branch Cleanup\n\non:\n  schedule:\n    - cron: '0 0 * * 0'  # Weekly\n  workflow_dispatch:\n\njobs:\n  cleanup:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Find stale branches\n        id: stale\n        run: |\n          # Branches not updated in 30 days\n          stale=$(git for-each-ref --sort=-committerdate refs\u002Fremotes\u002Forigin \\\n            --format='%(refname:short) %(committerdate:relative)' | \\\n            grep -E '[3-9][0-9]+ days|[0-9]+ months|[0-9]+ years' | \\\n            grep -v 'origin\u002Fmain\\|origin\u002Fdevelop' | \\\n            cut -d' ' -f1 | sed 's|origin\u002F||')\n\n          echo \"branches\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$stale\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: Create cleanup PR\n        if: steps.stale.outputs.branches != ''\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const branches = `${{ steps.stale.outputs.branches }}`.split('\\n').filter(Boolean);\n\n            const body = `## 🧹 Stale Branch Cleanup\n\nThe following branches haven't been updated in over 30 days:\n\n${branches.map(b => `- \\`${b}\\``).join('\\n')}\n\n### Actions:\n- [ ] Review each branch\n- [ ] Delete branches that are no longer needed\n- Comment \\`\u002Fkeep branch-name\\` to preserve specific branches\n`;\n\n            await github.rest.issues.create({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              title: 'Stale Branch Cleanup',\n              body: body,\n              labels: ['housekeeping']\n            });\n```\n\n---\n\n## 5. On-Demand Assistance\n\n### 5.1 @mention Bot\n\n```yaml\n# .github\u002Fworkflows\u002Fmention-bot.yml\nname: AI Mention Bot\n\non:\n  issue_comment:\n    types: [created]\n  pull_request_review_comment:\n    types: [created]\n\njobs:\n  respond:\n    if: contains(github.event.comment.body, '@ai-helper')\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Extract question\n        id: question\n        run: |\n          # Extract text after @ai-helper\n          question=$(echo \"${{ github.event.comment.body }}\" | sed 's\u002F.*@ai-helper\u002F\u002F')\n          echo \"question=$question\" >> $GITHUB_OUTPUT\n\n      - name: Get context\n        id: context\n        run: |\n          if [ \"${{ github.event.issue.pull_request }}\" != \"\" ]; then\n            # It's a PR - get diff\n            gh pr diff ${{ github.event.issue.number }} > context.txt\n          else\n            # It's an issue - get description\n            gh issue view ${{ github.event.issue.number }} --json body -q .body > context.txt\n          fi\n          echo \"context=$(cat context.txt)\" >> $GITHUB_OUTPUT\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: AI Response\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const response = await ai.chat(`\n              Context: ${process.env.CONTEXT}\n              \n              Question: ${process.env.QUESTION}\n              \n              Provide a helpful, specific answer. Include code examples if relevant.\n            `);\n\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number,\n              body: response\n            });\n        env:\n          CONTEXT: ${{ steps.context.outputs.context }}\n          QUESTION: ${{ steps.question.outputs.question }}\n```\n\n### 5.2 Command Patterns\n\n```markdown\n## Available Commands\n\n| Command              | Description                 |\n| :------------------- | :-------------------------- |\n| `@ai-helper explain` | Explain the code in this PR |\n| `@ai-helper review`  | Request AI code review      |\n| `@ai-helper fix`     | Suggest fixes for issues    |\n| `@ai-helper test`    | Generate test cases         |\n| `@ai-helper docs`    | Generate documentation      |\n| `\u002Frebase`            | Rebase PR onto main         |\n| `\u002Fupdate`            | Update PR branch from main  |\n| `\u002Fapprove`           | Mark as approved by bot     |\n| `\u002Flabel bug`         | Add 'bug' label             |\n| `\u002Fassign @user`      | Assign to user              |\n```\n\n---\n\n## 6. Repository Configuration\n\n### 6.1 CODEOWNERS\n\n```\n# .github\u002FCODEOWNERS\n\n# Global owners\n* @org\u002Fcore-team\n\n# Frontend\n\u002Fsrc\u002Ffrontend\u002F @org\u002Ffrontend-team\n*.tsx @org\u002Ffrontend-team\n*.css @org\u002Ffrontend-team\n\n# Backend\n\u002Fsrc\u002Fapi\u002F @org\u002Fbackend-team\n\u002Fsrc\u002Fdatabase\u002F @org\u002Fbackend-team\n\n# Infrastructure\n\u002F.github\u002F @org\u002Fdevops-team\n\u002Fterraform\u002F @org\u002Fdevops-team\nDockerfile @org\u002Fdevops-team\n\n# Docs\n\u002Fdocs\u002F @org\u002Fdocs-team\n*.md @org\u002Fdocs-team\n\n# Security-sensitive\n\u002Fsrc\u002Fauth\u002F @org\u002Fsecurity-team\n\u002Fsrc\u002Fcrypto\u002F @org\u002Fsecurity-team\n```\n\n### 6.2 Branch Protection\n\n```yaml\n# Set up via GitHub API\n- name: Configure branch protection\n  uses: actions\u002Fgithub-script@v7\n  with:\n    script: |\n      await github.rest.repos.updateBranchProtection({\n        owner: context.repo.owner,\n        repo: context.repo.repo,\n        branch: 'main',\n        required_status_checks: {\n          strict: true,\n          contexts: ['test', 'lint', 'ai-review']\n        },\n        enforce_admins: true,\n        required_pull_request_reviews: {\n          required_approving_review_count: 1,\n          require_code_owner_reviews: true,\n          dismiss_stale_reviews: true\n        },\n        restrictions: null,\n        required_linear_history: true,\n        allow_force_pushes: false,\n        allow_deletions: false\n      });\n```\n\n---\n\n## Best Practices\n\n### Security\n\n- [ ] Store API keys in GitHub Secrets\n- [ ] Use minimal permissions in workflows\n- [ ] Validate all inputs\n- [ ] Don't expose sensitive data in logs\n\n### Performance\n\n- [ ] Cache dependencies\n- [ ] Use matrix builds for parallel testing\n- [ ] Skip unnecessary jobs with path filters\n- [ ] Use self-hosted runners for heavy workloads\n\n### Reliability\n\n- [ ] Add timeouts to jobs\n- [ ] Handle rate limits gracefully\n- [ ] Implement retry logic\n- [ ] Have rollback procedures\n\n---\n\n## Resources\n\n- [Gemini CLI GitHub Action](https:\u002F\u002Fgithub.com\u002Fgoogle-github-actions\u002Frun-gemini-cli)\n- [GitHub Actions Documentation](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions)\n- [GitHub REST API](https:\u002F\u002Fdocs.github.com\u002Fen\u002Frest)\n- [CODEOWNERS Syntax](https:\u002F\u002Fdocs.github.com\u002Fen\u002Frepositories\u002Fmanaging-your-repositorys-settings-and-features\u002Fcustomizing-your-repository\u002Fabout-code-owners)\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# 🔧 GitHub Workflow Automation\n\n> Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) and modern DevOps practices.\n\n## When to Use This Skill\n\nUse this skill when:\n\n- Automating PR reviews with AI\n- Setting up issue triage automation\n- Creating GitHub Actions workflows\n- Integrating AI into CI\u002FCD pipelines\n- Automating Git operations (rebases, cherry-picks)\n\n---\n\n## 1. Automated PR Review\n\n### 1.1 PR Review Action\n\n```yaml\n# .github\u002Fworkflows\u002Fai-review.yml\nname: AI Code Review\n\non:\n  pull_request:\n    types: [opened, synchronize]\n\njobs:\n  review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Get changed files\n        id: changed\n        run: |\n          files=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD)\n          echo \"files\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$files\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: Get diff\n        id: diff\n        run: |\n          diff=$(git diff origin\u002F${{ github.base_ref }}...HEAD)\n          echo \"diff\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$diff\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: AI Review\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const { Anthropic } = require('@anthropic-ai\u002Fsdk');\n            const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });\n\n            const response = await client.messages.create({\n              model: \"claude-3-sonnet-20240229\",\n              max_tokens: 4096,\n              messages: [{\n                role: \"user\",\n                content: `Review this PR diff and provide feedback:\n                \n                Changed files: ${{ steps.changed.outputs.files }}\n                \n                Diff:\n                ${{ steps.diff.outputs.diff }}\n                \n                Provide:\n                1. Summary of changes\n                2. Potential issues or bugs\n                3. Suggestions for improvement\n                4. Security concerns if any\n                \n                Format as GitHub markdown.`\n              }]\n            });\n\n            await github.rest.pulls.createReview({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              pull_number: context.issue.number,\n              body: response.content[0].text,\n              event: 'COMMENT'\n            });\n        env:\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n```\n\n### 1.2 Review Comment Patterns\n\n````markdown\n# AI Review Structure\n\n## 📋 Summary\n\nBrief description of what this PR does.\n\n## ✅ What looks good\n\n- Well-structured code\n- Good test coverage\n- Clear naming conventions\n\n## ⚠️ Potential Issues\n\n1. **Line 42**: Possible null pointer exception\n   ```javascript\n   \u002F\u002F Current\n   user.profile.name;\n   \u002F\u002F Suggested\n   user?.profile?.name ?? \"Unknown\";\n   ```\n````\n\n2. **Line 78**: Consider error handling\n   ```javascript\n   \u002F\u002F Add try-catch or .catch()\n   ```\n\n## 💡 Suggestions\n\n- Consider extracting the validation logic into a separate function\n- Add JSDoc comments for public methods\n\n## 🔒 Security Notes\n\n- No sensitive data exposure detected\n- API key handling looks correct\n\n````\n\n### 1.3 Focused Reviews\n\n```yaml\n# Review only specific file types\n- name: Filter code files\n  run: |\n    files=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD | \\\n            grep -E '\\.(ts|tsx|js|jsx|py|go)$' || true)\n    echo \"code_files=$files\" >> $GITHUB_OUTPUT\n\n# Review with context\n- name: AI Review with context\n  run: |\n    # Include relevant context files\n    context=\"\"\n    for file in ${{ steps.changed.outputs.files }}; do\n      if [[ -f \"$file\" ]]; then\n        context+=\"=== $file ===\\n$(cat $file)\\n\\n\"\n      fi\n    done\n\n    # Send to AI with full file context\n````\n\n---\n\n## 2. Issue Triage Automation\n\n### 2.1 Auto-label Issues\n\n```yaml\n# .github\u002Fworkflows\u002Fissue-triage.yml\nname: Issue Triage\n\non:\n  issues:\n    types: [opened]\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    permissions:\n      issues: write\n\n    steps:\n      - name: Analyze issue\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const issue = context.payload.issue;\n\n            \u002F\u002F Call AI to analyze\n            const analysis = await analyzeIssue(issue.title, issue.body);\n\n            \u002F\u002F Apply labels\n            const labels = [];\n\n            if (analysis.type === 'bug') {\n              labels.push('bug');\n              if (analysis.severity === 'high') labels.push('priority: high');\n            } else if (analysis.type === 'feature') {\n              labels.push('enhancement');\n            } else if (analysis.type === 'question') {\n              labels.push('question');\n            }\n\n            if (analysis.area) {\n              labels.push(`area: ${analysis.area}`);\n            }\n\n            await github.rest.issues.addLabels({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: issue.number,\n              labels: labels\n            });\n\n            \u002F\u002F Add initial response\n            if (analysis.type === 'bug' && !analysis.hasReproSteps) {\n              await github.rest.issues.createComment({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                issue_number: issue.number,\n                body: `Thanks for reporting this issue!\n\nTo help us investigate, could you please provide:\n- Steps to reproduce the issue\n- Expected behavior\n- Actual behavior\n- Environment (OS, version, etc.)\n\nThis will help us resolve your issue faster. 🙏`\n              });\n            }\n```\n\n### 2.2 Issue Analysis Prompt\n\n```typescript\nconst TRIAGE_PROMPT = `\nAnalyze this GitHub issue and classify it:\n\nTitle: {title}\nBody: {body}\n\nReturn JSON with:\n{\n  \"type\": \"bug\" | \"feature\" | \"question\" | \"docs\" | \"other\",\n  \"severity\": \"low\" | \"medium\" | \"high\" | \"critical\",\n  \"area\": \"frontend\" | \"backend\" | \"api\" | \"docs\" | \"ci\" | \"other\",\n  \"summary\": \"one-line summary\",\n  \"hasReproSteps\": boolean,\n  \"isFirstContribution\": boolean,\n  \"suggestedLabels\": [\"label1\", \"label2\"],\n  \"suggestedAssignees\": [\"username\"] \u002F\u002F based on area expertise\n}\n`;\n```\n\n### 2.3 Stale Issue Management\n\n```yaml\n# .github\u002Fworkflows\u002Fstale.yml\nname: Manage Stale Issues\n\non:\n  schedule:\n    - cron: \"0 0 * * *\" # Daily\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fstale@v9\n        with:\n          stale-issue-message: |\n            This issue has been automatically marked as stale because it has not had \n            recent activity. It will be closed in 14 days if no further activity occurs.\n\n            If this issue is still relevant:\n            - Add a comment with an update\n            - Remove the `stale` label\n\n            Thank you for your contributions! 🙏\n\n          stale-pr-message: |\n            This PR has been automatically marked as stale. Please update it or it \n            will be closed in 14 days.\n\n          days-before-stale: 60\n          days-before-close: 14\n          stale-issue-label: \"stale\"\n          stale-pr-label: \"stale\"\n          exempt-issue-labels: \"pinned,security,in-progress\"\n          exempt-pr-labels: \"pinned,security\"\n```\n\n---\n\n## 3. CI\u002FCD Integration\n\n### 3.1 Smart Test Selection\n\n```yaml\n# .github\u002Fworkflows\u002Fsmart-tests.yml\nname: Smart Test Selection\n\non:\n  pull_request:\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    outputs:\n      test_suites: ${{ steps.analyze.outputs.suites }}\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Analyze changes\n        id: analyze\n        run: |\n          # Get changed files\n          changed=$(git diff --name-only origin\u002F${{ github.base_ref }}...HEAD)\n\n          # Determine which test suites to run\n          suites=\"[]\"\n\n          if echo \"$changed\" | grep -q \"^src\u002Fapi\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"api\"]')\n          fi\n\n          if echo \"$changed\" | grep -q \"^src\u002Ffrontend\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"frontend\"]')\n          fi\n\n          if echo \"$changed\" | grep -q \"^src\u002Fdatabase\u002F\"; then\n            suites=$(echo $suites | jq '. + [\"database\", \"api\"]')\n          fi\n\n          # If nothing specific, run all\n          if [ \"$suites\" = \"[]\" ]; then\n            suites='[\"all\"]'\n          fi\n\n          echo \"suites=$suites\" >> $GITHUB_OUTPUT\n\n  test:\n    needs: analyze\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        suite: ${{ fromJson(needs.analyze.outputs.test_suites) }}\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run tests\n        run: |\n          if [ \"${{ matrix.suite }}\" = \"all\" ]; then\n            npm test\n          else\n            npm test -- --suite ${{ matrix.suite }}\n          fi\n```\n\n### 3.2 Deployment with AI Validation\n\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml\nname: Deploy with AI Validation\n\non:\n  push:\n    branches: [main]\n\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Get deployment changes\n        id: changes\n        run: |\n          # Get commits since last deployment\n          last_deploy=$(git describe --tags --abbrev=0 2>\u002Fdev\u002Fnull || echo \"\")\n          if [ -n \"$last_deploy\" ]; then\n            changes=$(git log --oneline $last_deploy..HEAD)\n          else\n            changes=$(git log --oneline -10)\n          fi\n          echo \"changes\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$changes\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: AI Risk Assessment\n        id: assess\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            \u002F\u002F Analyze changes for deployment risk\n            const prompt = `\n            Analyze these changes for deployment risk:\n\n            ${process.env.CHANGES}\n\n            Return JSON:\n            {\n              \"riskLevel\": \"low\" | \"medium\" | \"high\",\n              \"concerns\": [\"concern1\", \"concern2\"],\n              \"recommendations\": [\"rec1\", \"rec2\"],\n              \"requiresManualApproval\": boolean\n            }\n            `;\n\n            \u002F\u002F Call AI and parse response\n            const analysis = await callAI(prompt);\n\n            if (analysis.riskLevel === 'high') {\n              core.setFailed('High-risk deployment detected. Manual review required.');\n            }\n\n            return analysis;\n        env:\n          CHANGES: ${{ steps.changes.outputs.changes }}\n\n  deploy:\n    needs: validate\n    runs-on: ubuntu-latest\n    environment: production\n    steps:\n      - name: Deploy\n        run: |\n          echo \"Deploying to production...\"\n          # Deployment commands here\n```\n\n### 3.3 Rollback Automation\n\n```yaml\n# .github\u002Fworkflows\u002Frollback.yml\nname: Automated Rollback\n\non:\n  workflow_dispatch:\n    inputs:\n      reason:\n        description: \"Reason for rollback\"\n        required: true\n\njobs:\n  rollback:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Find last stable version\n        id: stable\n        run: |\n          # Find last successful deployment\n          stable=$(git tag -l 'v*' --sort=-version:refname | head -1)\n          echo \"version=$stable\" >> $GITHUB_OUTPUT\n\n      - name: Rollback\n        run: |\n          git checkout ${{ steps.stable.outputs.version }}\n          # Deploy stable version\n          npm run deploy\n\n      - name: Notify team\n        uses: slackapi\u002Fslack-github-action@v1\n        with:\n          payload: |\n            {\n              \"text\": \"🔄 Production rolled back to ${{ steps.stable.outputs.version }}\",\n              \"blocks\": [\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"mrkdwn\",\n                    \"text\": \"*Rollback executed*\\n• Version: `${{ steps.stable.outputs.version }}`\\n• Reason: ${{ inputs.reason }}\\n• Triggered by: ${{ github.actor }}\"\n                  }\n                }\n              ]\n            }\n```\n\n---\n\n## 4. Git Operations\n\n### 4.1 Automated Rebasing\n\n```yaml\n# .github\u002Fworkflows\u002Fauto-rebase.yml\nname: Auto Rebase\n\non:\n  issue_comment:\n    types: [created]\n\njobs:\n  rebase:\n    if: github.event.issue.pull_request && contains(github.event.comment.body, '\u002Frebase')\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Setup Git\n        run: |\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n\n      - name: Rebase PR\n        run: |\n          # Fetch PR branch\n          gh pr checkout ${{ github.event.issue.number }}\n\n          # Rebase onto main\n          git fetch origin main\n          git rebase origin\u002Fmain\n\n          # Force push\n          git push --force-with-lease\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Comment result\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number,\n              body: '✅ Successfully rebased onto main!'\n            })\n```\n\n### 4.2 Smart Cherry-Pick\n\n```typescript\n\u002F\u002F AI-assisted cherry-pick that handles conflicts\nasync function smartCherryPick(commitHash: string, targetBranch: string) {\n  \u002F\u002F Get commit info\n  const commitInfo = await exec(`git show ${commitHash} --stat`);\n\n  \u002F\u002F Check for potential conflicts\n  const targetDiff = await exec(\n    `git diff ${targetBranch}...HEAD -- ${affectedFiles}`\n  );\n\n  \u002F\u002F AI analysis\n  const analysis = await ai.analyze(`\n    I need to cherry-pick this commit to ${targetBranch}:\n    \n    ${commitInfo}\n    \n    Current state of affected files on ${targetBranch}:\n    ${targetDiff}\n    \n    Will there be conflicts? If so, suggest resolution strategy.\n  `);\n\n  if (analysis.willConflict) {\n    \u002F\u002F Create branch for manual resolution\n    await exec(\n      `git checkout -b cherry-pick-${commitHash.slice(0, 7)} ${targetBranch}`\n    );\n    const result = await exec(`git cherry-pick ${commitHash}`, {\n      allowFail: true,\n    });\n\n    if (result.failed) {\n      \u002F\u002F AI-assisted conflict resolution\n      const conflicts = await getConflicts();\n      for (const conflict of conflicts) {\n        const resolution = await ai.resolveConflict(conflict);\n        await applyResolution(conflict.file, resolution);\n      }\n    }\n  } else {\n    await exec(`git checkout ${targetBranch}`);\n    await exec(`git cherry-pick ${commitHash}`);\n  }\n}\n```\n\n### 4.3 Branch Cleanup\n\n```yaml\n# .github\u002Fworkflows\u002Fbranch-cleanup.yml\nname: Branch Cleanup\n\non:\n  schedule:\n    - cron: '0 0 * * 0'  # Weekly\n  workflow_dispatch:\n\njobs:\n  cleanup:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Find stale branches\n        id: stale\n        run: |\n          # Branches not updated in 30 days\n          stale=$(git for-each-ref --sort=-committerdate refs\u002Fremotes\u002Forigin \\\n            --format='%(refname:short) %(committerdate:relative)' | \\\n            grep -E '[3-9][0-9]+ days|[0-9]+ months|[0-9]+ years' | \\\n            grep -v 'origin\u002Fmain\\|origin\u002Fdevelop' | \\\n            cut -d' ' -f1 | sed 's|origin\u002F||')\n\n          echo \"branches\u003C\u003CEOF\" >> $GITHUB_OUTPUT\n          echo \"$stale\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n\n      - name: Create cleanup PR\n        if: steps.stale.outputs.branches != ''\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const branches = `${{ steps.stale.outputs.branches }}`.split('\\n').filter(Boolean);\n\n            const body = `## 🧹 Stale Branch Cleanup\n\nThe following branches haven't been updated in over 30 days:\n\n${branches.map(b => `- \\`${b}\\``).join('\\n')}\n\n### Actions:\n- [ ] Review each branch\n- [ ] Delete branches that are no longer needed\n- Comment \\`\u002Fkeep branch-name\\` to preserve specific branches\n`;\n\n            await github.rest.issues.create({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              title: 'Stale Branch Cleanup',\n              body: body,\n              labels: ['housekeeping']\n            });\n```\n\n---\n\n## 5. On-Demand Assistance\n\n### 5.1 @mention Bot\n\n```yaml\n# .github\u002Fworkflows\u002Fmention-bot.yml\nname: AI Mention Bot\n\non:\n  issue_comment:\n    types: [created]\n  pull_request_review_comment:\n    types: [created]\n\njobs:\n  respond:\n    if: contains(github.event.comment.body, '@ai-helper')\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Extract question\n        id: question\n        run: |\n          # Extract text after @ai-helper\n          question=$(echo \"${{ github.event.comment.body }}\" | sed 's\u002F.*@ai-helper\u002F\u002F')\n          echo \"question=$question\" >> $GITHUB_OUTPUT\n\n      - name: Get context\n        id: context\n        run: |\n          if [ \"${{ github.event.issue.pull_request }}\" != \"\" ]; then\n            # It's a PR - get diff\n            gh pr diff ${{ github.event.issue.number }} > context.txt\n          else\n            # It's an issue - get description\n            gh issue view ${{ github.event.issue.number }} --json body -q .body > context.txt\n          fi\n          echo \"context=$(cat context.txt)\" >> $GITHUB_OUTPUT\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: AI Response\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            const response = await ai.chat(`\n              Context: ${process.env.CONTEXT}\n              \n              Question: ${process.env.QUESTION}\n              \n              Provide a helpful, specific answer. Include code examples if relevant.\n            `);\n\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number,\n              body: response\n            });\n        env:\n          CONTEXT: ${{ steps.context.outputs.context }}\n          QUESTION: ${{ steps.question.outputs.question }}\n```\n\n### 5.2 Command Patterns\n\n```markdown\n## Available Commands\n\n| Command              | Description                 |\n| :------------------- | :-------------------------- |\n| `@ai-helper explain` | Explain the code in this PR |\n| `@ai-helper review`  | Request AI code review      |\n| `@ai-helper fix`     | Suggest fixes for issues    |\n| `@ai-helper test`    | Generate test cases         |\n| `@ai-helper docs`    | Generate documentation      |\n| `\u002Frebase`            | Rebase PR onto main         |\n| `\u002Fupdate`            | Update PR branch from main  |\n| `\u002Fapprove`           | Mark as approved by bot     |\n| `\u002Flabel bug`         | Add 'bug' label             |\n| `\u002Fassign @user`      | Assign to user              |\n```\n\n---\n\n## 6. Repository Configuration\n\n### 6.1 CODEOWNERS\n\n```\n# .github\u002FCODEOWNERS\n\n# Global owners\n* @org\u002Fcore-team\n\n# Frontend\n\u002Fsrc\u002Ffrontend\u002F @org\u002Ffrontend-team\n*.tsx @org\u002Ffrontend-team\n*.css @org\u002Ffrontend-team\n\n# Backend\n\u002Fsrc\u002Fapi\u002F @org\u002Fbackend-team\n\u002Fsrc\u002Fdatabase\u002F @org\u002Fbackend-team\n\n# Infrastructure\n\u002F.github\u002F @org\u002Fdevops-team\n\u002Fterraform\u002F @org\u002Fdevops-team\nDockerfile @org\u002Fdevops-team\n\n# Docs\n\u002Fdocs\u002F @org\u002Fdocs-team\n*.md @org\u002Fdocs-team\n\n# Security-sensitive\n\u002Fsrc\u002Fauth\u002F @org\u002Fsecurity-team\n\u002Fsrc\u002Fcrypto\u002F @org\u002Fsecurity-team\n```\n\n### 6.2 Branch Protection\n\n```yaml\n# Set up via GitHub API\n- name: Configure branch protection\n  uses: actions\u002Fgithub-script@v7\n  with:\n    script: |\n      await github.rest.repos.updateBranchProtection({\n        owner: context.repo.owner,\n        repo: context.repo.repo,\n        branch: 'main',\n        required_status_checks: {\n          strict: true,\n          contexts: ['test', 'lint', 'ai-review']\n        },\n        enforce_admins: true,\n        required_pull_request_reviews: {\n          required_approving_review_count: 1,\n          require_code_owner_reviews: true,\n          dismiss_stale_reviews: true\n        },\n        restrictions: null,\n        required_linear_history: true,\n        allow_force_pushes: false,\n        allow_deletions: false\n      });\n```\n\n---\n\n## Best Practices\n\n### Security\n\n- [ ] Store API keys in GitHub Secrets\n- [ ] Use minimal permissions in workflows\n- [ ] Validate all inputs\n- [ ] Don't expose sensitive data in logs\n\n### Performance\n\n- [ ] Cache dependencies\n- [ ] Use matrix builds for parallel testing\n- [ ] Skip unnecessary jobs with path filters\n- [ ] Use self-hosted runners for heavy workloads\n\n### Reliability\n\n- [ ] Add timeouts to jobs\n- [ ] Handle rate limits gracefully\n- [ ] Implement retry logic\n- [ ] Have rollback procedures\n\n---\n\n## Resources\n\n- [Gemini CLI GitHub Action](https:\u002F\u002Fgithub.com\u002Fgoogle-github-actions\u002Frun-gemini-cli)\n- [GitHub Actions Documentation](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions)\n- [GitHub REST API](https:\u002F\u002Fdocs.github.com\u002Fen\u002Frest)\n- [CODEOWNERS Syntax](https:\u002F\u002Fdocs.github.com\u002Fen\u002Frepositories\u002Fmanaging-your-repositorys-settings-and-features\u002Fcustomizing-your-repository\u002Fabout-code-owners)\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"date_added":26,"description":7},"critical","community","2026-02-27","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fgithub-workflow-automation",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill github-workflow-automation",{"tool":42,"command":43},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill github-workflow-automation",{"tool":45,"command":46},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill github-workflow-automation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fgithub-workflow-automation\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]