xiaozhi-client: Skill for Claude Code

.agents/skills/test-fixer/SKILL.md

test-fixer is a skill for Claude Code, Codex from shenjingnan/xiaozhi-client. It costs 19 tokens per session (515 once invoked), scanned A, original, MIT.

A workflow for investigating and fixing failed automated tests. It examines errors, decides whether the test or source code is wrong, applies a repair, and reruns checks.

In plain words
What is it for?
Use it with a failing test file to inspect errors, correct assertions or mocks, fix related source code, rerun the test suite, and check linting and types.
Why use it?
It turns a failing test into a structured diagnosis and verification process, reducing the chance of hiding the real bug or breaking other tests.

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 →

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/test-fixer/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 test-fixer

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/test-fixer"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/test-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 515 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.00019 $0.00515
Opus 5 $0.00010 $0.00258
Sonnet 5 $0.00004 $0.00103
Haiku 4.5 $0.00002 $0.00052

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

Security

Grade A, and why

test-fixer 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 10d 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/test-fixer/SKILL.md · 72 lines

What it actually says

测试修复技能

我是一个测试修复专家,专门分析并修复失败的测试用例。

我的能力

当你有测试用例失败时,我会:

  1. 执行测试并分析 - 运行测试获取详细错误信息
  2. 诊断失败原因 - 分析每个失败用例的具体原因
  3. 制定修复方案 - 确定需要修复测试代码还是源代码
  4. 实施修复并验证 - 修复问题并确保所有测试通过

使用方式

使用格式:/fix-test [测试文件路径]

示例

  • /fix-test src/server/handlers/__tests__/mcp-manage.handler.test.ts
  • /fix-test src/cli/commands/__tests__/start.test.ts

修复流程

1. 执行测试并分析失败原因

  • 运行指定的测试文件,获取详细的错误信息和堆栈跟踪
  • 分析每个失败测试用例的具体失败原因:
    • 断言失败
    • Mock 配置问题
    • 测试数据问题
  • 检查相关源代码是否有变更导致测试逻辑不再适用

2. 制定修复方案

  • 根据失败原因确定是需要修复测试代码还是源代码
  • 如果是测试代码问题:
    • 更新测试逻辑
    • 修复断言
    • 调整 Mock 配置
  • 如果是源代码问题:
    • 修复源代码逻辑错误
  • 确保修复不会影响其他测试用例

3. 实施修复并验证

  • 按照修复方案逐一实施修复
  • 每次修复后立即运行测试验证效果
  • 确保所有原失败的测试用例现在都能通过
  • 运行完整测试套件确保没有引入新的失败

4. 代码质量检查

# 执行代码规范检查
pnpm lint

# 执行类型检查
pnpm typecheck

输出

提供详细的:

  • 失败原因分析
  • 修复过程说明
  • 最终验证结果
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. 10d ago First seen · 72 lines · 19 tokens per session scan A c1c2c5304884

Subscribe to this mod's changes

test-fixer is a skill published in the GitHub repository shenjingnan/xiaozhi-client (338 stars, last pushed 7d ago), licensed MIT. It adds 19 tokens to every session and 515 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.

Related

Other skills, from other repositories

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

work

Deliver one maintainer-approved EmDash issue, choosing the bug-fix path for a defect and the direct implementation path for an enhancement or task.

emdash-cms/emdash · 31 tokens