Agent skill

Fix Comment

by shenjingnan in shenjingnan/xiaozhi-client

GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题. An agent skill from shenjingnan/xiaozhi-client.

MITAuto-check passedDevelopment

Install Fix Comment

skills CLI
$ npx skills add shenjingnan/xiaozhi-client --skill fix-comment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shenjingnan/xiaozhi-client fix-comment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fix-comment .claude/skills/fix-comment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fix-comment
GitHub stars
341
Token cost
~873 tokens
SKILL.md length
168 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题. An agent skill from shenjingnan/xiaozhi-client.

  • Works in 6 steps: 解析 PR 信息 - 从输入中提取 PR 编号或 URL → 获取分支名 - 获取 PR 对应的分支名 → 管理 worktree - 检查/创建/清理 git worktree → …
  • Tasks that involve Git worktrees
  • SKILL.md covers 我的能力, 使用方式, 执行流程 and 注意事项
  • Calls git and gh

What it does

Fix Comment is an agent skill from shenjingnan/xiaozhi-client. GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. It works with GitHub. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/fix-comment”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 解析 PR 信息 - 从输入中提取 PR 编号或 URL
  2. 获取分支名 - 获取 PR 对应的分支名
  3. 管理 worktree - 检查/创建/清理 git worktree
  4. 分析评论 - 获取 PR 评论并分析是否真的存在问题
  5. 修复问题 - 如果确实存在问题,修复代码并提交推送
  6. 清理环境 - 清理创建的 worktree,保持工作区整洁

What it can do on your machine

Read from SKILL.md and the folder at commit fe3c382. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fix Comment loads about 873 tokens when it runs. Until then it costs about 13 tokens; SKILL.md has 168 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~13
When it runs · the whole SKILL.md, loaded when a task matches
~873

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shenjingnan/xiaozhi-client at commit fe3c382, republished under its MIT licence (© shenjingnan). 168 words, ~873 tokens.

