xiaozhi-client: Skill for Claude Code

.agents/skills/fix-comment/SKILL.md

fix-comment is a skill for Claude Code, Codex from shenjingnan/xiaozhi-client. It costs 22 tokens per session (1,402 once invoked), scanned A, original, MIT.

A workflow for handling Copilot comments on GitHub pull requests, which are proposed code changes reviewed before they are merged. It reads the comments, checks whether they identify real problems, and fixes confirmed issues.

In plain words
What is it for?
Use it with a pull-request number or URL to inspect Copilot comments, modify the corresponding code, commit and push fixes, and manage the related worktree.
Why use it?
It reduces the manual work of finding the right branch, preparing a separate Git worktree, evaluating review feedback, and cleaning up afterward.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is shenjingnan/xiaozhi-client's own configuration. It tells Claude Code and Codex how to work on xiaozhi-client itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xiaozhi-client configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is git worktree add ./worktrees/<dir-name> <pr-branch>.

Reuse

Borrowing it

Nothing to install: this file belongs to shenjingnan/xiaozhi-client. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/.agents/skills/fix-comment/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client

Made for: Claude Code, Codex.

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-comment

README.md
[![agentmods](https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/fix-comment/github.svg)](https://agentmods.dev/skills/shenjingnan/xiaozhi-client/fix-comment)
Your own site
<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/fix-comment"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/fix-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.

agentmods 80×15 button for fix-comment

Your own site · 80×15
<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/fix-comment"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/fix-comment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00022 $0.01402
Opus 5 $0.00011 $0.00701
Sonnet 5 $0.00004 $0.00280
Haiku 4.5 $0.00002 $0.00140

Measured 9d ago against content hash 2e04342975ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

fix-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 9d 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.

.agents/skills/fix-comment/SKILL.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)
    # 获取 PR 完整信息
    gh pr view <pr-number> --json url,title,headRefName,state -q '.url'
    

第二步:获取 PR 信息并创建 worktree

# 获取 PR 对应的分支名
gh pr view <pr-number> --json headRefName -q '.headRefName'

分支名转换规则

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

检查 worktree 是否存在

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

# 或者查看 worktree 列表
git worktree list

情况 A:worktree 已存在

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

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

  1. 本地已有该分支:

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

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

worktree 已存在但有改动

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

远端分支已删除

  • 无法创建 worktree,提示用户

第三步:进入 worktree 目录

cd ./worktrees/<dir-name>
git pull

第四步:获取并分析评论

  1. 获取 PR # 的所有待解决的评论,主要是 Copilot 的评论
  2. 分析这些评论是否真的存在问题
  3. 如果的确存在问题,调整代码
  4. 如果认为这是无关紧要的问题,或者是过度评论,可以不进行处理

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

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

  状态: 无需修复

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

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

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

Read the full file on GitHub · 191 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. 9d ago First seen · 191 lines · 22 tokens per session scan A 2e04342975ff

Subscribe to this mod's changes

fix-comment is a skill published in the GitHub repository shenjingnan/xiaozhi-client (338 stars, last pushed 5d ago), licensed MIT. It adds 22 tokens to every session and 1,402 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.