test-generation-execution

test-generation-execution is a skill for Claude Code, Codex from protect-my-hair/nucleus-marketplace. It costs 37 tokens per session (1,372 once invoked), scanned A, original, MIT.

A workflow for proposing and running unit, API, and integration tests inside the Nucleus V2 coding-agent system.

In plain words
What is it for?
Generating candidate test files, requesting approval to write them, executing approved test commands, and producing test reports.
Why use it?
It prevents tests from being written or run without the required review and human approval, while preserving reports as evidence.

Skill for Claude CodeCodex

Written for Claude Code and Codex: SessionStart hook event, but also agents/openai.yaml present. Also seen: names the TodoWrite tool; mentions Claude Code; mentions Codex.

Part of the nucleus plugin — 27 skills, 1 agent, 1 hook shipped together

Good fit Generating candidate test files, requesting approval to write them, executing approved test commands, and producing test reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/protect-my-hair/nucleus-marketplace/test-generation-execution
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add protect-my-hair/nucleus-marketplace --skill test-generation-execution
Clone the repo
git clone --depth 1 https://github.com/protect-my-hair/nucleus-marketplace

Made for: Claude Code, Codex.

Or install nucleus, the plugin that ships this one along with the rest of its 27 skills, 1 agent, 1 hook.

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 test-generation-execution

README.md
[![agentmods](https://agentmods.dev/badge/skills/protect-my-hair/nucleus-marketplace/test-generation-execution/github.svg)](https://agentmods.dev/skills/protect-my-hair/nucleus-marketplace/test-generation-execution)
Your own site
<a href="https://agentmods.dev/skills/protect-my-hair/nucleus-marketplace/test-generation-execution"><img src="https://agentmods.dev/badge/skills/protect-my-hair/nucleus-marketplace/test-generation-execution/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 test-generation-execution

Your own site · 80×15
<a href="https://agentmods.dev/skills/protect-my-hair/nucleus-marketplace/test-generation-execution"><img src="https://agentmods.dev/badge/skills/protect-my-hair/nucleus-marketplace/test-generation-execution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,372 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.00037 $0.01372
Opus 5 $0.00018 $0.00686
Sonnet 5 $0.00007 $0.00274
Haiku 4.5 $0.00004 $0.00137

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

Security

Grade A, and why

test-generation-execution 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/test_generation_execution.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/nucleus/skills/test-generation-execution/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Generation and Execution

前置:使用本 Skill 前,先按 using-nucleus 完成 Nucleus 入口识别(Claude Code 会话由插件 SessionStart hook 自动注入该纪律)。

本 Skill 用于 Nucleus V2 的测试资产生成与测试执行 baseline。它安装在 Claude Code、Codex 等 coding agent 内部使用,不是 PMS 后端,也不是独立服务。

核心原则

测试资产写入和测试命令执行必须先有明确人工审批事实;approval JSON、测试报告和 result package 只能记录证据,不能替代宿主任务、人工审批或质量放行。

缺少 test-asset-write-approval 明确审批事实,不得写正式 tests/**

缺少 test-command 明确审批事实,不得执行任何测试命令。

请求测试资产写入审批或测试命令审批前,必须先按对应 subagentPreReview 调度独立 reviewer 子代理;未取得“材料可提交人工审查”预审结论时,不得请求人工审批。

测试报告、summary 或 result 不能替代测试资产审批、测试命令审批、人工 review、缺陷创建、PR/MR 审查、合入或发布事实。

Checklist

启动本 Skill 后,必须先为以下每一项创建宿主 todo/task,并按顺序执行;Codex 使用计划 / 任务工具,Claude Code 使用 TodoWrite 或等价宿主 todo。每完成、阻塞、等待审批或需要复核一项,都必须逐项更新状态。

  1. 读取测试上下文:读取 .nucleus/context/<workflowRunId>.json、primary feature 和 feature development plan;缺关键输入时 ALERT_AND_BLOCK
  2. 创建宿主任务包:把本 checklist 同步成当前会话的宿主 todo/task;未同步前不得生成测试资产或执行命令。
  3. 生成测试资产候选:只生成 test-asset-candidate.*,不得直接写正式 tests/**
  4. 呈现候选并等待写入审批:向用户或 PMS 呈现 planned test paths、归属特性和变更范围;缺 test-asset-write-approval 时 STOP。
  5. 校验测试归属:确认候选和审批覆盖所有 planned test paths,并校验 Nucleus.featurePath 归属。
  6. 呈现测试命令并等待审批:说明 unit / api / integration baseline 命令、cwd 和 argv;缺 test-command 时 STOP。
  7. 执行 baseline 测试:只执行已审批且命中 allowlist 的测试命令,并写 .nucleus/tests/<workflowRunId>/** report。
  8. 写入结果证据:构建 .nucleus/runs/<workflowRunId>/result.json;测试报告和 result 不能替代宿主任务、人工审批或质量放行。

边界

  • 只支持 unitapiintegration 三类 baseline 测试。
  • generate 写正式 tests/** 前必须读取 test-asset-write-approval.json,且 approval 覆盖所有 planned test paths。
  • run 只读取 test-command.json 作为 approval fact,命令必须命中 baseline test runner allowlist,并使用 shell=False 执行。
  • 测试报告只写 .nucleus/tests/<workflowRunId>/**
  • result package 只写 .nucleus/runs/<workflowRunId>/result.json
  • 失败或阻塞时 defectArtifacts=[],不得创建缺陷或写 docs/requirement/**/defects/**
  • 不 commit、push、创建 PR/MR、merge、release。
  • UI/E2E/Playwright 真实执行不属于 baseline。

Read the full file on GitHub · 100 lines

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 · 100 lines · 37 tokens per session scan A 81cb5ba91c1e

Subscribe to this mod's changes

test-generation-execution is a skill published in the GitHub repository protect-my-hair/nucleus-marketplace (162 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,372 once invoked, about $0.0002 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.