Download SKILL.mdSave it as .claude/skills/fix-comment/SKILL.md (or your agent's skills folder).
name
fix-comment
description
GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题

GitHub 评论修复技能

我是一个 GitHub PR 评论处理专家,专门获取 Copilot 评论并分析修复相关问题。

我的能力

当你需要处理 GitHub PR 中的 Copilot 评论时,我会:

  1. 解析 PR 信息 - 从输入中提取 PR 编号或 URL
  2. 获取分支名 - 获取 PR 对应的分支名
  3. 管理 worktree - 检查/创建/清理 git worktree
  4. 分析评论 - 获取 PR 评论并分析是否真的存在问题
  5. 修复问题 - 如果确实存在问题,修复代码并提交推送
  6. 清理环境 - 清理创建的 worktree,保持工作区整洁

使用方式

使用格式:/fix-comment [PR编号或URL]

示例:

  • /fix-comment 1358
  • /fix-comment https://github.com/shenjingnan/xiaozhi-client/pull/1358

执行流程

第一步:解析 PR 编号并获取 PR URL
  • 如果输入是数字(如 1358),直接使用该 PR 编号
  • 如果输入是 PR URL(如 https://github.com/shenjingnan/xiaozhi-client/pull/1358),从 URL 路径中提取最后一部分作为 PR 编号
  • 获取 PR 完整信息(包含 URL):
    bash
    # 获取 PR 完整信息
    gh pr view <pr-number> --json url,title,headRefName,state -q '.url'
第二步:获取 PR 信息并创建 worktree
bash
# 获取 PR 对应的分支名
gh pr view <pr-number> --json headRefName -q '.headRefName'

分支名转换规则:

  • PR 分支名如 fix/foo → worktree 目录名 fix_foo
  • 使用 _ 替换分支名中的 /

检查 worktree 是否存在:

bash
# 检查本地是否存在对应的 worktree
git worktree list --porcelain | grep "worktrees/"

# 或者查看 worktree 列表
git worktree list

情况 A:worktree 已存在

  • 直接 cd 到 worktree 目录继续执行

情况 B:worktree 不存在,检查本地分支

  1. 本地已有该分支:

    bash
    # 创建 worktree(复用已有分支,无需 -b 参数)
    git worktree add ./worktrees/<dir-name> <pr-branch>
  2. 本地没有该分支:

    bash
    # 先 fetch 远端分支
    git fetch origin
    # 创建 worktree 并基于远端分支创建本地分支
    git worktree add ./worktrees/<dir-name> -b <pr-branch> origin/<pr-branch>

worktree 已存在但有改动:

  • 提示用户当前 worktree 有未提交的更改
  • 询问是否 stash 继续或终止

远端分支已删除:

  • 无法创建 worktree,提示用户
第三步:进入 worktree 目录
bash
cd ./worktrees/<dir-name>
git pull
第四步:获取并分析评论
  1. 获取 PR #<pr-number> 的所有待解决的评论,主要是 Copilot 的评论
  2. 分析这些评论是否真的存在问题
  3. 如果的确存在问题,调整代码
  4. 如果认为这是无关紧要的问题,或者是过度评论,可以不进行处理

如果分析评论后决定不修复,输出以下通知:

══════════════════════════════════════════════════════════════
              PR #<pr-number> 评论分析完成
══════════════════════════════════════════════════════════════

  状态: 无需修复

  PR 链接: https://github.com/shenjingnan/xiaozhi-client/pull/<pr-number>

  原因: <说明为什么不需要修复>

══════════════════════════════════════════════════════════════
第五步:提交并推送更改

在 worktree 中完成修复后:

bash
# 添加修改的文件
git add -A

# 提交更改
git commit -m "fix: 修复 PR 评论中的问题"

# 推送到远端
git push

在 git push 成功后,输出以下显著的通知:

══════════════════════════════════════════════════════════════
              PR #<pr-number> 评论修复完成
══════════════════════════════════════════════════════════════

  状态: 修复已推送

  PR 链接: https://github.com/shenjingnan/xiaozhi-client/pull/<pr-number>

  分支: <pr-branch>

  提交: <commit-hash> - <commit-message>

══════════════════════════════════════════════════════════════
第六步:清理 worktree

完成修复后,清理创建的 worktree:

bash
# 返回原目录
cd ../..

# 移除 worktree 目录
git worktree remove ./worktrees/<dir-name>

可选:删除本地分支(如果分支已合并或不需要保留):

bash
git branch -d <pr-branch>
失败场景处理

如果处理过程中出现错误,也需要输出失败通知:

══════════════════════════════════════════════════════════════
              PR #<pr-number> 评论处理失败
══════════════════════════════════════════════════════════════

  状态: 处理失败

  PR 链接: https://github.com/shenjingnan/xiaozhi-client/pull/<pr-number>

  失败原因: <失败原因说明>

══════════════════════════════════════════════════════════════

注意事项

  • 使用 worktree 可以并行处理多个 PR 评论任务,互不干扰
  • 需要安装 gh CLI 工具
  • 需要已认证 GitHub 账户
  • worktree 目录位于项目根目录的 worktrees/ 文件夹下

© shenjingnan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/fix-comment of shenjingnan/xiaozhi-client.

Open the folder on GitHubat commit fe3c382

Compare with similar skills

Fix Comment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fix Comment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix Comment this skillshenjingnan/xiaozhi-client341—~873Automated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Codewhale Landing Workflowcodewhale-hq/Codewhale41k—~1.6kAutomated safety check: PassMIT
Ff Worktreesdamus-io/damus2.1k—~451Automated safety check: PassGPL-3.0
Clean Complete Branchesjtenniswood/espcontrol1.1k—~820Automated safety check: PassCustom licence
Clean Merged Branch Foldersjtenniswood/espcontrol1.1k—~813Automated safety check: PassCustom licence

Similar skills

  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Ff Worktrees

    damus-io/damus

    Fast-forward master and every git worktree branch up to a target ref (default github/master), skipping any worktree with unmerged commits.

    2.1k GitHub stars~451 tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Merged Branch Folders

    jtenniswood/espcontrol

    Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main.

    1.1k GitHub stars~813 tokensUpdated today
    DevelopmentAuto-check passed
  • Fix

    exercism/website

    Fix a GitHub issue end-to-end — fetches issue, creates worktree, plans and implements fix, runs validation, opens PR, cleans up.

    549 GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check: notes

More from shenjingnan/xiaozhi-client

All 16 skills in this repo
  • E2E Coverage Analyzer

    shenjingnan/xiaozhi-client

    分析当前分支 git 改动,检查 e2e 测试用例覆盖情况,并可补充缺失的测试用例. An agent skill from shenjingnan/xiaozhi-client.

    341 GitHub stars~954 tokensUpdated 1 mo ago
    Auto-check passed
  • API Docs

    shenjingnan/xiaozhi-client

    文档自动生成

    341 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • CI Validator

    shenjingnan/xiaozhi-client

    CI检查验证和质量保障

    341 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Commit

    shenjingnan/xiaozhi-client

    生成代码评审友好的 commit 信息

    341 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Workflow Checker

    shenjingnan/xiaozhi-client

    开发流程检查技能,确保代码修改后执行必要的质量检查

    341 GitHub stars~464 tokensUpdated 1 mo ago
    Auto-check passed
  • Docs Creator

    shenjingnan/xiaozhi-client

    文档创建技能,用于创建标准化的项目文档

    341 GitHub stars~614 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Fix Comment

What does Fix Comment do?

GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题. An agent skill from shenjingnan/xiaozhi-client. Fix Comment is an agent skill from shenjingnan/xiaozhi-client.

When should I use Fix Comment?

Fix Comment fits situations like: tasks that involve Git worktrees.

How do I install Fix Comment in Claude Code?

Run `npx skills add shenjingnan/xiaozhi-client --skill fix-comment -a claude-code`. Or copy the skill folder (.agents/skills/fix-comment in shenjingnan/xiaozhi-client) into .claude/skills/fix-comment in your project. Claude Code loads it when a task matches its description.

How do I install Fix Comment in Codex?

Run `npx skills add shenjingnan/xiaozhi-client --skill fix-comment -a codex`. Or copy the skill folder (.agents/skills/fix-comment in shenjingnan/xiaozhi-client) into .agents/skills/fix-comment in your project. Codex loads it when a task matches its description.

Can I use Fix Comment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shenjingnan/xiaozhi-client --skill fix-comment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-comment, .gemini/skills/fix-comment, .github/skills/fix-comment and .opencode/skills/fix-comment in your project.

What does Fix Comment need to run?

Going by SKILL.md and its folder, Fix Comment needs the command-line tools its instructions call (git and gh).

Does Fix Comment access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fix Comment safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fix Comment use?

Fix Comment is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fix Comment use?

About 873 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fix Comment?

Skills that share tags, products or a category with Fix Comment: Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Codewhale Landing Workflow (codewhale-hq/Codewhale, 41k stars), Ff Worktrees (damus-io/damus, 2.1k stars) and Clean Complete Branches (jtenniswood/espcontrol, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix Comment?

shenjingnan (a GitHub user) maintains it in shenjingnan/xiaozhi-client, which has 341 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 3, 2026.

Source: shenjingnan/xiaozhi-client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.