xiaozhi-client: Skill for Claude Code

.agents/skills/fix-any-types/SKILL.md

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

A TypeScript code-fixing workflow that replaces any, a type that disables useful type checking, with specific types or safer alternatives such as unknown. It aims to remove any from a target file.

In plain words
What is it for?
Use it on a file to find any usages, choose replacement types, update imports or interfaces, and run type checking, linting, tests, and a build to verify the changes.
Why use it?
Unrestricted any values can hide incorrect data and make code harder to maintain. Replacing them makes the expected data clearer to TypeScript and to other developers.

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/fix-any-types/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-any-types

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/fix-any-types"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/fix-any-types.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 733 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.00733
Opus 5 $0.00010 $0.00367
Sonnet 5 $0.00004 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

fix-any-types 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 12d 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-any-types/SKILL.md · 98 lines

What it actually says

any 类型修复技能

我是一个 TypeScript 类型安全专家,专门消除代码中的 any 类型使用,遵循项目的零容忍 any 类型政策。

我的能力

当你需要修复文件中的 any 类型问题时,我会:

  1. 识别问题 - 搜索文件中所有 any 类型的使用位置
  2. 分析上下文 - 分析每个 any 类型的使用目的
  3. 类型替换 - 使用具体类型或 unknown 替换 any
  4. 验证修复 - 确保修复后代码类型安全且功能正常

使用方式

使用格式:/fix-any-types [文件路径]

示例

  • /fix-any-types src/server/handlers/mcp-manage.handler.ts
  • /fix-any-types src/cli/commands/start.ts

修复策略

分类处理

  • 可替换的具体类型:使用明确的 TypeScript 类型或接口
  • 未知数据类型:使用 unknown 替代 any
  • 参数对象:使用 Record<string, unknown> 或更具体的键值类型
  • 第三方库类型:检查并安装相应的 @types/*
  • MCP 协议类型:从 @modelcontextprotocol/sdk/types.js 导入标准类型

类型导入和定义

  • 从项目依赖中导入可用的标准类型
  • 创建或扩展本地接口定义
  • 使用项目路径别名正确导入类型

代码规范遵循

  • 确保所有导入语句符合项目规范
  • 添加中文注释说明复杂类型定义
  • 遵循项目的 TypeScript 严格模式要求

验证阶段

编译和类型检查

# 运行类型检查
pnpm typecheck

# 运行构建
pnpm build

代码质量检查

# 代码规范检查
pnpm lint

# 运行测试
pnpm test

特殊处理场景

测试文件类型安全

  • 使用具体的 React 组件属性类型
  • 避免在测试文件中使用 any 类型
  • 优先使用 unknown 或具体类型

复杂数据结构

  • 对于复杂对象,考虑创建接口定义
  • 使用工具类型如 Partial<T>Required<T>
  • 添加运行时类型验证(推荐使用 Zod)

第三方集成

  • 检查是否需要更新依赖版本以获得更好的类型支持
  • 为缺少类型定义的第三方库创建声明文件
  • 使用类型断言时要谨慎,优先使用类型守卫

交付标准

  1. 零 any 类型:目标文件中不再存在 any 类型使用
  2. 类型安全:通过 TypeScript 严格模式检查
  3. 代码规范:符合项目的代码规范和导入顺序
  4. 功能完整:修复后的代码功能与原代码一致
  5. 文档完善:为复杂类型定义添加中文注释
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. 12d ago First seen · 98 lines · 19 tokens per session scan A f547f6ab6b09

Subscribe to this mod's changes

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

cli-wiring

Bug class: Commands implemented in packages/squad-cli/src/cli/commands/ but never routed in cli-entry.ts.

github/gh-aw · 0 tokens

node-modules-inspector

Inspects a project's installed nodemodules and produces three reports: duplicated packages (installed in multiple versions), packages sorted by install size, and maintenance actions (dep-upgrade opportunities + publint findings, grouped by consumer/author). Use when the user wants to audit dependencies, find duplicate…

antfu/node-modules-inspector · 156 tokens

agents-sdk-typescript-debugging

Use when troubleshooting an agent built with the Microsoft Agents SDK (@microsoft/agents-hosting and related packages). Trigger on any of these symptoms: build or TypeScript errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, .env configuration problems, Azure AD…

microsoft/Agents · 125 tokens

config

How to author a kubb.config.ts and pick the right @kubb/plugin- packages when generating TypeScript from an OpenAPI/Swagger spec. Use whenever setting up Kubb, adding a generator, or debugging codegen output.

kubb-labs/kubb · 49 tokens

agent-inspect

Local evidence debugger and trajectory-test toolkit for TypeScript AI agents. Use when capturing framework-faithful traces, asserting TraceContract/TraceFacts, packaging Evidence v2, or inspecting local runs over read-only MCP (gettracefacts).

rajudandigam/agent-inspect · 52 tokens

mintlify-api

Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.

mintlify/docs · 26 tokens