knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses

knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses is a skill for Claude Code, Codex from echoVic/blade-code. It costs 184 tokens per session (2,459 once invoked), scanned A, original, MIT.

A testing guide for the CLI and web interfaces, covering unit, integration, end-to-end, and real-process test setup with shared fixtures and cleanup.

In plain words
What is it for?
Use it when adding or moving tests, debugging concurrency or timeout failures, or managing test subprocesses and isolated storage.
Why use it?
It helps prevent mock pollution, timing differences, leftover processes, and temporary-file leaks from making tests unreliable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

agentmods
npx agentmods add skills/echovic/blade-code/unit-integration-and-shared-test-harnesses
Any agent
npx skills add echoVic/blade-code --skill unit-integration-and-shared-test-harnesses
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

Made for: Claude Code, Codex.

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 knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/blade-code/unit-integration-and-shared-test-harnesses.svg)](https://agentmods.dev/skills/echovic/blade-code/unit-integration-and-shared-test-harnesses)
Your own site
<a href="https://agentmods.dev/skills/echovic/blade-code/unit-integration-and-shared-test-harnesses"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/unit-integration-and-shared-test-harnesses.svg" alt="Measured on agentmods" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,459 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00184 $0.02459
Opus 5 $0.00092 $0.01229
Sonnet 5 $0.00037 $0.00492
Haiku 4.5 $0.00018 $0.00246

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

Security

Grade A, and why

knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses scanned grade A with 1 finding 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- 普通 setup 会 mock `fs`、`child_process`、`axios`、`ws`、`http` 和 `https`;需要验证真实 I/O 的 integration 测试必须显式 `vi.unmock` 或进入 real-api setup,否则“集成”断言可能只覆盖 mock (`packages/cli/tests/support/setup.ts`, `packages/cli/tests/integrati
.trae/knowledges/engineering-quality-and-delivery/unit-integration-and-shared-test-harnesses/SKILL.md · 87 lines

How it starts

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

Module Structure

测试层由 Vitest project 负责选择文件,由包装脚本负责环境和进程所有权;CLI 与 Web 共用部分 setup,但真实 API 使用单独的无 mock setup。

Directory Layout

  • packages/cli/tests/unit/ — 细粒度状态机、服务、工具、协议与表面投影回归
  • packages/cli/tests/integration/ — 跨模块与真实子进程集成;real-api/cli/ 被独立 project 接管
  • packages/cli/tests/e2e/ — 本地 fixture 与模拟流程测试
  • packages/cli/tests/support/ — setup、mock、跨表面 driver、PTY/ACP/Web runner 与清理 helper
  • packages/cli/tests/fixtures/ — 可由测试子进程执行的最小场景
  • packages/cli/web/tests/ — Web 组件、Store、服务与 bundle 测试
  • packages/cli/scripts/test*.js — 项目选择、测试子进程、超时、环境隔离和 owner watchdog

Key Entry Points

  • packages/cli/vitest.config.ts — CLI 测试项目、pool、并发、setup 与超时
  • packages/cli/web/vitest.config.ts — Web 依赖去重、alias 与默认 Node 环境
  • runTest() in packages/cli/scripts/test.js — 包装 Vitest 并创建进程级临时根
  • runOwnedCommand() in packages/cli/scripts/test-runner.js — 启动独立进程组并在 timeout/abort 时回收整棵树
  • packages/cli/tests/support/setup.ts — 普通项目的全局 mock 和 test-file 存储根
  • packages/cli/tests/support/setup.real-api.ts — 保留生产文件、子进程与网络实现的真实 API setup

Branching Table

维度 分支 A 分支 B
执行入口 test:<type>scripts/test.js 获得 TMPDIR 隔离、总超时和 owner watchdog test:all/test:watch 直接调用 Vitest,不经过该进程包装层
运行环境 本地 unit 使用最多 4 个 thread worker 和文件并行 CI=true 将共享 pool 收窄为单 worker、关闭文件并行
项目隔离 unit/CLI/performance/snapshot 使用 threads integration/E2E/security/real-api 使用 forks,integration 与 real-api 还固定串行
全局 setup unit/integration/CLI/E2E/security 等加载 setup.ts 的基础设施 mock real-api 只加载 setup.real-api.ts,保持真实文件、进程与网络
文件归属 generic integration 显式排除 integration/cli/integration/real-api/ CLI 和 real-api 由各自 project、超时和 setup 独立运行
Web DOM Web project 默认 environment: node 需要 DOM 的文件用 @vitest-environment jsdom 局部切换
存储所有权 未设置 BLADE_STORAGE_ROOT 时 setup 创建并注册清理 调用方显式设置时保持 caller-owned,setup 不删除

Affected Scope

  • packages/cli/tests/unit/ — 受全局 mock、thread pool、15 秒默认 timeout 和文件隔离影响
  • packages/cli/tests/integration/ — 受 fork 串行执行、真实子进程显式 unmock 和 30 秒 project timeout 影响
  • packages/cli/tests/e2e/ — 叠加普通 setup 与 E2E setup,当前仍包含 mock/占位场景
  • packages/cli/tests/support/ — 跨表面 driver、临时根、mock 和进程清理的共享实现
  • packages/cli/web/tests/ — 复用 CLI setup,并依赖 React/Zustand 去重与按文件 jsdom
  • packages/cli/scripts/test.js — 为按类型运行建立进程级环境与超时
  • packages/cli/scripts/test-runner.js — 决定 timeout、abort 和父进程硬退出后的进程树回收
  • packages/cli/vitest.config.tspackages/cli/web/vitest.config.ts — 文件选择、pool、retry、coverage 与 alias 的最终配置

Read the full file on GitHub · 87 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. 3d ago First seen · 87 lines · 184 tokens per session scan A dfef87701390

Subscribe to this mod's changes

knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed today), licensed MIT. It adds 184 tokens to every session and 2,459 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

test-writing

Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.

KarmaloopAI/Jiva · 35 tokens

dogfood

Exploratory QA of web apps: find bugs, evidence, reports.

StarryCod/cogitum · 18 tokens

tdd-workflow

Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

affaan-m/ECC · 43 tokens

langbot-testing

Test LangBot WebUI and core product flows with an automated browser and backend logs. Use when validating the configured LangBot frontend, pipeline Debug Chat, model provider setup and test buttons, bot and knowledge-base UI flows, or troubleshooting failed LangBot end-to-end tests.

langbot-app/LangBot · 58 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…

samber/cc-skills-golang · 97 tokens