用途:为 Inbox 智能体完成初始配置,使其在 VS Code 中按推荐设置运行,并连接 gh CLI 与 GitHub MCP 服务器。
主要流程:
- 运行前先用 #askQuestions 询问是否自动配置,用户选择“Skip for now”则停止。
- 检测已有记忆:运行 ls -la ~/.copilot/github-inbox-*.md 2>/dev/null,并用 #memory 查看 /memories/github-inbox-memory.md 与 /memories/github-inbox-rules.md;如发现已有记忆,让用户选择使用 ~/.copilot/ 文件、VS Code #memory,或从 ~/.copilot/ 导入,并把选择记入 ## Backend 段。
- 检查 gh CLI:gh --version,未安装则参考 inbox-install-gh-cli 技能。
- 配置 settings.json(macOS、Linux、Windows 常见路径),只添加缺失键,禁止删除或替换已有内容;chat.tools.terminal.autoApprove 已存在时需合并规则。
需添加的设置: { "chat.customAgentInSubagent.enabled": true, "github.copilot.chat.githubMcpServer.enabled": true, "chat.tools.terminal.enableAutoApprove": true, "chat.tools.terminal.autoApprove": { "/^gh api (?!.*--method (PATCH|PUT|POST|DELETE))/": true, "/^gh search /": true, "gh issue view": true, "gh pr view": true, "gh --version": true, "gh config set": true } }
这些设置分别用于:启用子智能体委派(reviewer、triager、memory、investigator)、开启 GitHub MCP 相关丰富功能(PR 评审、评论、标签、指派人)、以及自动批准只读 gh 命令。
- 启用自动批准:更新设置后运行 gh api /notifications --jq 'length',提示用户在“Run command?”弹窗点击 Allow ▾ 并选择“Enable Auto Approve”,这是一次性授权。
- 确认 GitHub MCP 服务器已启动。
- 用 inbox-memory 技能保存设置状态到记忆。
限制:设置只增不删,必须避免破坏用户原有配置;自动批准仅覆盖上述只读命令模式;具体平台差异与未列出的功能细节,资料未提供。