Token导航 LogoToken导航

Agent Skill · 研究检索

full-test-coverage(完整的测试覆盖率)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

full-test-coverage 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 66,724。

总安装 259周安装 11GitHub Stars 1下载 91核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:full-test-coverage(完整的测试覆盖率)
来源仓库:https://github.com/tech-stack-dev/full-test-coverage
仓库路径:skills/full-test-coverage
安装命令:
npx skills add https://github.com/tech-stack-dev/full-test-coverage --skill full-test-coverage
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tech-stack-dev/full-test-coverage --skill full-test-coverage

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

full-test-coverage 用于辅助测试设计、自动化测试、用例整理和回归验证,适合让 Agent 编写单元测试或端到端测试。适用于需要提升测试覆盖率或验证功能稳定性的场景。使用时需确认项目测试框架、运行命令和夹具数据,避免误改真实逻辑。涉及浏览器或外部服务时,应区分本地模拟与生产环境。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/full-test-coverage

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tech-stack-dev/full-test-coverage --skill full…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

full-test-coverage 怎么安装?

在终端执行 npx skills add https://github.com/tech-stack-dev/full-test-coverage --skill full-test-cove…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

full-test-coverage 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

full-test-coverage 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

full-test-coverage 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

full-test-coverage 用的人多吗?

公开数据是累计安装 259 次,近一周安装 11 次,下载 91 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

full-test-coverage 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
full-test-coverage

完整的测试覆盖率 · 本页

2591操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Full Test Coverage — Test Generation

Generate the right tests for every layer of the testing pyramid: unit, integration, API, and E2E. The skill analyzes the code, selects the correct layers, and implements each one following strict guidelines.

Testing Pyramid

        ╔═══════════════════════╗
        ║    E2E Tests          ║  Playwright browser · user journeys
        ╠═══════════════════════╣
        ║  API Tests            ║  Playwright HTTP · HTTP contracts
        ╠═══════════════════════╣
        ║Integration            ║  Vitest + Prisma · every branch with real DB
        ╠═══════════════════════╣
        ║  Unit Tests           ║  Vitest · isolated logic, no I/O
        ╚═══════════════════════╝

Layer Responsibility Matrix

Each concern is owned by exactly one layer. Do not duplicate responsibilities.

ConcernUnitIntegrationAPIE2E
Zod field exhaustive validationOwner1–2 wiring checks1 per endpointNo
Service method branchesOwner (mocked deps)Owner (real DB)NoNo
Pure utility functionsOwnerNoNoNo
Mock call argument verificationOwnerNoNoNo
HTTP contract (status codes, body)NoNoOwnerNo
Write verification (POST→GET, DELETE→404)NoNoOwnerNo
Authorization enforcement (401, 403)NoOwnerOwnerNo
External service calls (mocked)Owner (vi.mock)Owner (Wiremock)NoNo
DB persistence verificationNoOwnerNoNo
Complete user journey through UINoNoNoOwner
Navigation and routingNoNoNoOwner

Step 1: Analyze the Code

Before selecting layers or writing any tests, read the target code.

First, discover the full scope. Use the Explore agent (subagent_type=Explore, thoroughness="very thorough") with the following prompt:

"Find all source files related to [domain keyword] in this repository. Search comprehensively: - Files and directories whose name contains the keyword in any case variant (kebab-case, camelCase, snake_case) - Files anywhere in the repo whose content references the domain — route registrations, class names, import paths - HTTP route handlers, service classes, Zod schemas/DTOs, utility modules, serverless/Lambda handlers, shared infrastructure - Follow import chains from every file found to include referenced schemas, services, clients, and error definitions Do not restrict the search to src/ or any assumed directory. Return a complete list of files with a one-line description of each."

Use the returned file list as the scope for all subsequent steps.

Then read:

  • Zod schemas / DTOs
  • Service classes (regardless of naming prefix)
  • Route and request handlers
  • Utility and shared modules
  • DB schema (prisma/schema.prisma)
  • Error definitions
  • External service clients (if any)
  • UI components / pages (if any — look for data-testid attributes)

Build an inventory:

  • Schemas found: *list field names and rules*
  • Service methods found: *list method names and their dependencies*
  • HTTP endpoints found: *list METHOD /path*
  • Utility functions found: *list exported functions*
  • External service calls found: *list service names*
  • UI pages found: *list page URLs*

Write a one-paragraph summary: "This module has X schemas, Y service methods, Z endpoints... Recommended layers: [list]."


Step 2: Select Layers

Apply this decision tree after completing Step 1:

Does the code have Zod schemas or pure utility functions?
  YES → Unit tests required (always the baseline layer)

Does the code have service methods with branches (if/else, switch, throw)?
  YES → Unit tests (mocked) + Integration tests (real DB) required
  Why: unit tests prove logic; integration tests prove wiring with real DB.
        Together they are not redundant — they cover different failure modes.

Does the code expose HTTP endpoints?
  YES → API tests required (one spec file per endpoint)

Does the code have browser UI with data-testid attributes?
  YES → E2E tests required (one spec per feature area)

Common combinations:

  • Pure utility library → Unit only
  • Backend service, no UI → Unit + Integration + API (if endpoints exist)
  • Full-stack feature → All four layers

State explicitly which layers are selected and which are skipped with a reason: *"Skipping E2E: no browser UI found in this module."*


Step 3: Generate Tests, Layer by Layer

Work bottom-up. Generate unit tests first, then integration, then API, then E2E. Complete and self-validate each layer before moving to the next.

If Unit tests are selected:

Read references/unit-testing.md before writing any code.

Key steps:

  1. Read schemas, service, utils, errors
  2. Map every field × rule and every service branch as a case tree (write as comments first)
  3. Create schema.helper.ts and <domain>.unit-factory.ts
  4. Write schema tests (one describe per field, one it() per rule)
  5. Write service tests (all branches mocked, exact mock argument verification)
  6. Write utility tests (if applicable)
  7. Run: vitest run src/modules/<domain>/test/unit/
  8. Run self-validation checklist from the reference file

If Integration tests are selected:

Read references/integration-testing.md before writing any code.

Key steps:

  1. Read source + auth implementation + error response shape (determines assertion format)
  2. List every execution path as comments inside describe blocks
  3. Create DatabaseHelper, AuthHelper, fixtures, api-utils
  4. Write handler tests (1–2 validation wiring tests per endpoint — no exhaustive Zod rules)
  5. Write service layer tests (direct calls, real DB)
  6. Run: yarn test:integration (or equivalent)
  7. Run self-validation checklist from the reference file

If API tests are selected:

Read references/api-testing.md before writing any code.

Key steps:

  1. Read route handlers, DTOs, error definitions
  2. Verify/create response helpers for all error codes
  3. Create test-owned factory (never import backend DTOs)
  4. Create API utilities (one function per endpoint)
  5. Create cleanup utilities
  6. Write test specs: plan scenarios as comments first, then implement
  7. Run: npx playwright test --project=api
  8. Run self-validation checklist from the reference file

If E2E tests are selected:

Read references/e2e-testing.md before writing any code.

Key steps:

  1. Read PRD, page components (data-testid attributes), existing fixtures
  2. Identify user flows (one spec file per feature area)
  3. Create or update Page Object Models (locators via data-testid only)
  4. Create test data factory with counter + timestamp + random pattern
  5. Create API-based setup helper and cleanup helper
  6. Write test specs (API setup, inject auth, navigate, UI interaction, assert)
  7. Run: npx playwright test --project=chromium
  8. Run self-validation checklist from the reference file

Universal Patterns

These apply at every layer. Do not repeat in reference files.

Unique test data

let counter = 0;
function uniqueSuffix(): string {
  counter++;
  return `${counter}-${Date.now()}-${Math.floor(Math.random() * 100000)}`;
}
// Usage: `test-user-${uniqueSuffix()}@test.com`

Why: parallel test runs share a database. Non-unique data causes false failures when one test's cleanup deletes another test's records.

Arrange-Act-Assert

Every test follows this exact structure:

// Arrange — set up state
const cookie = await authenticateUser(request);
const dto = generateCreateNoteDto();

// Act — execute the behavior
const response = await executePostNoteRequest(request, dto, cookie);

// Assert — verify the result
expect201Created(response);
expect(response.data.title).toBe(dto.title);

Cleanup in afterEach

// ✓ Correct — runs even when test throws
test.afterEach(async ({ request }) => {
  for (const cookie of cookiesToCleanup) {
    await cleanupNotes(request, cookie);
    await cleanupUser(request, cookie);
  }
  cookiesToCleanup.length = 0;
});

// ✗ Wrong — skipped when test throws before reaching cleanup
test("...", async ({ request }) => {
  const cookie = await authenticateUser(request);
  // ...
  await cleanupUser(request, cookie); // This line may never run
});

No shared state between tests

  • No beforeAll for shared data
  • No shared auth sessions
  • Each test creates its own user and test entities

No static waits

// ✗ Forbidden at all layers
await new Promise(resolve => setTimeout(resolve, 1000));
await page.waitForTimeout(5000);

// ✓ Use explicit conditions instead
// API/Integration: poll with 400ms interval, 15s timeout
// E2E: locator.waitFor(), page.waitForURL(), expect(locator).toBeVisible()

No snapshot tests

.toMatchSnapshot() and .toMatchInlineSnapshot() are forbidden at all layers. Snapshots hide intent and produce opaque diffs.

No hardcoded URLs

Always use relative paths. Playwright's baseURL from config handles environment switching.


Reference File Guide

When generating tests for a layer, read the corresponding reference file first. Each file includes the full workflow, verbatim templates, and a self-validation checklist.

FileContainsKey templates
references/unit-testing.md8-step workflow, Zod test patterns, mocking rulesschema.helper.ts, unit factory, service test structure
references/integration-testing.md5-step workflow, parallel-safe cleanup, validation wiringDatabaseHelper, AuthHelper (both variants), fixture structure
references/api-testing.md8-step workflow, test-owned interfaces, write verificationauthenticateUser(), API utilities, response helpers, per-endpoint test counts
references/e2e-testing.md9-step workflow, POM rules, waiting strategycreateUserViaApi(), injectAuthCookie(), Page Object Model, 5 wait patterns

Cross-Layer Checklist

After all layers are complete, verify the pyramid is correctly shaped:

No layer duplication:

  • Unit tests cover Zod field validation exhaustively — integration/API/E2E do not
  • Integration tests have only 1–2 validation wiring tests per endpoint
  • API tests have only 1 validation test per endpoint
  • E2E tests cover user journeys and navigation — no field validation

Pyramid shape (count tests per layer):

  • Unit tests cover the most cases — exhaustive per field and per branch
  • Integration tests are fewer — only real DB wiring and auth paths
  • API tests are fewer still — one spec per endpoint
  • E2E tests are the fewest — one spec per user journey

All self-validation checklists were run:

  • Unit layer checklist ✓
  • Integration layer checklist ✓
  • API layer checklist ✓
  • E2E layer checklist ✓

Cross-Layer Examples

The same "notes" domain — showing exactly how coverage is divided, not duplicated.

Testing a title field (min 1, max 255, required)

LayerWhat to testTest count
Unitmissing, undefined, null, empty string, min boundary (1 char ✓), max boundary (255 chars ✓), 256 chars ✗, wrong type (number)8+ tests
Integrationone representative: missing title → 400 VALIDATION_ERROR (proves Zod is wired)1 test
APIone representative: missing title → 400 (verifies HTTP contract)1 test
E2Enothing — E2E tests do not test field validation0 tests

Testing a notFound service branch

LayerWhat to test
Unitmock prisma.note.findUnique to return null → verify Errors.notFound() thrown; verify downstream mocks NOT called
Integrationrequest with a real non-existent ID in DB → verify 404 response with correct NOT_FOUND code
APIGET /api/notes/:nonExistentId → verify 404 with correct error body
E2Enothing — E2E tests don't test error branches

Testing an authorization rule

LayerWhat to test
Unitmock prisma.note.findUnique to return a note with organizationId: "other-org" → verify Errors.forbidden() thrown; verify update mock NOT called
Integrationuser B requests note owned by user A's organization → verify 403 FORBIDDEN response and DB unchanged
APIuser B requests note owned by user A → verify 403 response
E2Everify user B cannot see user A's notes in the UI (data isolation test)

Completion

After all layers are generated, provide:

File inventory per layer:

LayerFiles createdRun command
Unit<domain>.schema.test.ts, <domain>.service.test.ts, schema.helper.ts, <domain>.unit-factory.tsvitest run src/modules/<domain>/test/unit/
Integration<endpoint>.test.ts (×N), <domain>.service.test.ts, database.helper.ts, auth.helper.ts, <domain>.fixture.ts, api-utilsyarn test:integration
API<method>-<endpoint>.spec.ts (×N), <domain>.factory.ts, <domain>.api-utils.ts, <domain>.cleanup.tsnpx playwright test --project=api
E2E<domain>.<feature>.spec.ts, <domain>.page.ts, <domain>.factory.ts, setup.ts, cleanup.tsnpx playwright test --project=chromium

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

平台分布

Codex

33.9%
按下载量换算31

Claude

30.06%
按下载量换算27

Cursor

19.62%
按下载量换算18

Gemini CLI

10.45%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills