Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

tasks-test-generation任务测试生成

Agent Skill

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

总安装

564

周安装

24

GitHub Stars

6

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/duc01226/easyplatform --skill tasks-test-generation

简介

用于辅助测试设计、自动化测试、用例整理和回归验证,适合编写单元测试或端到端测试。

  • 适用于需要生成测试计划、修复失败日志或验证逻辑正确性的开发场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和文件读写能力。
  • 安装前建议核实维护状态,避免触发不必要的联网或命令执行操作。
  • 可结合原始 README 文档进一步了解具体使用方法和限制条件。

SKILL.md

[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ask user whether to skip.

Prerequisites: MUST READ .claude/skills/shared/evidence-based-reasoning-protocol.md before executing.

Quick Summary

Goal: Autonomously generate unit and integration tests for backend (C#) and frontend (Angular) code using structured patterns.

Workflow:

  1. Pre-Flight — Identify code to test, find existing patterns, determine test type
  2. Read Patterns — MUST READ references/test-patterns.md for 5 canonical patterns
  3. Write Tests — Follow Arrange-Act-Assert, mock dependencies, cover happy + edge + error paths
  4. Verify — Ensure naming convention, no interdependencies, deterministic results

Key Rules:

  • MUST READ references/test-patterns.md before writing any test
  • Test behavior, not implementation details
  • Follow naming: [Method]_[Scenario]_[ExpectedBehavior]

Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof.

Skill Variant: Use this skill for autonomous test generation with structured templates. For interactive test writing with user feedback, use test-spec instead.

Test Generation Workflow

Prerequisites

⚠️ MUST READ references/test-patterns.md before executing — contains 5 complete test patterns (Command Handler, Query Handler, Entity Validation, Angular Component, Angular Store) and anti-patterns with correct/incorrect examples required by the Test Patterns section.

When to Use

  • Creating unit tests for new code
  • Adding tests for bug fixes
  • Integration test development
  • Test coverage improvement
For real-infrastructure integration tests (no mocks, real DI + DB), use integration-test skill instead.

Pre-Flight Checklist

  • Identify code to test (command, query, entity, component)
  • Find existing test patterns: grep "Test.*{Feature}" --include="*.cs"
  • Determine test type (unit, integration, e2e)
  • Identify dependencies to mock

File Locations

Backend Tests

tests/{Service}.Tests/
  UnitTests/
    Commands/Save{Entity}CommandTests.cs
    Queries/Get{Entity}ListQueryTests.cs
    Entities/{Entity}Tests.cs
  IntegrationTests/{Feature}IntegrationTests.cs

Frontend Tests

{frontend-apps-dir}/{app}/src/app/features/{feature}/
  {feature}.component.spec.ts
  {feature}.store.spec.ts

Test Patterns

PatternUse CaseReference
Command HandlerCQRS command create/update/delete⚠️ MUST READ: references/test-patterns.md Pattern 1
Query HandlerCQRS query with filters/paging⚠️ MUST READ: references/test-patterns.md Pattern 2
Entity ValidationUniqueExpr, ValidateAsync, computed props⚠️ MUST READ: references/test-patterns.md Pattern 3
Angular ComponentComponent lifecycle, store interaction⚠️ MUST READ: references/test-patterns.md Pattern 4
Angular StoreState management, API effects, error handling⚠️ MUST READ: references/test-patterns.md Pattern 5

Test Naming Convention

[MethodName]_[Scenario]_[ExpectedBehavior]

Examples:
- HandleAsync_ValidCommand_ReturnsSuccess
- HandleAsync_InvalidId_ThrowsNotFound
- UniqueExpr_MatchingValues_ReturnsTrue
- LoadItems_ApiError_SetsErrorState

Key Principles

  • Test behavior, not implementation details
  • Mock all dependencies (use Mock<IRepository>, jasmine.createSpyObj)
  • Cover happy path + edge cases + error conditions
  • Use Arrange-Act-Assert pattern consistently
  • Anti-patterns and examples in references/test-patterns.md

Verification Checklist

  • Unit tests cover happy path
  • Edge cases and error conditions tested
  • Dependencies properly mocked
  • Test naming follows convention
  • Assertions are specific and meaningful
  • No test interdependencies
  • Tests are deterministic (no random, no time-dependent)

Related

  • test-spec - Interactive test writing
  • tasks-code-review - Code review with test coverage checks

References

FileContents
references/test-patterns.md5 complete test patterns (Command Handler, Query Handler, Entity Validation, Angular Component, Angular Store), anti-patterns with correct/incorrect examples

IMPORTANT Task Planning Notes (MUST FOLLOW)

  • Always plan and break work into many small todo tasks
  • Always add a final review todo task to verify work quality and identify fixes/enhancements

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.37%
按下载量换算56

windsurf

20.75%
按下载量换算41

OpenCode

18.21%
按下载量换算36

Codex

13.51%
按下载量换算27

Antigravity

7.29%
按下载量换算14

Gemini CLI

3.31%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills