Agent Skillsyc-software/qm › github-gitlab

github-gitlab

GitHub

提供GitHub/GitLab仓库交互能力,支持通过本地CLI工具查看代码历史、Issue及PR/MR,执行小幅度代码修改并创建分支。涵盖认证流程、只读检查及安全写入审批机制。

skills-seed/github-gitlab/SKILL.md yc-software/qm

触发场景

用户需要检查或浏览GitHub/GitLab仓库内容 用户请求查看Issue、Pull Request或Merge Request状态 用户要求在托管仓库中进行小规模代码变更

安装

npx skills add yc-software/qm --skill github-gitlab -g -y
更多选项

非标准路径

npx skills add https://github.com/yc-software/qm/tree/main/skills-seed/github-gitlab -g -y

不安装直接使用

npx skills use yc-software/qm@github-gitlab

指定 Agent (Claude Code)

npx skills add yc-software/qm --skill github-gitlab -a claude-code -g -y

安装 repo 全部 skill

npx skills add yc-software/qm --all -g -y

预览 repo 内 skill

npx skills add yc-software/qm --list

SKILL.md

Frontmatter
{
    "name": "github-gitlab",
    "description": "Work with GitHub and GitLab repositories through resident gh\/glab\/git auth on the agent computer.",
    "requiredCapabilities": [
        "egress:github.com",
        "egress:api.github.com",
        "egress:gitlab.com"
    ]
}

GitHub / GitLab

Use this skill when the user asks to inspect repos, issues, pull requests, merge requests, code history, branches, or to make a small code change in a hosted repo.

This is a resident-machine-auth connector. Prefer the native CLIs (gh, glab) and git, using the agent computer's logged-in state. Do not ask the user to paste tokens, and do not rely on proxy bearer-token injection.

One exception: if the system prompt lists a shared org credential for a Git remote, the token is broker-only and never appears on the computer. For clone/fetch/push, use the core-hosted smart HTTP remote documented in skills/use-shared-credential/SKILL.md. That keeps normal git workflows working while core injects the upstream credential server-side.

Logging in

If gh auth status (or glab auth status) fails, log in with the native command:

gh auth login

The platform recognizes this device-flow login and runs it as a durable process session (ADR 0002): it prints the one-time code + verification URL immediately and keeps polling on the agent computer across turns — it does not block your turn or die at teardown. Give the user the code and URL, ask them to approve in the browser, then say "done". On the next turn, run gh auth status (or gh auth login again): the platform reports you're authenticated once approval completes, and the login self-expires if the user takes too long (just run gh auth login again to restart). GitLab is the same with glab auth login.

Read-only work

Check auth and inspect repo state:

gh auth status
gh repo view OWNER/REPO --json name,description,url,defaultBranchRef
gh issue list --repo OWNER/REPO --state open --limit 20
gh pr list --repo OWNER/REPO --state open --limit 20

For GitLab:

glab auth status
glab repo view GROUP/PROJECT
glab issue list --repo GROUP/PROJECT
glab mr list --repo GROUP/PROJECT

Use git log, git show, and git diff for codebase-change summaries. Cite commit hashes, PR/MR numbers, and links.

Checkout and edits

Clone or fetch only the repo the user asked for:

gh repo clone OWNER/REPO repo
cd repo
git checkout -b codex/small-change

Keep changes scoped. Run the repo's tests. If a push or PR/MR creation is requested, prepare the branch and summary first.

Writes require approval

Pushing branches, creating PRs/MRs, merging, closing issues, editing labels, changing repo settings, releases, or workflows are writes. Ask for approval before running the write command.

After approval:

git push -u origin codex/small-change
gh pr create --repo OWNER/REPO --title "..." --body-file pr.md

For GitLab:

git push -u origin codex/small-change
glab mr create --repo GROUP/PROJECT --title "..." --description-file mr.md

Report the final URL and leave enough context for review.

版本历史

  • 7f2c916 当前 2026-08-02 21:46

同 Skill 集合

.claude/skills/dev-instance/SKILL.md
.claude/skills/update-qm/SKILL.md
.claude/skills/upstream-pr/SKILL.md
.codex/skills/deploy-qm/SKILL.md
.codex/skills/dev-instance/SKILL.md
.codex/skills/update-qm/SKILL.md
.codex/skills/upstream-pr/SKILL.md
cli/templates/deployment/SKILL.md
plugins/onboarding/skills/onboarding/SKILL.md
skills-seed/admin/SKILL.md
skills-seed/browse/SKILL.md
skills-seed/cloud-cli/SKILL.md
skills-seed/connect-apps/SKILL.md
skills-seed/dropbox/SKILL.md
skills-seed/email-draft-in-voice/SKILL.md
skills-seed/email-voice-profile/SKILL.md
skills-seed/google-drive-sheets/SKILL.md
skills-seed/google-workspace/SKILL.md
skills-seed/interactive-login/SKILL.md
skills-seed/linear/SKILL.md
skills-seed/memory/SKILL.md
skills-seed/morning-digest/SKILL.md
skills-seed/popular-web-designs/SKILL.md
skills-seed/publish/SKILL.md
skills-seed/taste-skill/SKILL.md
skills-seed/use-shared-credential/SKILL.md

元信息

文件数
0
版本
0f0e0ad
Hash
17de274d
收录时间
2026-08-02 21:46

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-06 16:52
浙ICP备14020137号-1 $访客地图$