[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JEMRYRBA707CY0NPCYYAG2":3,"skill-same:01M6JEMRYRBA707CY0NPCYYAG2":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":66,"ownerHtmlUrl":67,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":68,"install":69,"resources":82},"01M6JEMRYRBA707CY0NPCYYAG2","github-pr-workflow",null,"GitHub PR lifecycle: branch, commit, open, CI, merge.","S3YED\u002Fappie-kit","S3YED","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62743867?v=4","01M6JBKBRRVP6KMS0VWZ27T3R6","01M6JBKBX0KG30284PW1DBYJT1",14,"MIT","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fmisc\u002Fgithub-pr-workflow\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"github","workflow","github pr","pr workflow","pr","github pr workflow","CI\u002FCD","review","branch","open","ci","pull","code-review","pull-requests","git","code","pr lifecycle","merge","commit","auth","2026-11-10 10:12:30",false,"---\nname: github-pr-workflow\ndescription: \"GitHub PR lifecycle: branch, commit, open, CI, merge.\"\nversion: 1.1.0\nauthor: Hermes Agent\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [GitHub, Pull-Requests, CI\u002FCD, Git, Automation, Merge]\n    related_skills: [github-auth, github-code-review]\n---\n\n# GitHub Pull Request Workflow\n\nComplete guide for managing the PR lifecycle. Each section shows the `gh` way first, then the `git` + `curl` fallback for machines without `gh`.\n\n## Prerequisites\n\n- Authenticated with GitHub (see `github-auth` skill)\n- Inside a git repository with a GitHub remote\n\n### Quick Auth Detection\n\n```bash\n# Determine which method to use throughout this workflow\nif command -v gh &>\u002Fdev\u002Fnull && gh auth status &>\u002Fdev\u002Fnull; then\n  AUTH=\"gh\"\nelse\n  AUTH=\"git\"\n  # Ensure we have a token for API calls\n  if [ -z \"$GITHUB_TOKEN\" ]; then\n    if [ -f ~\u002F.hermes\u002F.env ] && grep -q \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env; then\n      GITHUB_TOKEN=$(grep \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env | head -1 | cut -d= -f2 | tr -d '\\n\\r')\n    elif grep -q \"github.com\" ~\u002F.git-credentials 2>\u002Fdev\u002Fnull; then\n      GITHUB_TOKEN=$(grep \"github.com\" ~\u002F.git-credentials 2>\u002Fdev\u002Fnull | head -1 | sed 's|https:\u002F\u002F[^:]*:\\([^@]*\\)@.*|\\1|')\n    fi\n  fi\nfi\necho \"Using: $AUTH\"\n```\n\n### Extracting Owner\u002FRepo from the Git Remote\n\nMany `curl` commands need `owner\u002Frepo`. Extract it from the git remote:\n\n```bash\n# Works for both HTTPS and SSH remote URLs\nREMOTE_URL=$(git remote get-url origin)\nOWNER_REPO=$(echo \"$REMOTE_URL\" | sed -E 's|.*github\\.com[:\u002F]||; s|\\.git$||')\nOWNER=$(echo \"$OWNER_REPO\" | cut -d\u002F -f1)\nREPO=$(echo \"$OWNER_REPO\" | cut -d\u002F -f2)\necho \"Owner: $OWNER, Repo: $REPO\"\n```\n\n---\n\n## 1. Branch Creation\n\nThis part is pure `git` — identical either way:\n\n```bash\n# Make sure you're up to date\ngit fetch origin\ngit checkout main && git pull origin main\n\n# Create and switch to a new branch\ngit checkout -b feat\u002Fadd-user-authentication\n```\n\nBranch naming conventions:\n- `feat\u002Fdescription` — new features\n- `fix\u002Fdescription` — bug fixes\n- `refactor\u002Fdescription` — code restructuring\n- `docs\u002Fdescription` — documentation\n- `ci\u002Fdescription` — CI\u002FCD changes\n\n## 2. Making Commits\n\nUse the agent's file tools (`write_file`, `patch`) to make changes, then commit:\n\n```bash\n# Stage specific files\ngit add src\u002Fauth.py src\u002Fmodels\u002Fuser.py tests\u002Ftest_auth.py\n\n# Commit with a conventional commit message\ngit commit -m \"feat: add JWT-based user authentication\n\n- Add login\u002Fregister endpoints\n- Add User model with password hashing\n- Add auth middleware for protected routes\n- Add unit tests for auth flow\"\n```\n\nCommit message format (Conventional Commits):\n```\ntype(scope): short description\n\nLonger explanation if needed. Wrap at 72 characters.\n```\n\nTypes: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`, `perf`\n\n## 3. Pushing and Creating a PR\n\n### Push the Branch (same either way)\n\n```bash\ngit push -u origin HEAD\n```\n\n### Create the PR\n\n**With gh:**\n\n```bash\ngh pr create \\\n  --title \"feat: add JWT-based user authentication\" \\\n  --body \"## Summary\n- Adds login and register API endpoints\n- JWT token generation and validation\n\n## Test Plan\n- [ ] Unit tests pass\n\nCloses #42\"\n```\n\nOptions: `--draft`, `--reviewer user1,user2`, `--label \"enhancement\"`, `--base develop`\n\n**With git + curl:**\n\n```bash\nBRANCH=$(git branch --show-current)\n\ncurl -s -X POST \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  -H \"Accept: application\u002Fvnd.github.v3+json\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls \\\n  -d \"{\n    \\\"title\\\": \\\"feat: add JWT-based user authentication\\\",\n    \\\"body\\\": \\\"## Summary\\nAdds login and register API endpoints.\\n\\nCloses #42\\\",\n    \\\"head\\\": \\\"$BRANCH\\\",\n    \\\"base\\\": \\\"main\\\"\n  }\"\n```\n\nThe response JSON includes the PR `number` — save it for later commands.\n\nTo create as a draft, add `\"draft\": true` to the JSON body.\n\n## 4. Monitoring CI Status\n\n### Check CI Status\n\n**With gh:**\n\n```bash\n# One-shot check\ngh pr checks\n\n# Watch until all checks finish (polls every 10s)\ngh pr checks --watch\n```\n\n**With git + curl:**\n\n```bash\n# Get the latest commit SHA on the current branch\nSHA=$(git rev-parse HEAD)\n\n# Query the combined status\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fstatus \\\n  | python3 -c \"\nimport sys, json\ndata = json.load(sys.stdin)\nprint(f\\\"Overall: {data['state']}\\\")\nfor s in data.get('statuses', []):\n    print(f\\\"  {s['context']}: {s['state']} - {s.get('description', '')}\\\")\"\n\n# Also check GitHub Actions check runs (separate endpoint)\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fcheck-runs \\\n  | python3 -c \"\nimport sys, json\ndata = json.load(sys.stdin)\nfor cr in data.get('check_runs', []):\n    print(f\\\"  {cr['name']}: {cr['status']} \u002F {cr['conclusion'] or 'pending'}\\\")\"\n```\n\n### Poll Until Complete (git + curl)\n\n```bash\n# Simple polling loop — check every 30 seconds, up to 10 minutes\nSHA=$(git rev-parse HEAD)\nfor i in $(seq 1 20); do\n  STATUS=$(curl -s \\\n    -H \"Authorization: token $GITHUB_TOKEN\" \\\n    https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fstatus \\\n    | python3 -c \"import sys,json; print(json.load(sys.stdin)['state'])\")\n  echo \"Check $i: $STATUS\"\n  if [ \"$STATUS\" = \"success\" ] || [ \"$STATUS\" = \"failure\" ] || [ \"$STATUS\" = \"error\" ]; then\n    break\n  fi\n  sleep 30\ndone\n```\n\n## 5. Auto-Fixing CI Failures\n\nWhen CI fails, diagnose and fix. This loop works with either auth method.\n\n### Step 1: Get Failure Details\n\n**With gh:**\n\n```bash\n# List recent workflow runs on this branch\ngh run list --branch $(git branch --show-current) --limit 5\n\n# View failed logs\ngh run view \u003CRUN_ID> --log-failed\n```\n\n**With git + curl:**\n\n```bash\nBRANCH=$(git branch --show-current)\n\n# List workflow runs on this branch\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Factions\u002Fruns?branch=$BRANCH&per_page=5\" \\\n  | python3 -c \"\nimport sys, json\nruns = json.load(sys.stdin)['workflow_runs']\nfor r in runs:\n    print(f\\\"Run {r['id']}: {r['name']} - {r['conclusion'] or r['status']}\\\")\"\n\n# Get failed job logs (download as zip, extract, read)\nRUN_ID=\u003Crun_id>\ncurl -s -L \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Factions\u002Fruns\u002F$RUN_ID\u002Flogs \\\n  -o \u002Ftmp\u002Fci-logs.zip\ncd \u002Ftmp && unzip -o ci-logs.zip -d ci-logs && cat ci-logs\u002F*.txt\n```\n\n### Step 2: Fix and Push\n\nAfter identifying the issue, use file tools (`patch`, `write_file`) to fix it:\n\n```bash\ngit add \u003Cfixed_files>\ngit commit -m \"fix: resolve CI failure in \u003Ccheck_name>\"\ngit push\n```\n\n### Step 3: Verify\n\nRe-check CI status using the commands from Section 4 above.\n\n### Auto-Fix Loop Pattern\n\nWhen asked to auto-fix CI, follow this loop:\n\n1. Check CI status → identify failures\n2. Read failure logs → understand the error\n3. Use `read_file` + `patch`\u002F`write_file` → fix the code\n4. `git add . && git commit -m \"fix: ...\" && git push`\n5. Wait for CI → re-check status\n6. Repeat if still failing (up to 3 attempts, then ask the user)\n\n## 6. Merging\n\n**With gh:**\n\n```bash\n# Squash merge + delete branch (cleanest for feature branches)\ngh pr merge --squash --delete-branch\n\n# Enable auto-merge (merges when all checks pass)\ngh pr merge --auto --squash --delete-branch\n```\n\n**With git + curl:**\n\n```bash\nPR_NUMBER=\u003Cnumber>\n\n# Merge the PR via API (squash)\ncurl -s -X PUT \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls\u002F$PR_NUMBER\u002Fmerge \\\n  -d \"{\n    \\\"merge_method\\\": \\\"squash\\\",\n    \\\"commit_title\\\": \\\"feat: add user authentication (#$PR_NUMBER)\\\"\n  }\"\n\n# Delete the remote branch after merge\nBRANCH=$(git branch --show-current)\ngit push origin --delete $BRANCH\n\n# Switch back to main locally\ngit checkout main && git pull origin main\ngit branch -d $BRANCH\n```\n\nMerge methods: `\"merge\"` (merge commit), `\"squash\"`, `\"rebase\"`\n\n### Enable Auto-Merge (curl)\n\n```bash\n# Auto-merge requires the repo to have it enabled in settings.\n# This uses the GraphQL API since REST doesn't support auto-merge.\nPR_NODE_ID=$(curl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls\u002F$PR_NUMBER \\\n  | python3 -c \"import sys,json; print(json.load(sys.stdin)['node_id'])\")\n\ncurl -s -X POST \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Fgraphql \\\n  -d \"{\\\"query\\\": \\\"mutation { enablePullRequestAutoMerge(input: {pullRequestId: \\\\\\\"$PR_NODE_ID\\\\\\\", mergeMethod: SQUASH}) { clientMutationId } }\\\"}\"\n```\n\n## 7. Complete Workflow Example\n\n```bash\n# 1. Start from clean main\ngit checkout main && git pull origin main\n\n# 2. Branch\ngit checkout -b fix\u002Flogin-redirect-bug\n\n# 3. (Agent makes code changes with file tools)\n\n# 4. Commit\ngit add src\u002Fauth\u002Flogin.py tests\u002Ftest_login.py\ngit commit -m \"fix: correct redirect URL after login\n\nPreserves the ?next= parameter instead of always redirecting to \u002Fdashboard.\"\n\n# 5. Push\ngit push -u origin HEAD\n\n# 6. Create PR (picks gh or curl based on what's available)\n# ... (see Section 3)\n\n# 7. Monitor CI (see Section 4)\n\n# 8. Merge when green (see Section 6)\n```\n\n## Useful PR Commands Reference\n\n| Action | gh | git + curl |\n|--------|-----|-----------|\n| List my PRs | `gh pr list --author @me` | `curl -s -H \"Authorization: token $GITHUB_TOKEN\" \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls?state=open\"` |\n| View PR diff | `gh pr diff` | `git diff main...HEAD` (local) or `curl -H \"Accept: application\u002Fvnd.github.diff\" ...` |\n| Add comment | `gh pr comment N --body \"...\"` | `curl -X POST ...\u002Fissues\u002FN\u002Fcomments -d '{\"body\":\"...\"}'` |\n| Request review | `gh pr edit N --add-reviewer user` | `curl -X POST ...\u002Fpulls\u002FN\u002Frequested_reviewers -d '{\"reviewers\":[\"user\"]}'` |\n| Close PR | `gh pr close N` | `curl -X PATCH ...\u002Fpulls\u002FN -d '{\"state\":\"closed\"}'` |\n| Check out someone's PR | `gh pr checkout N` | `git fetch origin pull\u002FN\u002Fhead:pr-N && git checkout pr-N` |\n","# GitHub Pull Request Workflow\n\nComplete guide for managing the PR lifecycle. Each section shows the `gh` way first, then the `git` + `curl` fallback for machines without `gh`.\n\n## Prerequisites\n\n- Authenticated with GitHub (see `github-auth` skill)\n- Inside a git repository with a GitHub remote\n\n### Quick Auth Detection\n\n```bash\n# Determine which method to use throughout this workflow\nif command -v gh &>\u002Fdev\u002Fnull && gh auth status &>\u002Fdev\u002Fnull; then\n  AUTH=\"gh\"\nelse\n  AUTH=\"git\"\n  # Ensure we have a token for API calls\n  if [ -z \"$GITHUB_TOKEN\" ]; then\n    if [ -f ~\u002F.hermes\u002F.env ] && grep -q \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env; then\n      GITHUB_TOKEN=$(grep \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env | head -1 | cut -d= -f2 | tr -d '\\n\\r')\n    elif grep -q \"github.com\" ~\u002F.git-credentials 2>\u002Fdev\u002Fnull; then\n      GITHUB_TOKEN=$(grep \"github.com\" ~\u002F.git-credentials 2>\u002Fdev\u002Fnull | head -1 | sed 's|https:\u002F\u002F[^:]*:\\([^@]*\\)@.*|\\1|')\n    fi\n  fi\nfi\necho \"Using: $AUTH\"\n```\n\n### Extracting Owner\u002FRepo from the Git Remote\n\nMany `curl` commands need `owner\u002Frepo`. Extract it from the git remote:\n\n```bash\n# Works for both HTTPS and SSH remote URLs\nREMOTE_URL=$(git remote get-url origin)\nOWNER_REPO=$(echo \"$REMOTE_URL\" | sed -E 's|.*github\\.com[:\u002F]||; s|\\.git$||')\nOWNER=$(echo \"$OWNER_REPO\" | cut -d\u002F -f1)\nREPO=$(echo \"$OWNER_REPO\" | cut -d\u002F -f2)\necho \"Owner: $OWNER, Repo: $REPO\"\n```\n\n---\n\n## 1. Branch Creation\n\nThis part is pure `git` — identical either way:\n\n```bash\n# Make sure you're up to date\ngit fetch origin\ngit checkout main && git pull origin main\n\n# Create and switch to a new branch\ngit checkout -b feat\u002Fadd-user-authentication\n```\n\nBranch naming conventions:\n- `feat\u002Fdescription` — new features\n- `fix\u002Fdescription` — bug fixes\n- `refactor\u002Fdescription` — code restructuring\n- `docs\u002Fdescription` — documentation\n- `ci\u002Fdescription` — CI\u002FCD changes\n\n## 2. Making Commits\n\nUse the agent's file tools (`write_file`, `patch`) to make changes, then commit:\n\n```bash\n# Stage specific files\ngit add src\u002Fauth.py src\u002Fmodels\u002Fuser.py tests\u002Ftest_auth.py\n\n# Commit with a conventional commit message\ngit commit -m \"feat: add JWT-based user authentication\n\n- Add login\u002Fregister endpoints\n- Add User model with password hashing\n- Add auth middleware for protected routes\n- Add unit tests for auth flow\"\n```\n\nCommit message format (Conventional Commits):\n```\ntype(scope): short description\n\nLonger explanation if needed. Wrap at 72 characters.\n```\n\nTypes: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`, `perf`\n\n## 3. Pushing and Creating a PR\n\n### Push the Branch (same either way)\n\n```bash\ngit push -u origin HEAD\n```\n\n### Create the PR\n\n**With gh:**\n\n```bash\ngh pr create \\\n  --title \"feat: add JWT-based user authentication\" \\\n  --body \"## Summary\n- Adds login and register API endpoints\n- JWT token generation and validation\n\n## Test Plan\n- [ ] Unit tests pass\n\nCloses #42\"\n```\n\nOptions: `--draft`, `--reviewer user1,user2`, `--label \"enhancement\"`, `--base develop`\n\n**With git + curl:**\n\n```bash\nBRANCH=$(git branch --show-current)\n\ncurl -s -X POST \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  -H \"Accept: application\u002Fvnd.github.v3+json\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls \\\n  -d \"{\n    \\\"title\\\": \\\"feat: add JWT-based user authentication\\\",\n    \\\"body\\\": \\\"## Summary\\nAdds login and register API endpoints.\\n\\nCloses #42\\\",\n    \\\"head\\\": \\\"$BRANCH\\\",\n    \\\"base\\\": \\\"main\\\"\n  }\"\n```\n\nThe response JSON includes the PR `number` — save it for later commands.\n\nTo create as a draft, add `\"draft\": true` to the JSON body.\n\n## 4. Monitoring CI Status\n\n### Check CI Status\n\n**With gh:**\n\n```bash\n# One-shot check\ngh pr checks\n\n# Watch until all checks finish (polls every 10s)\ngh pr checks --watch\n```\n\n**With git + curl:**\n\n```bash\n# Get the latest commit SHA on the current branch\nSHA=$(git rev-parse HEAD)\n\n# Query the combined status\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fstatus \\\n  | python3 -c \"\nimport sys, json\ndata = json.load(sys.stdin)\nprint(f\\\"Overall: {data['state']}\\\")\nfor s in data.get('statuses', []):\n    print(f\\\"  {s['context']}: {s['state']} - {s.get('description', '')}\\\")\"\n\n# Also check GitHub Actions check runs (separate endpoint)\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fcheck-runs \\\n  | python3 -c \"\nimport sys, json\ndata = json.load(sys.stdin)\nfor cr in data.get('check_runs', []):\n    print(f\\\"  {cr['name']}: {cr['status']} \u002F {cr['conclusion'] or 'pending'}\\\")\"\n```\n\n### Poll Until Complete (git + curl)\n\n```bash\n# Simple polling loop — check every 30 seconds, up to 10 minutes\nSHA=$(git rev-parse HEAD)\nfor i in $(seq 1 20); do\n  STATUS=$(curl -s \\\n    -H \"Authorization: token $GITHUB_TOKEN\" \\\n    https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fcommits\u002F$SHA\u002Fstatus \\\n    | python3 -c \"import sys,json; print(json.load(sys.stdin)['state'])\")\n  echo \"Check $i: $STATUS\"\n  if [ \"$STATUS\" = \"success\" ] || [ \"$STATUS\" = \"failure\" ] || [ \"$STATUS\" = \"error\" ]; then\n    break\n  fi\n  sleep 30\ndone\n```\n\n## 5. Auto-Fixing CI Failures\n\nWhen CI fails, diagnose and fix. This loop works with either auth method.\n\n### Step 1: Get Failure Details\n\n**With gh:**\n\n```bash\n# List recent workflow runs on this branch\ngh run list --branch $(git branch --show-current) --limit 5\n\n# View failed logs\ngh run view \u003CRUN_ID> --log-failed\n```\n\n**With git + curl:**\n\n```bash\nBRANCH=$(git branch --show-current)\n\n# List workflow runs on this branch\ncurl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Factions\u002Fruns?branch=$BRANCH&per_page=5\" \\\n  | python3 -c \"\nimport sys, json\nruns = json.load(sys.stdin)['workflow_runs']\nfor r in runs:\n    print(f\\\"Run {r['id']}: {r['name']} - {r['conclusion'] or r['status']}\\\")\"\n\n# Get failed job logs (download as zip, extract, read)\nRUN_ID=\u003Crun_id>\ncurl -s -L \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Factions\u002Fruns\u002F$RUN_ID\u002Flogs \\\n  -o \u002Ftmp\u002Fci-logs.zip\ncd \u002Ftmp && unzip -o ci-logs.zip -d ci-logs && cat ci-logs\u002F*.txt\n```\n\n### Step 2: Fix and Push\n\nAfter identifying the issue, use file tools (`patch`, `write_file`) to fix it:\n\n```bash\ngit add \u003Cfixed_files>\ngit commit -m \"fix: resolve CI failure in \u003Ccheck_name>\"\ngit push\n```\n\n### Step 3: Verify\n\nRe-check CI status using the commands from Section 4 above.\n\n### Auto-Fix Loop Pattern\n\nWhen asked to auto-fix CI, follow this loop:\n\n1. Check CI status → identify failures\n2. Read failure logs → understand the error\n3. Use `read_file` + `patch`\u002F`write_file` → fix the code\n4. `git add . && git commit -m \"fix: ...\" && git push`\n5. Wait for CI → re-check status\n6. Repeat if still failing (up to 3 attempts, then ask the user)\n\n## 6. Merging\n\n**With gh:**\n\n```bash\n# Squash merge + delete branch (cleanest for feature branches)\ngh pr merge --squash --delete-branch\n\n# Enable auto-merge (merges when all checks pass)\ngh pr merge --auto --squash --delete-branch\n```\n\n**With git + curl:**\n\n```bash\nPR_NUMBER=\u003Cnumber>\n\n# Merge the PR via API (squash)\ncurl -s -X PUT \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls\u002F$PR_NUMBER\u002Fmerge \\\n  -d \"{\n    \\\"merge_method\\\": \\\"squash\\\",\n    \\\"commit_title\\\": \\\"feat: add user authentication (#$PR_NUMBER)\\\"\n  }\"\n\n# Delete the remote branch after merge\nBRANCH=$(git branch --show-current)\ngit push origin --delete $BRANCH\n\n# Switch back to main locally\ngit checkout main && git pull origin main\ngit branch -d $BRANCH\n```\n\nMerge methods: `\"merge\"` (merge commit), `\"squash\"`, `\"rebase\"`\n\n### Enable Auto-Merge (curl)\n\n```bash\n# Auto-merge requires the repo to have it enabled in settings.\n# This uses the GraphQL API since REST doesn't support auto-merge.\nPR_NODE_ID=$(curl -s \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls\u002F$PR_NUMBER \\\n  | python3 -c \"import sys,json; print(json.load(sys.stdin)['node_id'])\")\n\ncurl -s -X POST \\\n  -H \"Authorization: token $GITHUB_TOKEN\" \\\n  https:\u002F\u002Fapi.github.com\u002Fgraphql \\\n  -d \"{\\\"query\\\": \\\"mutation { enablePullRequestAutoMerge(input: {pullRequestId: \\\\\\\"$PR_NODE_ID\\\\\\\", mergeMethod: SQUASH}) { clientMutationId } }\\\"}\"\n```\n\n## 7. Complete Workflow Example\n\n```bash\n# 1. Start from clean main\ngit checkout main && git pull origin main\n\n# 2. Branch\ngit checkout -b fix\u002Flogin-redirect-bug\n\n# 3. (Agent makes code changes with file tools)\n\n# 4. Commit\ngit add src\u002Fauth\u002Flogin.py tests\u002Ftest_login.py\ngit commit -m \"fix: correct redirect URL after login\n\nPreserves the ?next= parameter instead of always redirecting to \u002Fdashboard.\"\n\n# 5. Push\ngit push -u origin HEAD\n\n# 6. Create PR (picks gh or curl based on what's available)\n# ... (see Section 3)\n\n# 7. Monitor CI (see Section 4)\n\n# 8. Merge when green (see Section 6)\n```\n\n## Useful PR Commands Reference\n\n| Action | gh | git + curl |\n|--------|-----|-----------|\n| List my PRs | `gh pr list --author @me` | `curl -s -H \"Authorization: token $GITHUB_TOKEN\" \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F$OWNER\u002F$REPO\u002Fpulls?state=open\"` |\n| View PR diff | `gh pr diff` | `git diff main...HEAD` (local) or `curl -H \"Accept: application\u002Fvnd.github.diff\" ...` |\n| Add comment | `gh pr comment N --body \"...\"` | `curl -X POST ...\u002Fissues\u002FN\u002Fcomments -d '{\"body\":\"...\"}'` |\n| Request review | `gh pr edit N --add-reviewer user` | `curl -X POST ...\u002Fpulls\u002FN\u002Frequested_reviewers -d '{\"reviewers\":[\"user\"]}'` |\n| Close PR | `gh pr close N` | `curl -X PATCH ...\u002Fpulls\u002FN -d '{\"state\":\"closed\"}'` |\n| Check out someone's PR | `gh pr checkout N` | `git fetch origin pull\u002FN\u002Fhead:pr-N && git checkout pr-N` |\n",{"name":5,"author":48,"license":14,"version":49,"metadata":50,"description":7},"Hermes Agent","1.1.0",{"hermes":51},{"tags":52,"related_skills":58},[53,54,29,55,56,57],"GitHub","Pull-Requests","Git","Automation","Merge",[59,60],"github-auth","github-code-review","master","8ec37df6d71fb664ea19d32c079e7d3ff931a8e0","skills\u002Fmisc\u002Fgithub-pr-workflow",3,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit","https:\u002F\u002Fweblyfe.ai","https:\u002F\u002Fgithub.com\u002FS3YED","2026-08-27 01:54:02",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add S3YED\u002Fappie-kit --skill github-pr-workflow",{"tool":75,"command":76},"bunx","bunx skills add S3YED\u002Fappie-kit --skill github-pr-workflow",{"tool":78,"command":79},"pnpm","pnpm dlx skills add S3YED\u002Fappie-kit --skill github-pr-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fmisc\u002Fgithub-pr-workflow\u002FSKILL.md",true,[],[84,116,151,176,207,228],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":97,"publishedAt":43},"01M6JFD4M6N4DSGC7TXEJ5R3J2","ai-music","AI music generation and audio tools: HeartMuLa lyrics-to-music generation, songwriting craft (+ Suno prompts), and audio spectrogram\u002Ffeature visualization.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fwethlete\u002Fai-music\u002FSKILL.md",[90,93,96],{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000013","分析与可视化",{"categoryNo":94,"categoryName":95,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"music","ai music","humanizer","visualization","Tools","Audio","hermes","hermes agent","songwriting","suno","lyrics","prompts","heartmula","craft","generation","feature","ai music generation","music generation",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":130,"publishedAt":43},"01M6JFCZE4XNFQFMNZDHKHT5V5","agentic-webdesign-design-system-ingestion","Use v0 Design Systems 2.0, Bolt Design System Agents, or Lovable to generate production UI from a client's real design system components — not generic Tailwind. Use when building a client website where brand consistency matters.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-design-system-ingestion\u002FSKILL.md",[122,125],{"categoryNo":123,"categoryName":124,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],"design","agentic","design system","system","ingestion","webdesign","agentic webdesign design system ingestion","components","generate","design systems","website","ui","Tailwind","bolt","lovable","v0","design-system","wed","design system components","appie",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":159,"publishedAt":43},"01M6JFCVPX3913CFAS6QQJ33ZB","agentic-webdesign-agent-elements","Use 21st.dev Agent Elements — 25 shadcn\u002Fui components purpose-built for AI agent UIs. Tool cards (Bash, Edit, Search, Plan, Subagent, MCP), chat, input, streaming. Open source, shadcn-registry install, no runtime lock-in.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-agent-elements\u002FSKILL.md",[157,158],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},[132,160,136,161,162,163,138,164,165,166,167,32,168,169,170,171,172,173,174,175],"elements","agentic webdesign agent elements","MCP","ai agent","registry","search","streaming","open source","Bash","plan","subagent","edit","install","input","lock","source",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":186,"publishedAt":43},"01M6JFCQC7H65M9QJ6TRE71BS1","vercel-deployment","Deploy static sites and frontends to Vercel — handles both CLI and REST API paths, including the CLI token sanitization workaround.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fvercel-deployment\u002FSKILL.md",[182,185],{"categoryNo":183,"categoryName":184,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206],"deployment","vercel deployment","vercel","macos","cli","linux","windows","deploy","vercel deploy","REST","api","site","deploy to vercel","token","rest api","host","sites","paths","sanitization","static site",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":214,"publishedAt":43},"01M6JFCM4SMTXBM5A01BK2YQG1","software-quality-workflows","Umbrella workflow for TDD, debugging, code simplification, spikes, pre-commit review, and debugger-assisted investigation.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fsoftware-quality-workflows\u002FSKILL.md",[213],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[215,216,217,218,30,219,24,41,220,38,221,222,223,224,225,226,227],"workflows","quality","software","software quality workflows","tdd","debugging","debugger","pre-commit","investigation","code simplification","user","simplification","for",{"skillNo":229,"name":230,"nameZh":6,"description":231,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":232,"categories":233,"keywords":241,"publishedAt":43},"01M6JFCGD0M6CEATY01W7YN6DB","react-component-refactoring","Safely refactor large React components into smaller, maintainable pieces using proven patterns","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Freact-component-refactoring\u002FSKILL.md",[234,237,240],{"categoryNo":235,"categoryName":236,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":238,"categoryName":239,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[242,243,244,245,246,247,248,249,190,250,251,138,252,193,253,38,254,255,256,257],"react","component","refactoring","component refactoring","react component","react component refactoring","frontend","writing","safe","typescript","react components","modular","refactor","simplify","patterns","test-driven-development"]