fix-github-comment

fix-github-comment is a command for Claude Code from shenjingnan/home-mcp. It costs 13 tokens per session (1,653 once invoked), scanned A, original, MIT.

A command for reading GitHub Copilot comments on a pull request and turning the reported issues into a repair plan. GitHub is a code-hosting and collaboration service, and a pull request is a proposed set of code changes for review.

In plain words
What is it for?
Use it with a pull request number to inspect comments, review changed files, plan targeted fixes, track the work, and run quality checks afterward.
Why use it?
It gathers review feedback, checks the related code, ranks the issues by seriousness, and organizes the fixes and verification work.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/shenjingnan/home-mcp/fix-github-comment
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/home-mcp

Made for: Claude Code.

Wrote 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.

agentmods badge for fix-github-comment

README.md
[![agentmods](https://agentmods.dev/badge/commands/shenjingnan/home-mcp/fix-github-comment.svg)](https://agentmods.dev/commands/shenjingnan/home-mcp/fix-github-comment)
Your own site
<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="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.01653
Opus 5 $0.00006 $0.00826
Sonnet 5 $0.00003 $0.00331
Haiku 4.5 $0.00001 $0.00165

Measured 4d ago against content hash d115a61ef1f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 4d 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.

.claude/commands/fix-github-comment.md · 244 lines

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 工具制定详细的修复计划:

计划内容应包括:
  1. 问题总结: 清晰列出所有发现的问题
  2. 修复优先级: 按严重程度排序
  3. 具体修复步骤: 每个问题的详细修复方案
  4. 测试策略: 如何验证修复效果
  5. 风险评估: 修复可能带来的风险

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

注意事项

  1. 权限要求: 确保有访问 GitHub PR 的权限
  2. 环境准备: 确保已安装 gh CLI 并登录
  3. 分支状态: 确保本地分支代码是最新的
  4. 备份重要: 在修复前确保重要代码已备份

预期输出

该命令将提供:

  • 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

Read the full file on GitHub · 244 lines

Changes

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.

  1. 4d ago First seen · 244 lines · 13 tokens per session scan A d115a61ef1f6

Subscribe to this mod's changes

fix-github-comment is a command published in the GitHub repository shenjingnan/home-mcp (21 stars, last pushed 7mo ago), licensed MIT. It adds 13 tokens to every session and 1,653 once invoked, about $0.0001 per session on Opus 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.