gh-auth-isolation
仓库创建 2026年4月15日最近提交 21 天前SkillHot 收录 21 天前
▸ 精选理由
解决常见的多身份推送/权限冲突,适合既有企业与开源身份的开发者。
▸ 风险提示
涉及凭据与认证操作,需谨慎保护和审查令牌
这个 Skill 做什么
在代理工作流中安全管理多个 GitHub 身份(如 EMU 与个人账号)。
在代理执行流程里把不同 GitHub 身份(比如公司 EMU 和个人账号)隔离管理,防止代理继承 shell 的默认 gh 身份去错账号 push 或开 PR 导致失败。用在代理要访问个人仓库、fork 或外部资源时,会因身份混用而报错的场景。它在 agent 级别切换或隔离 auth,避免权限/审计和推送失败的问题。
▸ 展开 SKILL.md 英文原文
Safely manage multiple GitHub identities (EMU + personal) in agent workflows
0
Stars
0
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Codebrew-company/CodebrewRouter/master/.copilot/skills/gh-auth-isolation/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Codebrew-company/CodebrewRouter/master/.copilot/skills/gh-auth-isolation/SKILL.md"SKILL.MD 节选查看完整文件 ↗
## Context Many developers use GitHub through an Enterprise Managed User (EMU) account at work while maintaining a personal GitHub account for open-source contributions. AI agents spawned by Squad inherit the shell's default `gh` authentication — which is usually the EMU account. This causes failures when agents try to push to personal repos, create PRs on forks, or interact with resources outside the enterprise org. This skill teaches agents how to detect the active identity, switch contexts safely, and avoid mixing credentials across operations. ## Patterns ### Detect Current Identity Before any GitHub operation, check which account is active: ```bash gh auth status ``` Look for: -
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有