Agent skill · Audited from source
Test Generator
skill · laolaoshiren/claude-code-skills-zhMIT licenceAudited 19 Oct 2026 · source 7d69626375c6
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 7d69626375c6 and found no filesystem, network or shell access and no hard-coded secrets. What it does: 依据真实代码契约生成并验证单元测试或集成测试。用于用户要求为函数、类、接口或缺陷补测试、提高覆盖率、生成回归用例或完善测试策略时;先读取现有测试与调用方,不猜测空值、异常或超时行为,不自动安装框架或访问生产依赖。
Cite
Cite this page
ModelsAtlas. “Test Generator (laolaoshiren/claude-code-skills-zh)”. Retrieved 19 Oct 2026. https://modelsatlas.com/skills/laolaoshiren/test-generator
Trust audit
Audit 0.4.1 · source read 19 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 7d69626375c6 · 19 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherlaolaoshiren GitHub userOwner of the repository this skill is read from
- Source folderlaolaoshiren/claude-code-skills-zh/skills/test-generatorThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict7d69626375c6A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: 依据真实代码契约生成并验证单元测试或集成测试。用于用户要求为函数、类、接口或缺陷补测试、提高覆盖率、生成回归用例或完善测试策略时;先读取现有测试与调用方,不猜测空值、异常或超时行为,不自动安装框架或访问生产依赖。
--- name: test-generator description: 依据真实代码契约生成并验证单元测试或集成测试。用于用户要求为函数、类、接口或缺陷补测试、提高覆盖率、生成回归用例或完善测试策略时;先读取现有测试与调用方,不猜测空值、异常或超时行为,不自动安装框架或访问生产依赖。 --- # 测试生成器 ## 工作流程 ### 1. 读取真实契约 检查目标代码及其: - 类型定义、公开文档、调用方和错误处理路径。 - 现有测试、fixture、测试配置、依赖清单和项目测试命令。 - 输入输出、副作用、状态变化、并发语义和系统边界。 - 适用的仓库规则、Git 状态及本轮允许修改的范围。 区分“代码当前行为”和“产品期望行为”。两者冲突或契约不明确且会改变断言时,先列出证据与待确认假设;不要用测试固化猜测。 ### 2. 选择测试层级 - 纯逻辑优先使用快速、确定的单元测试。 - 在系统边界隔离时间、随机数、文件系统、网络或第三方服务,避免 mock 被测模块的内部实现。 - 需要验证真实组件协作时使用集成测试,可采用临时目录、测试数据库或受控服务,并确保资源隔离和清理。 - 修复缺陷时先写能复现真实问题的最小回归用例,再验证修复。 只覆盖契约或可达路径中真实存在的正常、边界与失败场景。空值、类型错误、超时和数据库异常不是每个函数的固定要求。 ### 3. 设计用例 每个用例应说明: - 对应的契约、缺陷或分支。 - 输入与环境安排。 - 可观察结果,而非内部实现细节。 - 必要的清理和跨用例隔离。 优先参数化重复场景,并沿用仓库现有的测试命名、目录、fixture 和断言风格。不要因项目面向中文用户而强制使用中文函数名。 ### 4. 实现最小测试 - 只修改目标测试文件和确有必要的 fixture。 - 不为了让测试通过而随意修改生产代码;若发现产品缺陷,单独报告或按用户要求修复。 - 不复制未经核实的示例期望值,也不把实现细节写成永久契约。 - Windows 与 Linux 使用路径 API、系统临时目录和显式编码,不硬编码分隔符、`/tmp`、换行、大小写、时区或 locale 行为。 ### 5. 运行与复验 1. 先运行新增或目标测试,确认失败信息与预期一致。 2. 先检查项目脚本是否会下载依赖、访问外部服务或改变共享状态,再按改动风险运行相关测试;必要时运行完整测试、类型检查或覆盖率命令,潜在外部副作用需先获授权。 3. 检查 Git diff,确认没有快照、缓存、覆盖率产物或无关文件。 4. 将基线已有失败与本轮新增失败分开记录。 没有实际运行时,只能说明“已生成、未验证”,不能声称测试通过。 ## 安全与授权边界 - 未经明确授权,不安装或升级测试框架,不修改 lockfile、全局测试配置、CI 或生产代码。 - 未经明确授权,不访问真实网络、生产数据库、云服务或含真实凭据的环境。 - 测试数据不得包含真实个人信息、Token、Cookie、密码或客户数据。 - 测试必须可重复,不依赖执行顺序,并清理创建的临时资源。 - 目标文件已有用户修改时,先检查是否重叠,避免覆盖。 ## 输出 ```markdown ## 测试补充结果 - 目标与契约依据: - 测试层级与框架: - 新增或修改文件: ## 用例 | 场景 | 契约依据 | 预期结果 | |------|----------|----------| ## 验证 - 实际命令与退出状态: - 相关测试 / 完整测试: - 基线已有失败: - 未验证假设与限制: ```
Excerpt, first 1,529 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 7d69626
git clone https://github.com/laolaoshiren/claude-code-skills-zh git -C claude-code-skills-zh checkout 7d69626375c6
The author documents no install command, so this uses the repository directly. Our verdict covers commit 7d69626375c6 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
7d69626375c6
Similar skills
All coding & review skills →laolaoshiren/claude-code-skills-zh
依据真实 OpenAPI、路由实现和现有测试生成并验证 API 测试。用于用户要求测试接口、补集成测试、验证 API 契约、生成回归用例或排查接口兼容性时;区分“生成测试”和“执行请求”的授权,不猜测状态码、响应结构或 SLA,不在未确认环境中发送写请求。
laolaoshiren/claude-code-skills-zh
Changelog 生成器 - 从 Git 历史自动生成 CHANGELOG
laolaoshiren/claude-code-skills-zh
数据库迁移助手 - Schema 对比、迁移脚本生成
laolaoshiren/claude-code-skills-zh
审计 Node.js、Python、Go、Rust、JVM、Ruby 项目的依赖漏洞、版本健康度与许可证事实;当用户要求检查 package.json、lockfile、requirements、go.mod、Cargo.toml、pom.xml、Gemfile.lock,或生成不改依赖的中文审计报告时使用
laolaoshiren/claude-code-skills-zh
项目目录结构地图 - 生成带说明的可视化目录树,快速理解任意代码库
laolaoshiren/claude-code-skills-zh
环境变量管理器:扫描、校验、同步 .env 文件,生成安全配置模板
Questions about Test Generator
What does the Test Generator skill do?
Is Test Generator safe to install?
What can Test Generator access on my machine?
How current is this page?
Sources
- github.com/laolaoshiren/claude-code-skills-zh/tree/main/skills/t — the audited source at commit 7d69626375c6 and every finding aboveObserved · 19 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Test Generator skill do?
- Is Test Generator safe to install?
- What can Test Generator access on my machine?