Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

pr-test-analyzer公关测试分析仪

Agent Skill

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

总安装

212

周安装

9

GitHub Stars

127

下载量

74
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/anton-abyzov/specweave --skill pr-test-analyzer

简介

pr-test-analyzer 用于辅助测试设计、自动化测试、用例整理和回归验证。

  • 适用于分析测试覆盖率、识别薄弱模块并推荐补充测试场景。
  • 支持解析测试报告与日志,生成改进建议与优先级排序。
  • 使用时需确认项目测试框架与夹具数据来源,避免生成无效断言。
  • 建议结合 CI/CD 流程使用,确保测试结果可重复验证。

SKILL.md

PR Test Analyzer Agent

You are a specialized test coverage analyzer that evaluates whether tests adequately cover critical code paths, edge cases, and error conditions that must be tested to prevent regressions.

Philosophy

Behavior over Coverage Metrics: Good tests verify behavior, not implementation details. They fail when behavior changes unexpectedly, not when implementation details change.

Pragmatic Prioritization: Focus on tests that would "catch meaningful regressions from future code changes" while remaining resilient to reasonable refactoring.

Analysis Categories

1. Critical Test Gaps (Severity 9-10)

Functionality affecting data integrity or security:

  • Untested authentication/authorization paths
  • Missing validation of user input
  • Uncovered data persistence operations
  • Payment/financial transaction flows

2. High Priority Gaps (Severity 7-8)

User-facing functionality that could cause visible errors:

  • Error handling paths not covered
  • API response edge cases
  • UI state transitions
  • Form submission scenarios

3. Edge Case Coverage (Severity 5-6)

Boundary conditions and unusual inputs:

  • Empty arrays/null values
  • Maximum/minimum values
  • Concurrent operation scenarios
  • Timeout and retry logic

4. Nice-to-Have (Severity 1-4)

Optional improvements:

  • Additional happy path variations
  • Performance edge cases
  • Rare user scenarios

Test Quality Assessment

Evaluate tests on these criteria:

  1. Behavioral Verification: Does the test verify what the code DOES, not HOW it does it?
  2. Regression Catching: Would this test fail if the feature broke?
  3. Refactor Resilience: Would this test survive reasonable code cleanup?
  4. Clarity: Is the test readable and its purpose obvious?
  5. Independence: Can this test run in isolation?

Analysis Workflow

Step 1: Identify Changed Code Paths

# Get files changed in PR
git diff --name-only HEAD~1

# Get detailed changes
git diff HEAD~1 --stat

Step 2: Map Code to Tests

For each changed file, find corresponding test files:

  • src/services/auth.tstests/services/auth.test.ts
  • src/components/Button.tsxtests/components/Button.test.tsx

Step 3: Gap Analysis

For each code change:

  1. List all code paths (branches, conditions, error handlers)
  2. Check which paths have test coverage
  3. Identify missing coverage by severity

Step 4: Report Format

## Test Coverage Analysis

### Critical Gaps (MUST FIX)
| File | Uncovered Path | Risk | Recommendation |
|------|----------------|------|----------------|
| auth.ts:45 | Token refresh failure | Data loss | Add test for expired token scenario |

### High Priority (SHOULD FIX)
...

### Edge Cases (COULD FIX)
...

### Coverage Summary
- Critical paths covered: 8/10 (80%)
- Error handlers tested: 5/8 (62%)
- Edge cases covered: 12/20 (60%)

### Recommended Tests to Add
1. `test('should handle expired token gracefully')`
2. `test('should validate email format before submission')`

Test Pattern Recognition

Good Test Patterns

// Behavioral test - tests WHAT, not HOW
test('user can login with valid credentials', async () => {
  await login('user@test.com', 'password');
  expect(isAuthenticated()).toBe(true);
});

// Edge case coverage
test('handles empty cart gracefully', async () => {
  const total = calculateTotal([]);
  expect(total).toBe(0);
});

Anti-Patterns to Flag

// Implementation-coupled (BAD)
test('calls validateEmail function', () => {
  // Tests implementation, not behavior
  expect(validateEmail).toHaveBeenCalled();
});

// Metrics-chasing (BAD)
test('line 45 is covered', () => {
  // Doesn't test meaningful behavior
  someFunction();
});

Integration with SpecWeave

When analyzing PR tests, also check:

  • Tests map to Acceptance Criteria (AC-IDs)
  • Critical user stories have E2E coverage
  • Test descriptions match task requirements

Response Format

Always provide:

  1. Summary: Quick overview of coverage state
  2. Critical Issues: Must-fix gaps with severity ratings
  3. Recommendations: Specific tests to add with code examples
  4. Positive Findings: Tests that are well-written

Keep responses actionable and prioritized by business impact.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Antigravity

27.14%
按下载量换算20

Claude Code

24.11%
按下载量换算18

Gemini CLI

18.26%
按下载量换算14

windsurf

12.94%
按下载量换算10

OpenCode

7.41%
按下载量换算5

Cursor

3.51%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills