跳到正文
Skillpedia
通用编程13k · #11390

react-doctor

它能做什么

它运行一个扫描器,检查 React 代码中的安全、性能、正确性和结构问题。适用于希望在提交更改前保持 React 应用健康的开发者。

适用场景

  • ✓当你完成一个 React 功能或错误修复,想在提交前检查时。
  • ✓当你想彻底清理 React 项目中的警告时。
  • ✓当你输入 /doctor 以开始对 React 问题进行完整分诊时。

技能链接

https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/react-doctor/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/react-doctor/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请扫描我的 React 应用,并优先修复最严重的问题。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会运行 react-doctor 扫描器,它会给出 0 到 100 的健康评分,然后按严重程度从高到低处理问题。对于完整的分诊,它会遵循该工具的在线操作手册。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

React Doctor

Scans React codebases for security, performance, correctness, and architecture issues. Outputs a 0–100 health score.

After making React code changes:

Run npx react-doctor@latest --verbose --scope changed and check the score did not regress.

If the score dropped, fix the regressions before committing.

For general cleanup or code improvement:

Run npx react-doctor@latest --verbose (the default --scope full) to scan the full codebase. Fix issues by severity — errors first, then warnings.

/doctor — full local triage workflow

When the user types /doctor, says "run react doctor", or asks for a full triage / cleanup pass (not just a regression check), fetch the canonical local-triage playbook and follow every step in it:

curl --fail --silent --show-error \
  --header 'Cache-Control: no-cache' \
  https://www.react.doctor/prompts/react-doctor-agent.md

The playbook is the single source of truth — a scan → filter → triage → fix → validate loop that edits the working tree directly (never commits, never opens PRs). Updating the prompt at its source updates every agent on its next fetch — no skill reinstall needed.

Pair it with the matching per-rule prompts at https://www.react.doctor/prompts/rules/<plugin>/<rule>.md (fetched on demand inside the playbook) so each fix uses the canonical, reviewer-tested recipe.

Configuring or explaining rules

When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code), read references/explain.md and follow it. Start with npx react-doctor@latest rules explain <rule>, then apply the narrowest control via npx react-doctor@latest rules disable|set|category|ignore-tag …, which edits your doctor.config.* (or package.json#reactDoctor).

Command

npx react-doctor@latest --verbose --scope changed
Flag Purpose
. Scan current directory
--verbose Show affected files and line numbers per rule
--scope changed Only report issues introduced vs the base branch (default: full)
--scope lines Only report issues on the changed lines
--score Output only the numeric score
常见问题

它需要先安装吗?

不需要。它通过 npx 运行,所以智能体在运行时才会获取扫描器。

它会把更改提交到 git 吗?

不会。完整分诊流程只编辑工作文件,从不提交或发起拉取请求。

这个评分是什么意思?

它是一个 0 到 100 的健康评分。修改后,智能体会检查评分没有下降。

详情

作者的原始描述

Use when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.

repo: humanlayer/humanlayer

热度

GitHub 星标
13k
排名
#11390
许可证
Apache-2.0
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能