Token导航 LogoToken导航

Agent Skill · 研究检索

sc-test(SC 测试)

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

sc-test 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 50,488。

总安装 612周安装 26GitHub Stars 公开资料未说明下载 214核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add tony363/superclaude --skill "sc-test"

这个 Skill 是做什么的

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

用于辅助测试设计、用例整理与回归验证。sc-test 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适合编写单元测试、端到端测试或根据日志定位问题。使用时需确认项目测试框架、运行命令与夹具数据。避免为了通过测试而破坏真实逻辑;涉及浏览器或服务时应区分环境。安装前请确认权限和维护状态,注意是否触发命令执行。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add tony363/superclaude --skill "sc-test";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

sc-test 怎么安装?

在终端执行 npx skills add tony363/superclaude --skill "sc-test"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sc-test 支持哪些 AI 工具?

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

sc-test 需要什么权限?

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

sc-test 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

sc-test 用的人多吗?

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

sc-test 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
sc-test

SC 测试 · 本页

612—操作浏览器MIT未收录

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

SKILL.md 原文

Testing & Coverage Skill

Test execution with coverage analysis, interactive gap identification, test generation, and iterative coverage improvement.

Quick Start

# Run all tests
/sc:test

# Unit tests with coverage
/sc:test src/components --type unit --coverage

# Coverage gap analysis - identify untested code
/sc:test --gap-analysis --target 80

# Generate missing tests to reach target coverage
/sc:test --generate --target 80 --module src/services

# Watch mode with auto-fix
/sc:test --watch --fix

# Fix existing failures before adding coverage
/sc:test --fix-first --generate --target 80

# Web search for testing guidance (uses Rube MCP's LINKUP_SEARCH)
/sc:test --linkup --query "pytest asyncio best practices"

Philosophy: Ask Early, Ask Often

This skill liberally uses AskUserQuestion at decision points. Test coverage involves tradeoffs between speed and thoroughness. Validate priorities rather than guessing what the user wants covered.

  • Before writing tests -- confirm which modules to prioritize
  • When gaps are large -- ask where to focus effort first
  • When source code looks buggy -- ask before fixing vs just testing
  • After coverage run -- ask about iteration vs stopping

Behavioral Flow

  1. Discover - Categorize tests using runner patterns
  2. Configure - Set up test environment and parameters
  3. Execute - Run tests with real-time progress tracking
  4. Analyze - Generate coverage reports and diagnostics
  5. Confirm Priorities - Interactive checkpoint: ask user what to tackle
  6. Study Patterns - Read test infrastructure and existing conventions
  7. Generate - Write missing tests following project conventions
  8. Validate - Run new tests, fix failures, lint
  9. Verify Coverage - Re-run coverage and compare before/after
  10. Iterate - Ask user: continue, stop, or change focus
  11. Report - Provide recommendations and quality metrics

Flags

FlagTypeDefaultDescription
--typestringallunit, integration, e2e, all
--coverageboolfalseGenerate coverage report
--watchboolfalseContinuous watch mode
--fixboolfalseAuto-fix simple failures
--gap-analysisboolfalseIdentify coverage gaps without generating tests
--generateboolfalseGenerate missing tests to reach target
--targetint80Coverage percentage target
--modulestring-Restrict scope to a specific module
--fix-firstboolfalseFix existing failures before generating new tests
--dry-runboolfalseShow gap analysis and test plan without writing
--linkupboolfalseWeb search for guidance (via Rube MCP)
--querystring-Search query for LINKUP_SEARCH

Personas Activated

  • qa-specialist - Test analysis and quality assessment

MCP Integration

PAL MCP (Quality & Debugging)

ToolWhen to UsePurpose
mcp__pal__debugTest failuresRoot cause analysis for failing tests
mcp__pal__codereviewTest qualityReview test coverage and quality
mcp__pal__thinkdeepComplex failuresMulti-stage investigation of flaky tests
mcp__pal__consensusTest strategyMulti-model validation of testing approach
mcp__pal__apilookupFramework docsGet current testing framework documentation

PAL Usage Patterns

# Debug failing test
mcp__pal__debug(
    step="Investigating intermittent test failure",
    hypothesis="Race condition in async setup",
    confidence="medium",
    relevant_files=["/tests/test_api.py"]
)

