Token导航 LogoToken导航

Agent Skill · 研究检索

github-sync(GitHub sync 搜索)

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

github-sync 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 61,129。

总安装 356周安装 15GitHub Stars 8下载 125核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:github-sync(GitHub sync 搜索)
来源仓库:https://github.com/bmad-labs/skills
仓库路径:skills/github-sync
安装命令:
npx skills add https://github.com/bmad-labs/skills --skill github-sync
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bmad-labs/skills --skill github-sync

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于在BMAD规划工件与GitHub Projects v2之间建立双向同步机制。适用于需要将epics、stories等markdown文件与GitHub项目跟踪集成的场景。支持通过gh CLI命令和GraphQL查询进行快速导航和操作。严格遵循四条规则,特别是禁止自动同步,所有变更操作都需要人工确认。

涉及Issue创建、字段更新等写入操作时必须验证token权限和仓库范围。

来源仓库内路径:skills/github-sync

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bmad-labs/skills --skill github-sync;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

github-sync 怎么安装?

在终端执行 npx skills add https://github.com/bmad-labs/skills --skill github-sync。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

github-sync 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

github-sync 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

github-sync 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

github-sync 用的人多吗?

公开数据是累计安装 356 次,近一周安装 15 次,下载 125 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

github-sync 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
github-sync

GitHub sync 搜索 · 本页

3568需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

GitHub Sync — BMAD to GitHub Projects v2

Bidirectional sync between BMAD planning artifacts (epics, stories, sprint plan) stored as markdown files and GitHub Projects v2 for visual project tracking.

Quick navigation - gh CLI commands, GraphQL queries → references/gh-commands.md - Issue body template, field mapping, labels, milestones → references/content-mapping.md - Config file format → references/config-schema.md - Artifact parser script → scripts/parse-artifacts.py

Four Rules (Never Break These)

  1. Never sync automatically. Every mutating operation (create issues, update fields, modify files) requires generating a sync report first, presenting it to the user, and waiting for explicit approval before executing. The user must see exactly what will change.
  2. Field-level source of truth. Each field has one owner — either BMAD files or GitHub. During sync, the owner side always wins. Never overwrite the owner's data.

- BMAD owns: story body, acceptance criteria, tasks, sprint assignment, epic grouping, dependencies - GitHub owns: status, dev assignment, task checkbox completion, story points, priority

  1. Idempotent operations. Running the same sync twice produces the same result. Link-back identifiers (H1 title links in story files, gh_item_url in planning frontmatter) prevent duplicate creation. Always check for existing sync state before creating.
  2. Never auto-parse issue bodies with a script. Issue body generation requires reading each story file directly with the Read tool and crafting the body manually following the template in references/content-mapping.md. Auto-parsing scripts fail silently in subtle ways: they strip task lists when formatting assumptions are wrong, gut dev notes by removing code blocks, and produce empty section headers. One bad push contaminates all 27 issues at once. Read the file. Write the body. No shortcuts.

Flow Detection

User SaysWorkflowConfig Required?
"set up github project", "onboard", "initialize github"OnboardingNo (creates config)
"push to github", "sync push", "create issues"PushYes
"pull from github", "sync pull", "update from github"PullYes
"sync status", "what's out of sync"Status CheckYes

If no .github-sync.yaml exists at project root, always route to Onboarding first.


Prerequisite Check (Run Before Every Workflow)

Before any workflow, verify these in order. Stop at first failure.

Step 1: gh --version
        → If missing: "Install GitHub CLI: https://cli.github.com/"

Step 2: gh auth status
        → If not authenticated: "Run: gh auth login"

Step 3: gh auth status (check for "project" in scopes)
        → If missing: "Run: gh auth refresh -s project"

Step 4: (For push/pull/status only) Check .github-sync.yaml exists
        → If missing: "Run onboarding first: say 'set up github project'"

Onboarding Workflow

This is the first-time setup. It creates or connects to a GitHub Project, creates custom fields, labels, and phase-based milestones.

Step 1: Detect BMAD Artifacts

Run the parser to discover what exists:

python3 .agents/skills/github-sync/scripts/parse-artifacts.py --mode scan \
  --stories-dir .artifacts/implementation-artifacts

Also check that these files exist:

  • .artifacts/planning-artifacts/epics.md
  • .artifacts/planning-artifacts/sprint-plan.md
Note: The artifacts path .artifacts/ may differ per project. Check the actual directory structure — some projects use _bmad-output/. Confirm the correct paths with the user and use them throughout. Update paths.* in the config accordingly.

Report the count: "Found N story files, M epics, K sprints."

Step 2: Gather GitHub Details

Auto-detect the current repo:

gh repo view --json owner,name --jq '.owner.login + "/" + .name'

List existing projects and ask the user whether to use one or create new:

gh project list --owner {owner} --format json

Present detected owner/repo and existing projects. Ask for confirmation before proceeding.

Step 3: Parse Epic and Sprint Data

Read references/content-mapping.md now — sections 7 (Label Scheme), 8 (Milestone Scheme), and 12 (Epic Derivation). You need these to build an accurate onboarding report.

Then parse the actual artifacts:

python3 .agents/skills/github-sync/scripts/parse-artifacts.py --mode epics \
  --file .artifacts/planning-artifacts/epics.md

python3 .agents/skills/github-sync/scripts/parse-artifacts.py --mode sprints \
  --file .artifacts/planning-artifacts/sprint-plan.md

Step 4: Generate Onboarding Report

Present a report showing everything that WILL be created:

=== GITHUB SYNC — ONBOARDING REPORT ===

Repository: {owner}/{repo}
Project: #{N} "{title}" (existing) OR new project "{title}"

Will create/verify:
  Custom fields (7):
    - Story ID      (TEXT)
    - Epic          (SINGLE_SELECT: 12 options, rainbow colors)
    - Sprint        (SINGLE_SELECT: Sprint 01–12, rainbow colors + sprint goal descriptions)
    - Dev           (SINGLE_SELECT: All, Dev 1, Dev 2, Dev 3, Dev 1+2)
    - Sprint Start  (DATE)
    - Sprint End    (DATE)
    - Story Points  (NUMBER)
  Built-in fields to set:
    - Start date    (DATE, pre-existing)   ← same dates as Sprint Start
    - Target date   (DATE, pre-existing)   ← same dates as Sprint End
    - Status        (single-select, pre-existing)
  {N} labels:
    - Epic labels (one per epic, e.g., epic:1-foundation ... epic:12-testing)
    - Phase labels (e.g., phase:poc, phase:hardening)
    - Layer labels (optional, project-specific architecture layers)
  {K} milestones (phase-based, NOT per-sprint):
    - PoC              (due: {sprint_6_end})    Sprints 1–6
    - Production Hardening (due: {sprint_12_end}) Sprints 7–12

Note: No "Phase" custom field — the milestone covers phase membership.

Proceed with onboarding? [Y/N]

HALT HERE. Wait for user approval.

Step 5: Execute Setup

Read references/gh-commands.md now — you need the exact commands for every operation below.

If approved, execute in this order:

  1. Create or connect GitHub Project (section 2) — if using existing, just get its node ID
  2. Create custom fields (section 3) — Story ID, Epic, Sprint, Dev, Sprint Start, Sprint End, Story Points
  3. Query all field IDs (section 4) — including the pre-existing Start date, Target date, Status fields
  4. Apply rainbow colors + sprint goal descriptions to Sprint and Epic fields (section 13)

- Sprint options: cycle RED→ORANGE→YELLOW→GREEN→BLUE→PURPLE→PINK, repeat - Sprint description = sprint objective from sprint-plan.md - Epic options: RED→ORANGE→YELLOW→GREEN→BLUE→PURPLE→PINK→RED→ORANGE→YELLOW→GREEN→BLUE

  1. Create labels (section 5) — 17 labels total
  2. Create phase-based milestones (section 6) — PoC and Production Hardening
Critical: After calling updateProjectV2Field to set colors/descriptions, the single-select option IDs CHANGE (the mutation replaces the options list). Always re-query option IDs after calling this mutation and use the new IDs in the config.

Step 6: Write Config

Read references/config-schema.md now — you need the exact YAML format.

Create .github-sync.yaml at project root with all populated IDs following that schema. Note: No phase field in field_ids or option_ids — Phase was replaced by milestones.

Step 7: Report Completion

Onboarding complete!
  Project: https://github.com/orgs/{owner}/projects/{number}
  Config: .github-sync.yaml

Next: Run "push stories to github" to create issues.

Push Workflow (Files → GitHub)

Pushes BMAD story files to GitHub as issues, adds them to the project, sets all fields, sets date fields, and establishes relationships.

Step 1: Load Config

Read .github-sync.yaml. Verify all field IDs are populated. If any are empty, re-query field IDs from GitHub (the IDs may have been lost).

Step 2: Scan Stories

python3 .agents/skills/github-sync/scripts/parse-artifacts.py --mode scan \
  --stories-dir .artifacts/implementation-artifacts

For each story, determine create vs edit mode:

  • H1 is plain # Story X.X: Title (no link) → CREATE
  • H1 contains # [Story X.X: Title](url) → UPDATE (already synced)

Step 3: Handle Partial Sync (Optional)

If the user specified a filter (e.g., "push stories 1.1 1.2", "push epic 1", "push sprint 2"), filter the story list before proceeding. If no filter, push all stories.

Step 4: Read Story Files and Build Issue Content

⚠️ Rule 4 applies here: Read each file with the Read tool. Build bodies manually. No scripts.

For each story:

  1. Read the file using the Read tool
  2. Read references/content-mapping.md — sections 1–4 and 9 for the exact format
  3. Build the issue body following the template:

- User story blockquote - AC as one-line Then-clause summaries (checkboxes) - Full task list (Task 2+ only — exclude agent-only tasks by reading content, not by position) - Dependencies with #N GitHub issue numbers - Collapsible dev notes: tables, config snippets, architecture patterns — NOT code skeletons, NOT ASCII trees, NOT "What NOT to Do" lists, NOT references

  1. Look up sprint/dev/epic from sprint-plan.md (NOT from the story file body)

Step 5: Generate Sync Report

=== GITHUB SYNC — PUSH REPORT ===
Generated: {timestamp}

--- CREATES ({count} new issues) ---

  [CREATE] {story_id} {short_title}
           File: {story_file_path}
           Epic: {epic_label} | Sprint: {sprint} | Dev: {dev} | Phase: {phase}
           Labels: epic:{N}-{name}, phase:{phase}
           Milestone: {PoC | Production Hardening}

--- UPDATES ({count} existing issues) ---

  [UPDATE] {story_id} {short_title} (#{issue_number})
           Changes: body updated

--- SKIPPED ({count} items) ---

  [SKIP] {story_id} {short_title} — already synced, no local changes

--- SUMMARY ---
Creates: {N} | Updates: {N} | Skips: {N}

Proceed? [Y/N]

HALT HERE. Wait for user approval.

Step 6: Execute Push

If approved, for each CREATE:

  1. Write issue body to a temp file (/tmp/issue-{story_id}.md)
  2. gh issue create --title "..." --body-file /tmp/... --label "epic:X-name" --label "phase:poc" --milestone "{PoC|Production Hardening}"
  3. Extract issue URL from output
  4. gh project item-add {project_number} --owner {owner} --url {issue_url} --format json
  5. Extract item ID from JSON output
  6. Set all project fields using gh project item-edit:

- Story ID (text) - Epic (single-select option) - Sprint (single-select option, e.g., "Sprint 01") - Dev (single-select option) - Sprint Start (date from sprint-plan.md) - Sprint End (date from sprint-plan.md) - Status (Backlog) - Start date (same date as Sprint Start — pre-existing field) - Target date (same date as Sprint End — pre-existing field)

  1. Write link-back to local file: replace H1 with # [Story X.X: Title](issue_url)

For each UPDATE:

  1. Write updated body to temp file
  2. gh issue edit {number} --body-file /tmp/... --milestone "{phase_milestone}"
  3. Update project fields if sprint/epic changed

Step 7: Set Up Relationships

After all issues are created, establish GitHub native relationships.

Read references/gh-commands.md section 12 for the exact GraphQL mutations.

7a. Epic tracking issues as parents

Create one epic tracking issue per epic (if not already created). See references/content-mapping.md section 10 for the body template. Then for each story, set its epic tracking issue as its parent:

mutation {
  addSubIssue(input: {
    issueId: "{epic_tracking_issue_node_id}"
    subIssueId: "{story_issue_node_id}"
    replaceParent: true
  }) {
    issue { number }
    subIssue { number }
  }
}
7b. Blocked-by dependencies

Read the dependency table from sprint-plan.md (the Dependencies column in each sprint's story table). For each dependency A → B (story A depends on story B):

mutation {
  addBlockedBy(input: {
    issueId: "{story_A_node_id}"
    blockingIssueId: "{story_B_node_id}"
  }) {
    issue { number }
    blockingIssue { number }
  }
}
Always source dependencies from sprint-plan.md, not from story file bodies. The sprint plan is the authoritative dependency record.

Get issue node IDs via:

gh api graphql -f query='
  query {
    repository(owner:"{owner}", name:"{repo}") {
      issues(first:50, orderBy:{field:CREATED_AT, direction:ASC}) {
        nodes { number id title }
      }
    }
  }
'

Step 8: Report Completion

Push complete!
  Created: {N} issues
  Updated: {N} issues
  Skipped: {N} items
  Relationships set: {N} parent, {M} blocked-by

Config updated: last_synced = {timestamp}

Pull Workflow (GitHub → Files)

Pulls status, assignees, and task completion from GitHub back into local BMAD files.

Step 1: Load Config and Query GitHub

Read .github-sync.yaml. Then read references/gh-commands.md section 9 to get the full GraphQL items query. Execute it to fetch all project items.

Step 2: Match Items to Local Files

For each GitHub item that has a "Story ID" field value:

  1. Find the matching local story file (by story ID → filename pattern)
  2. Compare GitHub state with local file state:

- Status: GitHub status vs local Status: line - Assignee: GitHub assignee vs local dev mapping - Task checkboxes: GitHub issue body checkboxes vs local file checkboxes

Step 3: Generate Sync Report

=== GITHUB SYNC — PULL REPORT ===
Generated: {timestamp}

--- FILE UPDATES ({count} items) ---

  [UPDATE] {story_filename}.md
           Status: ready-for-dev → done (from GitHub #{issue_number})
           Assignee: (none) → @{username}

--- NO CHANGES ({count} items) ---

  [OK] {story_filename}.md — in sync

--- GITHUB-ONLY ({count} items) ---

  [WARN] GitHub #{N} "{title}" — no matching local file

--- SUMMARY ---
File updates: {N} | No changes: {N} | Warnings: {N}

Proceed? [Y/N]

HALT HERE. Wait for user approval.

Step 4: Execute Pull

If approved, for each file update:

  1. Read the story file
  2. Update the Status: line with the mapped BMAD status
  3. Write the file back
  4. Update config last_synced

Status Check (Read-Only)

Compare local files with GitHub state without making any changes. No approval needed.

# Scan local files
python3 .agents/skills/github-sync/scripts/parse-artifacts.py --mode scan \
  --stories-dir .artifacts/implementation-artifacts

# Query GitHub items (full field values)
# Use GraphQL query from references/gh-commands.md section 9

Output a comparison table:

=== GITHUB SYNC — STATUS ===

| Story | Local Status  | GitHub Status | Sprint | Synced? | Issue |
|-------|--------------|---------------|--------|---------|-------|
| 1.1   | ready-for-dev | Done          | 01     | NO      | #1    |
| 1.2   | ready-for-dev | Ready         | 01     | YES     | #2    |
| 2.1   | backlog       | (not synced)  | 02     | NO      | —     |

Summary: {N} in sync, {M} out of sync, {K} not yet pushed

Partial Sync Filters

FilterExampleEffect
By story IDspush stories 1.1 1.2 1.3Only these stories
By epicpush epic 3All stories in Epic 3
By sprintpush sprint 2All stories assigned to Sprint 2
By statuspush unsyncedOnly stories not yet pushed
Allpush or push allAll stories (default)

Error Handling

ErrorAction
gh command returns non-zero exit codeShow the error output, suggest fix, halt
Field ID missing from configRe-query field IDs via section 4 of gh-commands.md
Rate limit hit (HTTP 429)Show warning, suggest waiting 60 seconds, halt
Story file has unexpected formatSkip with warning in the sync report
Milestone already existsSkip creation (idempotent)
Label already existsSkip creation (idempotent)
Issue already exists for storySwitch to update mode
Single-select option IDs staleRe-query after any updateProjectV2Field call — the mutation replaces all options and issues new IDs
addBlockedBy payload field errorReturn field is blockingIssue (not blockedByIssue)
updateProjectV2Field rejects projectIdThis mutation takes only fieldId, not projectId
updateProjectV2Field rejects option idOptions use name/color/description only — no id field

Reference File Index

FileRead When
references/gh-commands.mdYou need exact gh CLI commands or GraphQL queries
references/content-mapping.mdYou need to build issue body, map fields, or check label/milestone scheme
references/config-schema.mdYou need to create or read .github-sync.yaml

平台分布

Codex

38.18%
按下载量换算48

Claude

28.14%
按下载量换算35

Cursor

18.31%
按下载量换算23

Gemini CLI

8.81%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills