Token导航 LogoToken导航

Agent Skill · 研究检索

the-standard-testing(标准测试)

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

the-standard-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 9,681。

总安装 13,789周安装 559GitHub Stars 17下载 3,305核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:the-standard-testing(标准测试)
来源仓库:https://github.com/hassanhabib/the-standard-skills
仓库路径:skills/the-standard-testing
安装命令:
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Testing'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Testing'

这个 Skill 是做什么的

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

the-standard-testing 用于辅助测试设计、自动化测试、用例整理和回归验证,适合让 Agent 编写测试或分析失败日志。适用于单元测试、端到端测试、测试计划生成和问题定位等场景。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

使用时需确认项目测试框架、运行命令和夹具数据,避免误改真实逻辑。涉及浏览器或外部服务时,应区分本地模拟与生产环境。

来源仓库内路径:skills/the-standard-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The S…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

the-standard-testing 怎么安装?

在终端执行 npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Te…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

the-standard-testing 支持哪些 AI 工具?

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

the-standard-testing 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

the-standard-testing 是免费的吗?

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

the-standard-testing 用的人多吗?

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

the-standard-testing 安全吗?

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

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
the-standard-testing

标准测试 · 本页

13,78917需要联网未明确通过

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

SKILL.md 原文

The Standard Testing

What this skill is

This skill governs how The Standard is tested, verified, and proven. It covers test-driven development, validation strategies, exception mapping, unit test structure, controller tests, and UI component tests.

Explicit coverage map

This skill explicitly covers:

  • Foundation-service implementation and validation/testing patterns from the Services chapter
  • Structural, logical, external, and dependency validation testing
  • Exception mapping and category testing
  • Processing-service testing responsibilities
  • Orchestration-service call-order testing
  • Aggregation-service testing restrictions
  • REST controller unit and acceptance tests
  • UI component testing for bases, core components, and pages
  • The supplied implementation specification sections on unit testing, partial test organization, conventions, AAA, and test order
  • TDD FAIL/PASS discipline relevant to test creation and implementation verification

When to use

Use this skill whenever writing, reviewing, expanding, fixing, or sequencing tests. Use it whenever deciding what to test first, how to map exceptions in tests, or how to prove a Standard-compliant flow.

Core testing doctrine

  1. Follow TDD.
  2. Write the failing test first.
  3. Verify the test actually fails.
  4. Write the minimum implementation required to pass.
  5. Verify the full relevant suite passes.
  6. Refactor without changing behavior.
  7. Repeat.

Validation testing rules

Validation Source of Truth

  1. Validation rules MUST be inferred from all authoritative sources:

- Foundation service business rules - Storage-layer configuration (StorageBroker.[Entity].Configurations.cs) - Domain expectations implied by usage

  1. The storage configuration represents minimum enforced constraints:

- Required vs optional - Maximum length - Minimum length (if configured) - Precision / scale / format where applicable

  1. Foundation services represent the enforcement boundary:

- All constraints that can cause persistence failure MUST be validated before reaching storage - Validation must prevent database exceptions where deterministically possible

Validation Alignment Rules

  1. Foundation validation MUST be equal to or stricter than storage constraints.
  2. The following are ALLOWED (strengthening rules):

- Storage: optional → Foundation: required - Storage: optional → Foundation: constrained (min/max length) - Storage: max length → Foundation: smaller max length

  1. The following are NOT ALLOWED (weakening or missing rules):

- Storage: required → Foundation: not validated as required - Storage: max length → Foundation: no length validation

  1. Violations of alignment MUST be treated as:

- A design defect - A test failure condition - A review blocker

Validation Responsibility Rule

  1. The database MUST NOT be relied upon to enforce:

- Required field validation - Length validation - Format validation

  1. The ONLY acceptable database-enforced constraints without prior validation are:

- Foreign key constraints - Uniqueness / duplicate key constraints - Concurrency constraints

  1. Any validation that can be performed deterministically in the foundation service MUST be performed there

Validation Test Derivation from Storage Configuration

  1. Storage configuration (StorageBroker.[Entity].Configurations.cs) defines constraints, not validation behavior.
  2. For every constraint defined in storage configuration, there MUST exist a corresponding validation rule in the foundation service:

- Required fields - Length constraints (min/max) - Precision / format constraints where applicable

  1. Validation tests MUST:

- Target the foundation service validation methods only - NOT directly test storage configuration behavior - Prove that each storage-defined constraint is enforced at the foundation layer

  1. For each property constraint, validation tests MUST focus on constraint violations and boundary breaches:

- Invalid case (violates constraint) → FAIL - Required field missing / null - Value exceeding maximum length - Value below minimum length (if applicable) - Boundary violation cases: - Just above maximum → FAIL - Just below minimum → FAIL (if applicable)

  1. Valid scenarios (within acceptable range) are covered by logic tests and MUST NOT be redundantly tested in validation tests.
  2. Missing alignment between storage configuration and foundation validation MUST be treated as:

