返回 Skill 列表
extension
分类: 开发与工程无需 API Key

gh-verifying-context

验证当前的GitHub身份验证状态和git远程仓库,以确保代理在正确的帐户和存储库中运行。在每个会话开始时使用。

person作者: jakexiaohubgithub

Verifying GitHub Context

Purpose

This skill ensures that the agent is aware of its identity (GitHub user) and location (repository and organization) before performing any actions. This prevents accidental data leakage between personal and work accounts.

1. Safety & Verification

  • Mandatory First Step: This skill MUST be executed at the beginning of every interaction involving GitHub.
  • Human Confirmation: The agent MUST report the results (User, Organization, Repository) to the user and wait for explicit confirmation that the context is correct.

2. Common Workflows

Workflow: Check Authentication and Remote

Retrieves current login and remote URLs.

Command:

gh auth status && git remote -v

3. Output Handling

The agent should parse the output and present it clearly:

  • Logged in as: [username]
  • Active Repository: [owner/repo]
  • Remotes: [origin URL]

If the user or repository does not match the expected context for the task (e.g., work-related task in a personal repo), the agent MUST STOP and alert the user.