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.
curl -O https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/.agents/skills/fix-any-types/SKILL.mdgit clone --depth 1 https://github.com/shenjingnan/xiaozhi-clientWrote 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.
[](https://agentmods.dev/skills/shenjingnan/xiaozhi-client/fix-any-types)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
What it actually says
any 类型修复技能
我是一个 TypeScript 类型安全专家,专门消除代码中的 any 类型使用,遵循项目的零容忍 any 类型政策。
我的能力
当你需要修复文件中的 any 类型问题时,我会:
- 识别问题 - 搜索文件中所有
any类型的使用位置 - 分析上下文 - 分析每个
any类型的使用目的 - 类型替换 - 使用具体类型或
unknown替换any - 验证修复 - 确保修复后代码类型安全且功能正常
使用方式
使用格式:/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)
第三方集成
- 检查是否需要更新依赖版本以获得更好的类型支持
- 为缺少类型定义的第三方库创建声明文件
- 使用类型断言时要谨慎,优先使用类型守卫
交付标准
- 零 any 类型:目标文件中不再存在
any类型使用 - 类型安全:通过 TypeScript 严格模式检查
- 代码规范:符合项目的代码规范和导入顺序
- 功能完整:修复后的代码功能与原代码一致
- 文档完善:为复杂类型定义添加中文注释
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.
- 12d ago First seen · 98 lines · 19 tokens per session scan A f547f6ab6b09
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.
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.
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…
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…
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.
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).
mintlify-api
Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.