Borrowing it
Nothing to install: this file belongs to shenjingnan/home-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/home-mcp/main/.claude/commands/fix-github-comment.mdgit clone --depth 1 https://github.com/shenjingnan/home-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/shenjingnan/home-mcp/fix-github-comment)<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/fix-github-comment"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/fix-github-comment/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/fix-github-comment"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/fix-github-comment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.01653 |
| Opus 5.5 | $0.00005 | $0.00661 |
| Sonnet 5.5 | $0.00003 | $0.00331 |
| Haiku 4.5 | $0.00001 | $0.00165 |
Grade A, and why
fix-github-comment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GitHub PR Copilot 评论分析和修复
目标
获取指定 GitHub PR 中的 Copilot 评论,分析其指出的问题,并制定修复计划。
参数
- PR 编号:
$1(必需)
执行步骤
0. 环境预检查
在开始分析之前,先检查环境状态:
检查 Git 状态:
!git status --porcelain
检查当前分支:
!git branch --show-current
确保有最新的 PR 信息:
!git fetch origin
1. 获取 PR 信息和 Copilot 评论
首先获取 PR 的基本信息和 Copilot 评论
2. 分析 Copilot 评论
仔细阅读并分析 Copilot 的评论内容,重点关注:
问题类型分析
- 代码质量问题: linting 错误、代码规范问题
- 类型安全问题: TypeScript 类型错误、类型定义问题
- 性能问题: 性能瓶颈、优化建议
- 安全性问题: 安全漏洞、潜在风险
- 可维护性问题: 代码重复、复杂度过高
- 测试问题: 测试覆盖率、测试质量
严重程度评估
- Critical: 阻塞性问题,必须修复
- High: 重要问题,建议立即修复
- Medium: 中等问题,可以稍后修复
- Low: 轻微问题,可选修复
3. 代码审查和问题验证
根据 Copilot 提到的问题,进行代码审查:
获取具体文件变更:
分析关键文件:
使用 @文件路径 引用具体文件进行深入分析
4. 制定修复计划
基于分析结果,使用 ExitPlanMode 工具制定详细的修复计划:
计划内容应包括:
- 问题总结: 清晰列出所有发现的问题
- 修复优先级: 按严重程度排序
- 具体修复步骤: 每个问题的详细修复方案
- 测试策略: 如何验证修复效果
- 风险评估: 修复可能带来的风险
5. 执行修复
按照计划逐步执行修复:
使用 TodoWrite 工具跟踪进度
- 创建详细的任务列表
- 跟踪每个修复步骤的状态
- 确保所有问题都得到处理
修复执行原则
- 最小化变更: 只修改必要的代码
- 保持一致性: 遵循项目现有的代码风格
- 测试验证: 每个修复都要经过测试验证
- 文档更新: 如需要,更新相关文档
6. 质量验证
修复完成后的验证步骤:
代码质量检查:
!pnpm check:fix
类型检查:
!pnpm type:check
构建验证:
!pnpm build
测试验证:
!pnpm test
使用示例
# 分析PR #398的Copilot评论
/fix-github-comment 398
# 分析PR #123的Copilot评论
/fix-github-comment 123
注意事项
- 权限要求: 确保有访问 GitHub PR 的权限
- 环境准备: 确保已安装 gh CLI 并登录
- 分支状态: 确保本地分支代码是最新的
- 备份重要: 在修复前确保重要代码已备份
预期输出
该命令将提供:
- PR 状态和基本信息
- Copilot 评论的完整内容
- 问题分析和严重程度评估
- 详细的修复计划
- 修复执行进度跟踪
- 质量验证结果
7. 生成修复总结
修复完成后,生成详细的总结报告:
创建修复报告:
# PR #$1 修复报告
## 修复概览
- 修复的问题数量: X 个
- 修复的文件数量: X 个
- 修复耗时: X 分钟
## 问题分类
- 代码质量: X 个
- 类型安全: X 个
- 性能优化: X 个
- 安全问题: X 个
## 质量指标
- 代码检查: ✅ 通过
- 类型检查: ✅ 通过
- 构建状态: ✅ 通过
- 测试状态: ✅ 通过
高级功能
批量处理多个 PR
# 批量分析多个PR
for pr in 123 124 125; do
echo "=== 分析 PR #$pr ==="
/fix-github-comment $pr
done
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 244 lines · 13 tokens per session scan A d115a61ef1f6
fix-github-comment is a command published in the GitHub repository shenjingnan/home-mcp (23 stars, last pushed 9mo ago), licensed MIT. It adds 13 tokens to every session and 1,653 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
fix-github-comment compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fix-github-commentshenjingnan/home-mcp | Command | 23 | 9mo ago | MIT | A | 13 | Claude Code |
| diff-reviewcoco-research/coco | Command | 785 | yesterday | Apache-2.0 | A | 11 | Claude Code |
| review-branchdamusix/atomic-claude | Command | 115 | 4d ago | MIT | A | 35 | Claude Code |
| refactorRchGrav/claudebox | Command | 1.2k | 1mo ago | MIT | A | 9 | Claude Code |
| spec-trace-requirementsrjmurillo/ai-agents | Command | 49 | yesterday | MIT | A | 0 | GitHub Copilot |
| merge-conflict-analysisrjmurillo/ai-agents | Command | 49 | yesterday | MIT | A | 0 | GitHub Copilot |
| initazrtydxb/procoder | Command | 211 | 11d ago | Apache-2.0 | A | 16 | Claude Code |