# Review test quality
mcp__pal__codereview(
    review_type="full",
    findings="Test coverage, assertion quality, edge cases",
    focus_on="test isolation and mocking patterns"
)

# Validate testing strategy
mcp__pal__consensus(
    models=[{"model": "gpt-5.2", "stance": "neutral"}, {"model": "gemini-3-pro", "stance": "neutral"}],
    step="Evaluate: Is integration testing sufficient for this feature?"
)

Rube MCP (Automation & Research)

ToolWhen to UsePurpose
mcp__rube__RUBE_SEARCH_TOOLSCI/CD integrationFind test reporting tools
mcp__rube__RUBE_MULTI_EXECUTE_TOOLNotificationsPost results to Slack, update tickets
mcp__rube__RUBE_REMOTE_WORKBENCHBulk processingAnalyze large test result sets

Rube Usage Patterns

# Search for testing best practices (--linkup flag uses LINKUP_SEARCH)
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
    {"tool_slug": "LINKUP_SEARCH", "arguments": {
        "query": "pytest fixtures best practices",
        "depth": "deep",
        "output_type": "sourcedAnswer"
    }}
])

# Post test results to Slack
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
    {"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
        "channel": "#ci-results",
        "text": "Test run complete: 95% pass rate, 87% coverage"
    }}
])

Evidence Requirements

This skill requires evidence. You MUST:

  • Show test execution output and pass/fail counts
  • Reference coverage metrics when --coverage used
  • Provide actual error messages for failures

Test Type Definitions

TypeWhat It TestsMarkers
UnitSingle function/class in isolation, mocked dependencies(none or framework default)
IntegrationMultiple components together, real DB via fixtures@pytest.mark.integration, describe("integration")
E2EFull pipeline with real or mocked external APIs@pytest.mark.slow, @pytest.mark.e2e

Phase 1: Coverage Baseline

1.1 Run Current Coverage Report

Detect the test framework and run coverage:

# Python (pytest)
pytest --cov=src --cov-report=term-missing --cov-report=json:coverage.json -q --tb=no

# JavaScript (jest/vitest)
npx jest --coverage --coverageReporters=json-summary
# or: npx vitest run --coverage

# Go
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out

# Rust
cargo tarpaulin --out json

1.2 Parse Coverage Gaps

Read the coverage report to extract:

  • Per-file coverage percentage
  • Uncovered line numbers per file
  • Total project coverage

If --module is provided, filter coverage data to the specified module only.

1.3 Build Gap Report

Create a ranked list of files by coverage gap (lowest coverage first):

## Coverage Gap Report

**Current Coverage**: 52% | **Target**: 80% | **Gap**: 28%

| File | Coverage | Missing Lines | Priority |
|------|----------|---------------|----------|
| src/services/payment.py | 0% | 1-120 | CRITICAL |
| src/utils/validator.py | 15% | 12-45, 67-89 | HIGH |
| src/api/routes/users.py | 42% | 55-70, 88-102 | MEDIUM |

Priority rules:

  • CRITICAL: 0% coverage (no tests at all)
  • HIGH: < 30% coverage
  • MEDIUM: 30-60% coverage
  • LOW: > 60% but below target

1.4 Confirm Coverage Priorities with User

After building the gap report, ask the user what to prioritize:

AskUserQuestion:
  question: "Found <N> files below target. Which should I tackle first?"
  header: "Priority"
  multiSelect: false
  options:
    - label: "Highest-impact first (Recommended)"
      description: "<N CRITICAL + M HIGH priority files -- start with 0% coverage modules>"
    - label: "Quick wins first"
      description: "Start with files that need only 1-2 tests to reach target"
    - label: "Specific module"
      description: "I want to focus on a specific area of the codebase"
    - label: "Dry run only"
      description: "Just show me the gap report -- don't write any tests yet"

If "Specific module": Ask which module to focus on. If "Dry run only": Present the gap report and stop.

Skip these files by default:

  • Protocol/interface definitions with no logic
  • Migration files
  • __init__.py / index.ts with only re-exports
  • Generated code (protobuf, OpenAPI clients)

Phase 2: Analyze Existing Test Patterns

Before writing ANY tests, study the project's conventions.

2.1 Read Test Infrastructure

Discover and read test setup files:

FrameworkFiles to Read
pytestconftest.py, pyproject.toml [tool.pytest]
jestjest.config.*, setupTests.*, __mocks__/
vitestvitest.config.*, setup.*
Go*_test.go helpers, testdata/
Rusttests/common/mod.rs

2.2 Find Pattern Examples

For each gap file, find the closest existing test as a template:

  • Search for tests in the same directory/module
  • Identify import patterns, fixture usage, assertion style
  • Note any test base classes or shared helpers

2.3 Identify Available Fixtures/Helpers

Map available test fixtures to their use cases. Build a reference table:

| Fixture/Helper | Purpose | Used By |
|----------------|---------|---------|
| db_session | Database access | Integration tests |
| mock_api_client | Mock external API | Unit tests |
| ...            | ...     | ...     |

2.4 Classify Functions for Test Type

Function CharacteristicTest Type
Pure function (no I/O, no DB)Unit test
Uses validation onlyUnit test
Calls database/ORMIntegration test (needs DB fixture)
Calls external APIUnit test with mock
HTTP endpoint handlerIntegration test
Full pipeline executionE2E test

Phase 3: Generate Tests by Type

Process gaps in priority order (CRITICAL first). For each file:

3.1 Read the Source Module

Identify:

  • All public functions and classes
  • Their signatures, return types, and dependencies
  • Which dependencies need mocking vs real fixtures
  • Edge cases: empty inputs, None values, error conditions

3.2 Write Unit Tests

Follow the AAA pattern (Arrange/Act/Assert):

# Python example
class TestFunctionName:
    """Tests for function_name."""

    # Happy path
    async def test_returns_expected_result(self):
        """function_name returns correct output for valid input."""
        # Arrange
        input_data = ...

        # Act
        result = await function_under_test(input_data)

        # Assert
        assert result.field == expected_value

    # Edge cases
    async def test_handles_empty_input(self):
        """function_name handles empty input correctly."""
        ...

    # Error conditions (Let It Crash - verify errors propagate)
    async def test_raises_on_invalid_input(self):
        """function_name raises ValueError for invalid input."""
        with pytest.raises(ValueError):
            await function_under_test(invalid_input)
// TypeScript/Jest example
describe('functionName', () => {
  it('returns expected result for valid input', () => {
    // Arrange
    const input = { ... };

    // Act
    const result = functionName(input);

    // Assert
    expect(result.field).toBe(expectedValue);
  });

  it('throws on invalid input', () => {
    expect(() => functionName(invalidInput)).toThrow();
  });
});
// Go example
func TestFunctionName(t *testing.T) {
    t.Run("returns expected result", func(t *testing.T) {
        // Arrange
        input := ...

        // Act
        result, err := FunctionName(input)

        // Assert
        if err != nil {
            t.Fatalf("unexpected error: %v", err)
        }
        if result.Field != expected {
            t.Errorf("got %v, want %v", result.Field, expected)
        }
    })
}

Rules for all languages:

  • Use AAA pattern (Arrange/Act/Assert) with comments
  • Docstrings/descriptions describe expected behavior, not implementation
  • Mock only external dependencies (APIs, DB, network)
  • Do NOT add try/except or try/catch in tests (Let It Crash principle)
  • Do NOT modify source code to make tests pass (unless there's a genuine bug)

3.3 Write Integration Tests

For tests requiring database or multiple components:

  • Mark with appropriate marker (@pytest.mark.integration, tagged describe blocks)
  • Use real DB fixtures or test containers
  • Test real component interactions, not mocked ones
  • Clean up is automatic via fixture teardown

3.4 Write E2E Tests

For full pipeline or API flow tests:

  • Mark with slow/e2e marker
  • Use HTTP test clients (httpx AsyncClient, supertest, net/http/httptest)
  • Mock external API responses via fixtures
  • Test full request/response cycle including auth
  • Verify response schema matches expected models

Phase 4: Validate Tests

4.1 Run New Tests Only

# Run just the newly created/modified test file
pytest tests/test_<area>/test_<module>.py -v --tb=short
npx jest tests/<module>.test.ts --verbose
go test -v -run TestNewFunction ./pkg/...

4.2 Fix Failures

If tests fail:

  1. Read the error output carefully
  2. Determine if the failure is in the TEST or the SOURCE code
  3. Fix the test if the source code behavior is correct
  4. NEVER modify source code to make tests pass (unless there's a genuine bug)
  5. If source code has a bug -- ask the user before fixing it vs just testing current behavior

4.3 Run Full Suite

After all new tests pass individually:

# Full test suite - ensure no regressions
pytest -v --tb=short
npx jest --verbose
go test ./...

4.4 Lint Test Files

# Python
ruff check tests/ --fix && ruff format tests/

# TypeScript/JavaScript
npx eslint tests/ --fix && npx prettier tests/ --write

# Go
gofmt -w *_test.go

Phase 5: Coverage Verification

5.1 Re-run Coverage

Run the same coverage command from Phase 1 to get updated metrics.

5.2 Compare Before/After

Report coverage delta:

## Coverage Report

| Metric | Before | After | Delta |
|--------|--------|-------|-------|
| Total Coverage | 52% | 78% | +26% |
| Files with 0% | 5 | 1 | -4 |

### Per-File Improvements

| File | Before | After | Tests Added |
|------|--------|-------|-------------|
| src/services/payment.py | 0% | 85% | 8 |
| src/utils/validator.py | 15% | 72% | 5 |

5.3 Ask Whether to Iterate

If coverage is still below target, ask the user rather than auto-iterating:

AskUserQuestion:
  question: "Coverage is at <M%> (target: <N%>). Want to continue adding tests?"
  header: "Iterate"
  multiSelect: false
  options:
    - label: "Continue -- add more tests"
      description: "<K files remaining below target -- next batch would cover <list>"
    - label: "Good enough -- stop here"
      description: "Accept current coverage and move on"
    - label: "Raise the target"
      description: "Current coverage exceeded expectations -- set a higher target"
    - label: "Switch focus"
      description: "Cover a different area instead of continuing the current batch"

If continuing:

  1. Re-run Phase 1 to identify remaining gaps
  2. Focus on files with the largest uncovered line counts
  3. Repeat Phases 3-5 until target is reached or user stops

Maximum iterations: 5 (per --loop convention).


Phase 6: Summary

Present final results:

## Test Coverage Update Summary

**Target**: N%
**Achieved**: M%
**Tests Added**: X unit, Y integration, Z e2e

### New Test Files Created
- tests/test_<area>/test_<module>.py (N tests)
- ...

### Modified Test Files
- tests/test_<area>/test_<module>.py (+N tests)
- ...

### Coverage by Category
| Category | Coverage | Status |
|----------|----------|--------|
| src/services/ | ??% | OK/NEEDS WORK |
| src/routers/ | ??% | OK/NEEDS WORK |
| src/models/ | ??% | OK/NEEDS WORK |

### Remaining Gaps (if any)
- src/services/transformer.py - Excluded (needs full pipeline data)
- ...

### Verification Commands
<framework-specific commands to re-run tests and coverage>

Anti-Patterns to Avoid

DO NOT write tests that:

  • Test private/internal methods directly (test via public API)
  • Duplicate existing test coverage (check first!)
  • Require real API keys to pass (mock external services)
  • Depend on test execution order
  • Use time.sleep() for async synchronization
  • Catch exceptions that should propagate (Let It Crash)
  • Add defensive if x is not None checks (test the contract)

DO NOT:

  • Modify source code to make it "more testable" (test what exists)
  • Add type stubs or docstrings to source files (only touch test files)
  • Create test utility frameworks or base classes (KISS)
  • Write parameterized tests for < 3 cases (just write separate tests)
  • Add comments or docstrings to code you didn't change

Coverage Analysis (standalone)

When only --coverage is enabled (without --generate):

  • Line coverage metrics
  • Branch coverage metrics
  • Uncovered code identification
  • Coverage trend comparison

Tool Coordination

  • Bash - Test runner execution
  • Glob - Test file discovery
  • Grep - Result parsing, failure analysis
  • Read - Source and test file inspection
  • Write - New test files, coverage reports
  • Edit - Extending existing test files
  • AskUserQuestion - Priority confirmation, iteration decisions

平台分布

Codex

29.39%
按下载量换算63

Claude Code

21.76%
按下载量换算47

windsurf

18.69%
按下载量换算40

trae

14.3%
按下载量换算31

OpenCode

8.03%
按下载量换算17

Cursor

3.79%
按下载量换算8

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills