Agent Skillsyc-software/qm › github-gitlab

github-gitlab

GitHub

提供GitHub和GitLab仓库的交互能力,支持通过本地CLI工具检查代码历史、Issue、PR/MR及执行小范围代码变更。包含认证处理、只读查询、分支检出与推送流程,强调写入操作需用户批准。

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

Trigger Scenarios

检查仓库状态或代码历史 查看或创建Pull Request/Merge Request 管理Issue 在托管仓库中进行小幅代码修改

Install

npx skills add yc-software/qm --skill github-gitlab -g -y
More Options

Non-standard path

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

Use without installing

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.

Version History

  • 7f2c916 Current 2026-08-02 21:46

Same Skill Collection

.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

Metadata

Files
0
Version
0f0e0ad
Hash
17de274d
Indexed
2026-08-02 21:46

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-10 23:52
浙ICP备14020137号-1 $Map of visitor$