HelloTest — Security skill for Claude Code
给 AI 写出来的项目做体检,并守住「只许变好」:一个零依赖的 Python 脚本,调用 TypeScript、Pyright、ESLint、Knip、jscpd、Ruff、Vulture、pip-audit 等现成工具(各按原许可证),外加 7 个阶段的治理流程.
How to install HelloTest
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open hidevinliu/HelloTest and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What HelloTest does
给 AI 写出来的项目做体检,并守住「只许变好」:一个零依赖的 Python 脚本,调用 TypeScript、Pyright、ESLint、Knip、jscpd、Ruff、Vulture、pip-audit 等现成工具(各按原许可证),外加 7 个阶段的治理流程。
Alternatives in Security
- Azure Key Vault Python — Azure Key Vault for Python 1.8k ★
- SEO Audit Skill — English · 中文 可复用的单页面 SEO 审计 Agent Skill 235 ★
- AWS MCP Server — by alexei-led - Features multiple Python environment setup options with detailed code style guidelines, compre 182 ★
README
HelloTest
**给 AI 写出来的项目做「体检」,再守住「只许变好」。**
AI 编程写得很快,项目大了以后常常变成「修 bug 像打地鼠」:类型错误、死代码、重复代码越积越多,改一处冒一处。HelloTest 做两件事:
- 体检:自动识别项目的技术栈,调用现成的检查工具,把结果汇总成一份中文报告和一组数字指标。
- 只许变好:把这次体检的数字存成基线。以后每次提交都重测一遍,任何一项指标变多就判失败。存量问题不要求一次清零,但不许再变多。
它是一个 Python 脚本(`scripts/gov_audit.py`,只用标准库,不用装依赖),外加一套 7 个阶段的治理流程。这套流程写成了 Claude Code / Codex 能直接读的 skill(`SKILL.md`)。
在本机,这个 skill 的内部名字是 `project-governance`,对 agent 说「体检一下这个项目」就会触发。
用法
# 体检:不改代码,报告写到 <项目>/.governance/
python3 scripts/gov_audit.py audit --root <项目> --save-baseline
# 排除生成代码、测试样本等目录(排除规则会存进基线)
python3 scripts/gov_audit.py audit --root <项目> --exclude generated tests/fixtures --save-baseline
# 每次提交前、CI 里:只许变好
python3 scripts/gov_audit.py ratchet --root <项目>
# 退出码 0 = 没有指标变多,可以合并
# 退出码 1 = 有指标变多,拒绝合并
# 退出码 2 = 有指标这次没测出来,无法判断(不算通过)
# 指标变少以后,把基线往下调(只降不升)
python3 scripts/gov_audit.py ratchet --root <项目> --update
检查工具通过 `npx` / `uvx` 临时运行,第一次要联网下载。项目里已经装了的,优先用项目自己的版本。JS 项目先装好依赖(`node_modules`)再体检,否则类型检查和死代码的结果不准。
查哪些指标
全部是「越少越好」:
| 指标 | 用什么工具查 |
|---|---|
| TypeScript 类型错误 | TypeScript(tsc --noEmit) |
| ESLint 问题(错误 + 警告) | ESLint |
| JS/TS 死代码候选(没用到的文件、导出、依赖) | Knip |
| npm 高危和严重漏洞 | npm audit / pnpm audit |
| Python 类型错误 | Pyright |
| Python lint 问题 | Ruff |
| Python 死代码候选 | Vulture |
| Python 依赖的已知漏洞 | pip-audit |
| 重复代码行数 | jscpd |
| 超过 500 行的代码文件数 | 脚本自己数 |
项目里没有对应语言的,就跳过那一项。工具没跑起来时,报告里如实写「失败」,不会当成 0。
用了谁的东西
**HelloTest 自己的代码只有脚本、测试、流程文档和模板。** 下面这些工具都不在这个仓库里,也不随它分发;体检时脚本在你的电脑上调用它们,版权归各自作者,按各自的许可证使用:
| 工具 | 作者 | 许可证 | 在 HelloTest 里做什么 |
|---|---|---|---|
| TypeScript | Microsoft | Apache-2.0 | 类型检查 |
| Pyright | Microsoft | MIT | Python 类型检查 |
| Playwright | Microsoft | Apache-2.0 | 流程第 2 阶段推荐用它写核心流程测试;脚本本身不调用 |
| ESLint | OpenJS Foundation 及贡献者 | MIT | JS/TS lint |
| [Knip](https://github.com/webpro-nl/k |
Related Skills
Auto Package Migration
A Claude Code Skill that automates package upgrades, CVE remediation, and Jira-driven dependency maintenance a
Agentlinter
ESLint for AI Agents — AGENTS.md/CLAUDE.md 채점·진단·자동수정 Position Risk Warning · Token Efficiency · Security Chec
Dx Report
Generate a DX report (format/lint/docs/types/tests/build/deps/audit/knip), summarize results, and optionally c
Deadcode Plan
Dead-code audit — configured Knip baseline plus ratchet plan, delete nothing until approved
Motion Preflight QA
Free AI agent skill for code-based motion graphics QA — 8-gate FFmpeg broadcast audit, 6-frame Reels/TikTok/Sh
React With AI
A comprehensive CLAUDE.md template for modern React projects. Drop it in and Claude Code automatically follows
Related Agents
Verifier Deterministic
Consolidated deterministic verification agent. Executes all tool-driven checks (gitleaks, ruff, pip-audit, pyt
Windows Env Auditor
Use this agent when the user asks for a Windows environment audit, when commands like python / pip / start fai
Fec TypeScript Reviewer
TypeScript/JavaScript special review: type safety, async correctness, Node/Web safety, idioms. Run the project