- A design defect - A test failure condition - A review blocker

  1. Automation MAY assist in identifying constraints (e.g., via EF metadata), but:

- Generated tests MUST still validate foundation behavior - Automation MUST NOT result in tests that validate the database layer directly

  1. All validation tests MUST:

- Follow Standard naming conventions - Be explicit and intention-revealing

Validation order

  1. Structural validations first.
  2. Logical validations second.
  3. External validations third.
  4. Dependency validations when the external resource is the source of the failure.

Circuit-breaking validations

  1. Null checks and other hard-stop guards must break immediately.
  2. If continuing would create invalid dereference or meaningless work, stop immediately.

Continuous validations

  1. When multiple fields can be invalid independently, collect them before throwing.
  2. Use upsertable exception data.
  3. Use dynamic rules with condition + message.
  4. Use a validations collector routine.
  5. Throw once the collector contains errors.

Hybrid continuous validations

  1. Validate parent objects before validating child properties.
  2. Split nested validation into levels to avoid unintended null-reference failures.

Foundation-service test rules

  1. Test the happy path first.
  2. Then test structural validations.
  3. Then test logical validations.
  4. Then test external validations.
  5. Then test dependency validations.
  6. Then test dependency exceptions.
  7. Then test service exceptions.
  8. Always verify logging and broker calls.
  9. Always verify no unwanted calls occurred.
  10. Always keep validation and exception behaviors local and explicit.

Processing-service test rules

  1. Test higher-order logic, not primitive broker details.
  2. Validate only what the processing service uses.
  3. Test shifters.

- Example: object -> bool or object -> count.

  1. Test combinations.

- Example: retrieve + add, retrieve + modify, ensure-exists, upsert.

  1. Test processing exception mapping from foundation exceptions.

Orchestration-service test rules

  1. Test multi-entity flow combinations.
  2. Test mapping/branching between contracts when present.
  3. Test call order when the flow depends on order.
  4. Prefer natural order when inputs/outputs force sequencing.
  5. Use explicit order verification when sequencing is not naturally encoded.
  6. Verify orchestration-level exception wrapping and unwrapping.
  7. Test normalization outcomes indirectly through dependency shape and resulting behavior.

Aggregation-service test rules

  1. Do not test dependency call order in aggregation services.
  2. Do not use mock-sequence style order assertions for aggregation services.
  3. Test only basic structural validations and exposure-level aggregation behavior.
  4. Aggregation services may multi-call or pass-through; test the contract and exposure abstraction, not orchestration logic.

Controller and protocol test rules

  1. Controllers require unit tests for mapping logic.
  2. Unit-test success code mappings.
  3. Unit-test validation / dependency / service error mappings.
  4. Unit-test security i.e authorization / authentication failure mappings.
  5. Acceptance-test every endpoint.
  6. Clean up test data after acceptance tests.
  7. Emulate external resources not owned by the microservice when running acceptance tests.
  8. Integration and end-to-end testing are valid beyond unit + acceptance.

UI component test rules

Base components

  1. Treat bases as thin wrappers.
  2. Test their exposed APIs and wrapper behavior when needed.
  3. Do not put business logic into bases.

Core components

  1. Core components are test-driven.
  2. Test elements.

- Existence - Properties - Actions

  1. Existence may be tested by property assignment, searching by id, or general search.
  2. Test styles when styles are part of the component contract.
  3. Test actions that mutate state, create components, or trigger service calls.
  4. Core components should integrate with one and only one view service.

Pages / containers

  1. Pages are simpler route containers.
  2. They generally do not require unit tests.
  3. They should not contain business logic.

Unit-test conventions from the supplied implementation profile

  1. Mirror partial-class split in tests.
  2. Use setup/helpers in the root test file.
  3. Split tests into logic, validations, and exceptions files.
  4. Use GWT: Given / When / Then.
  5. Mock all dependencies.
  6. Use readable assertions.
  7. Use deep cloning to protect expectation identity.
  8. Use randomized data by default.
  9. Verify exact dependency calls.
  10. End with VerifyNoOtherCalls.
  11. Keep naming explicit and scenario-driven.

Exact test implementation order for foundation-service add routines

When implementing an Add{Entity}Async routine under the implementation profile, follow this order:

  1. ShouldAdd{Entity}Async
  2. ShouldThrowValidationExceptionOnAddIf{Entity}IsNullAndLogItAsync
  3. ShouldThrowValidationExceptionOnAddIf{Entity}IsInvalidAndLogItAsync
  4. ShouldThrowDependencyValidationExceptionOnAddIfBadRequestErrorOccursAndLogItAsync
  5. ShouldThrowDependencyValidationExceptionOnAddIfConflictErrorOccursAndLogItAsync
  6. ShouldThrowCriticalDependencyExceptionOnAddIfUnauthorizedErrorOccursAndLogItAsync
  7. ShouldThrowCriticalDependencyExceptionOnAddIfForbiddenErrorOccursAndLogItAsync
  8. ShouldThrowCriticalDependencyExceptionOnAddIfNotFoundErrorOccursAndLogItAsync
  9. ShouldThrowCriticalDependencyExceptionOnAddIfUrlNotFoundErrorOccursAndLogItAsync
  10. ShouldThrowDependencyExceptionOnAddIfInternalServerErrorOccursAndLogItAsync
  11. ShouldThrowDependencyExceptionOnAddIfServiceUnavailableErrorOccursAndLogItAsync
  12. ShouldThrowCriticalDependencyExceptionOnAddIfHttpRequestErrorOccursAndLogItAsync
  13. ShouldThrowServiceExceptionOnAddIfServiceErrorOccursAndLogItAsync

For storage-based services, substitute the storage equivalents such as duplicate-key, DbUpdate, and SQL exceptions.

Testing and exception/localization addendum from the supplied implementation profile

8. Unit Testing

Unit tests follow The Standard's partial-class + three-axis approach.

8.1 Test Class Structure

Each entity's tests mirror the same partial-class split as the service:

Partial fileTests
{Entity}ServiceTests.csSetup, mocks, helpers (CreateRandom{Entity}, etc.)
{Entity}ServiceTests.Logic.{Method}.csHappy-path / success-case tests
{Entity}ServiceTests.Validations.{Method}.csValidation failure tests
{Entity}ServiceTests.Exceptions.{Method}.csDependency & service exception tests

8.2 Conventions

ConventionDetail
MockingMoq — Mock<IStorageBroker>, Mock<IModernApiBroker>, Mock<ILoggingBroker>
AssertionsFluentAssertions — Should().BeEquivalentTo()
Deep cloningDeepCloner — to isolate input/expected/actual objects
Data generationTynamix.ObjectFiller — Filler<{Entity}> with custom property setup
Exception comparisonXeption.SameExceptionAs() via SameExceptionAs expression helper
Test namingShould{Action}Async / ShouldThrow{Exception}On{Action}If{Condition}AndLogItAsync
Verify callsEvery test verifies broker calls (Times.Once / Times.Never) and ends with VerifyNoOtherCalls()
Test frameworkxUnit — [Fact] for single cases, [Theory] [InlineData] for parameterised cases

8.3 Test Pattern — GWT (Given / When / Then)

// given  — build input, configure mocks, construct expected exception
// when   — invoke the service method
// then   — assert result / exception, verify broker interactions

8.4 Test Implementation Order

Tests must be written and committed in the following strict order. This ordering ensures each category builds upon the prior one:

  1. Happy Path — ShouldAdd{Entity}Async
  2. Structural Validations — null entity check (ShouldThrowValidationExceptionOnAddIf{Entity}IsNullAndLogItAsync)
  3. Logical Validations — property-level checks using [Theory] [InlineData] (ShouldThrowValidationExceptionOnAddIf{Entity}IsInvalidAndLogItAsync)
  4. External Dependency Validation Exceptions — BadRequest → Conflict
  5. External Critical Dependency Exceptions — Unauthorized → Forbidden → NotFound → UrlNotFound
  6. External Non-Critical Dependency Exceptions — InternalServerError → ServiceUnavailable
  7. Transport-Level Exception — HttpRequestException
  8. Catch-All Service Exception — Exception

For storage-based services, steps 4–7 are replaced with the corresponding SQL/EF exceptions (DuplicateKeyException, DbUpdateException, SqlException).

Rule — Test Verification Before Commit: Each FAIL commit must have the test actually running and failing. Each PASS commit must have all tests running and passing. Never commit a FAIL without verifying the test runner reports a genuine failure. See Section 12.1.3 — Commits for details.

9. Key Libraries

PackagePurpose
XeptionEnhanced exceptions with data aggregation
EFxceptionsEF Core wrapper that throws meaningful exceptions
RESTFulSenseHTTP client wrapper for external API brokers
MoqMock framework for unit tests
FluentAssertionsReadable assertion syntax
DeepClonerValue-based deep cloning of test objects
Tynamix.ObjectFillerRandom test data generation
xunitUnit test framework

Exception Handling Principles

0. Scope

These rules govern exception design, localisation, categorisation, propagation, and testing across all service layers.


1. Localisation (MANDATORY)

  1. External (non-local) exceptions MUST be localised at the boundary (Foundation).
  2. Native exceptions (SQL, HTTP, SDK) MUST NOT cross service boundaries.
  3. Localisation MUST convert native exceptions into domain-specific exceptions.

Data Preservation (MANDATORY)

  1. ALL relevant data from the external exception MUST be copied to the local exception:

- Data dictionary - Constraint / validation metadata - Identifiers / keys

  1. The localised exception MUST carry this data so that:

- The immediate inner exception contains full validation detail after categorisation.


2. Categorisation

  1. All exceptions MUST be categorised into one of:

- Validation - DependencyValidation - Dependency - Service

  1. Categorisation defines upstream handling and exposer mapping.

3. Propagation (Unwrap / Rewrap)

Each service layer MUST:

  1. Catch downstream exceptions
  2. UNWRAP the categorical exception
  3. PRESERVE the LOCAL exception
  4. REWRAP into its OWN categorical exception

This prevents leakage of lower-layer concerns and enforces layer contracts.


4. Inner Exception Preservation (MANDATORY)

  1. The original local exception MUST always be preserved as the inner exception.
  2. No layer may discard or replace the local exception.

This guarantees:

  • Traceability
  • Correct exposer mapping (e.g. HTTP Conflict / FailedDependency)
  • Retention of validation data

5. Layer Responsibilities

Foundation
  1. Localise external exceptions
  2. Populate local exception data
  3. Categorise into Validation / DependencyValidation / Dependency / Service
Processing
  1. MUST ONLY handle categorised exceptions
  2. MUST NOT depend on foundation exception types
  3. MUST rewrap into processing-level exceptions
Orchestration
  1. MUST handle exceptions from all dependencies
  2. MUST unify into a single categorical exception per type
  3. MUST unwrap and preserve inner exceptions

6. Catch-All (MANDATORY)

  1. Every service MUST implement:

- catch (Exception)

  1. MUST map to ServiceException

This prevents leakage of unknown failures.


7. Logging

  1. Each layer MUST log BEFORE rethrowing
  2. MUST log the categorised exception only

8. Testing

Orchestration Exception Tests
  1. SHOULD use [Theory]
  2. MUST cover multiple dependency exception types in a single test
  3. MUST avoid duplication

9. Design Intent

These rules ensure:

  1. Full abstraction from external systems
  2. Stable layer contracts
  3. Simplified exposer logic
  4. Complete validation visibility at the local exception level

Exception Handling Cross-References (Enforcement)

Validation Testing Alignment

  1. All validation tests MUST align with Exception Handling Principles:

- Localisation MUST be verified (no native exceptions exposed) - Data preservation MUST be verified on local exceptions - Validation exceptions MUST contain full error details in inner exception - From processing service layer upwards, validation exceptions and dependency validation exceptions from its dependencies rewrap to [Entity][Layer]DependencyValidationExceptions - From processing service layer upwards, dependency exceptions and service exceptions from its dependencies rewrap to [Entity][Layer]DependencyExceptions

  1. Validation tests MUST assert:

- Correct local exception type - Correct categorised exception type - Inner exception contains validation data (Data dictionary populated)


Foundation Exception Tests (Enforcement)

  1. Tests MUST verify localisation:

- Native exception → Local exception → Categorised exception

  1. Tests MUST verify:

- External exception data is copied to local exception - Local exception is preserved as inner exception

  1. Tests MUST NOT allow:

- Native exception leakage - Missing Data dictionary propagation


Processing Exception Tests (Enforcement)

  1. Tests MUST assert:

- Rewrapping into processing-level exception - Inner exception preservation

  1. Tests SHOULD:

- Use [Theory] to test multiple dependency validation exceptions of the same type in one test - Use [Theory] to test multiple dependency exceptions of the same type in one test - Avoid duplication by testing multiple cases in a single test method


Orchestration Exception Tests (Enforcement)

  1. Tests MUST assert:

- Rewrapping into orchestration-level exception - Inner exception is preserved (local exception) - Categorical exception is replaced at orchestration level

  1. Tests SHOULD:

- Use [Theory] to test multiple dependency validation exceptions of the same type in one test - Use [Theory] to test multiple dependency exceptions of the same type in one test - Avoid duplication by testing multiple cases in a single test method


Catch-All Enforcement

  1. Tests MUST verify:

- Unknown exceptions are mapped to ServiceException - No raw Exception escapes any service layer


Logging Enforcement

  1. Tests MUST verify:

- Logging occurs before exception is thrown - Logged exception is the categorised exception


Design Integrity Rule

  1. Any violation of exception handling principles MUST be treated as:

- A design defect - A test failure - A review blocker

平台分布

Codex

36.29%
按下载量换算1,199

Claude

29.27%
按下载量换算967

Cursor

16.62%
按下载量换算549

Gemini CLI

9.33%
按下载量换算308

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills