characterization-testing — community characterization-testing, ai_coordinate, community, ide skills

v1.0.0

이 스킬 정보

기존 코드의 안정성을 특성 테스트를 통해 보장해야 하는 리팩토링 에이전트에 적합 Creates characterization tests to capture existing behavior before refactoring. Use when writing char tests, creating golden tests, preparing for refactoring, or preserving legacy code behavior.

3balljugglerYu 3balljugglerYu
[0]
[0]
Updated: 3/9/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
7/11
Quality Score
39
Canonical Locale
en
Detected Body Locale
en

기존 코드의 안정성을 특성 테스트를 통해 보장해야 하는 리팩토링 에이전트에 적합 Creates characterization tests to capture existing behavior before refactoring. Use when writing char tests, creating golden tests, preparing for refactoring, or preserving legacy code behavior.

이 스킬을 사용하는 이유

골든 마스터 테스트를 사용하여 기존 코드의 현재 동작을 캡처하여 리팩토링 중에 회귀가 발생하지 않음을 보장하고, 명확하지 않은 사양을 가진 레거시 코드에 대한 스냅샷 테스트 및 특성 테스트의 안전망을 제공

최적의 용도

기존 코드의 안정성을 특성 테스트를 통해 보장해야 하는 리팩토링 에이전트에 적합

실행 가능한 사용 사례 for characterization-testing

레거시 코드를 위한 특성 테스트 생성
리팩토링 중에 회귀가 발생하지 않음을 확인
대규모 업데이트를 수행하기 전에 기존 코드의 현재 동작을 캡처

! 보안 및 제한 사항

  • 기존 코드베이스에 대한 액세스가 필요
  • 현재 동작만 테스트하며, 올바름은 테스트하지 않음
  • 사양이 급격히 변경되는 코드의 경우 효과적이지 않을 수 있음

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is characterization-testing?

기존 코드의 안정성을 특성 테스트를 통해 보장해야 하는 리팩토링 에이전트에 적합 Creates characterization tests to capture existing behavior before refactoring. Use when writing char tests, creating golden tests, preparing for refactoring, or preserving legacy code behavior.

How do I install characterization-testing?

Run the command: npx killer-skills add 3balljugglerYu/ai_coordinate/characterization-testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for characterization-testing?

Key use cases include: 레거시 코드를 위한 특성 테스트 생성, 리팩토링 중에 회귀가 발생하지 않음을 확인, 대규모 업데이트를 수행하기 전에 기존 코드의 현재 동작을 캡처.

Which IDEs are compatible with characterization-testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for characterization-testing?

기존 코드베이스에 대한 액세스가 필요. 현재 동작만 테스트하며, 올바름은 테스트하지 않음. 사양이 급격히 변경되는 코드의 경우 효과적이지 않을 수 있음.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add 3balljugglerYu/ai_coordinate/characterization-testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use characterization-testing immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

characterization-testing

Install characterization-testing, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Characterization Testing

You are helping the user create characterization tests that capture the current behavior of existing code before refactoring. This ensures that refactoring does not introduce regressions.

What is Characterization Testing?

Characterization tests (also known as "Golden Master Tests" or "Snapshot Tests") record the current behavior of code, not necessarily the "correct" behavior. For legacy code with unclear specifications, the current behavior becomes the specification.

Reference: See docs/TEST_PLAN.md sections 4.3 and 8.3 for detailed patterns.

Workflow

Step 1: Accept Target

Accept the class name as argument:

  • /char-test AuthViewModel - for ViewModel/Repository/Service
  • /char-test EventPage --widget - for Widget with golden tests

Step 2: Read and Analyze Target Class

  1. Read the target file from lib/ directory
  2. List all public methods and their signatures
  3. Identify state properties (for ViewModels)
  4. Note dependencies (repositories, services, external APIs)

Step 3: Identify Input Patterns

For each public method, identify test scenarios:

PatternDescriptionExample
NormalValid inputssignIn(valid_email, valid_password)
ErrorInvalid/malformed inputssignIn("", "")
BoundaryEdge casessignIn(max_length_email, min_password)
NullNullable parametersfetchData(null)

Step 4: Generate Test Code

For ViewModel/Repository/Service (ApprovalTests)

Generate test file at: test/characterization/{feature}/{class}_char_test.dart

dart
1import 'package:approval_tests/approval_tests.dart'; 2import 'package:flutter_test/flutter_test.dart'; 3import 'package:mockito/annotations.dart'; 4import 'package:mockito/mockito.dart'; 5 6// Import target class 7import 'package:live_view/ui/{feature}/{class}.dart'; 8 9// Import mocks 10import '../../../mocks/mock_locator.dart'; 11 12@GenerateMocks([/* dependencies */]) 13import '{class}_char_test.mocks.dart'; 14 15@Tags(['characterization']) 16void main() { 17 group('Characterization: {ClassName}', () { 18 late {ClassName} target; 19 late MockIClock mockClock; 20 late MockIDioClient mockDioClient; 21 22 setUp(() async { 23 mockClock = MockIClock(); 24 mockDioClient = MockIDioClient(); 25 26 // Fix time for deterministic tests 27 when(mockClock.now()).thenReturn(DateTime(2025, 1, 30, 12, 0, 0)); 28 29 // Return recorded responses 30 when(mockDioClient.get(any)).thenAnswer((_) async => 31 Response(data: recordedApiResponse, statusCode: 200)); 32 33 await setupMockLocatorForTest( 34 clock: mockClock, 35 dioClient: mockDioClient, 36 ); 37 38 target = {ClassName}(); 39 }); 40 41 tearDown(() async { 42 await locator.reset(); 43 }); 44 45 test('CHAR-{PREFIX}-001: {methodName} states snapshot', () async { 46 final results = <String>[]; 47 48 // Pattern 1: Normal case 49 try { 50 final result = await target.{methodName}(/* normal inputs */); 51 results.add('{methodName}(normal): $result, state=${target.state}'); 52 } catch (e) { 53 results.add('{methodName}(normal): threw $e'); 54 } 55 56 // Pattern 2: Error case 57 try { 58 final result = await target.{methodName}(/* error inputs */); 59 results.add('{methodName}(error): $result'); 60 } catch (e) { 61 results.add('{methodName}(error): threw $e'); 62 } 63 64 // Pattern 3: Boundary case 65 try { 66 final result = await target.{methodName}(/* boundary inputs */); 67 results.add('{methodName}(boundary): $result'); 68 } catch (e) { 69 results.add('{methodName}(boundary): threw $e'); 70 } 71 72 // Compare with approved snapshot 73 Approvals.verify(results.join('\n')); 74 }); 75 76 test('CHAR-{PREFIX}-002: {methodName} response snapshot', () async { 77 final result = await target.{methodName}(/* inputs */); 78 79 final snapshot = { 80 'result': result?.toJson(), 81 'state': { 82 'property1': target.state.property1, 83 'property2': target.state.property2, 84 }, 85 }; 86 87 Approvals.verifyAsJson(snapshot); 88 }); 89 }); 90}

For Widget (Golden Tests)

Generate test file at: test/characterization/widgets/{widget}_char_test.dart

dart
1import 'package:flutter/material.dart'; 2import 'package:flutter_test/flutter_test.dart'; 3 4// Import target widget 5import 'package:live_view/ui/{feature}/{widget}.dart'; 6 7// Import test helpers 8import '../../helpers/test_app.dart'; 9 10@Tags(['characterization', 'golden']) 11void main() { 12 group('Characterization: {WidgetName}', () { 13 testWidgets('CHAR-WIDGET-001: {WidgetName} loading state', (tester) async { 14 await tester.pumpWidget( 15 TestApp(child: {WidgetName}()), 16 ); 17 18 await expectLater( 19 find.byType({WidgetName}), 20 matchesGoldenFile('goldens/{widget}_loading.png'), 21 ); 22 }); 23 24 testWidgets('CHAR-WIDGET-002: {WidgetName} with data', (tester) async { 25 await tester.pumpWidget( 26 TestApp( 27 overrides: [{provider}.overrideWith((ref) => mock{State})], 28 child: {WidgetName}(), 29 ), 30 ); 31 await tester.pumpAndSettle(); 32 33 await expectLater( 34 find.byType({WidgetName}), 35 matchesGoldenFile('goldens/{widget}_loaded.png'), 36 ); 37 }); 38 39 testWidgets('CHAR-WIDGET-003: {WidgetName} empty state', (tester) async { 40 await tester.pumpWidget( 41 TestApp( 42 overrides: [{provider}.overrideWith((ref) => emptyMock)], 43 child: {WidgetName}(), 44 ), 45 ); 46 await tester.pumpAndSettle(); 47 48 await expectLater( 49 find.byType({WidgetName}), 50 matchesGoldenFile('goldens/{widget}_empty.png'), 51 ); 52 }); 53 54 testWidgets('CHAR-WIDGET-004: {WidgetName} error state', (tester) async { 55 await tester.pumpWidget( 56 TestApp( 57 overrides: [{provider}.overrideWith((ref) => errorMock)], 58 child: {WidgetName}(), 59 ), 60 ); 61 await tester.pumpAndSettle(); 62 63 await expectLater( 64 find.byType({WidgetName}), 65 matchesGoldenFile('goldens/{widget}_error.png'), 66 ); 67 }); 68 }); 69}

Step 5: Output Location

TypeOutput Path
ViewModeltest/characterization/{feature}/{class}_char_test.dart
Repositorytest/characterization/domain/repository/{class}_char_test.dart
Servicetest/characterization/service/{class}_char_test.dart
Widgettest/characterization/widgets/{widget}_char_test.dart
Golden filestest/characterization/goldens/{widget}_{state}.png
Approval filestest/characterization/{feature}/{class}_char_test.{ID}.approved.txt

Step 6: Provide Next Steps

After generating the test file, instruct the user:

For ApprovalTests (ViewModel/Repository/Service):

bash
1# 1. Run the test (first run generates .received files) 2flutter test test/characterization/{feature}/ 3 4# 2. Review the .received files 5# 3. If correct, rename to .approved 6mv test/characterization/{feature}/{class}_char_test.CHAR-{PREFIX}-001.received.txt \ 7 test/characterization/{feature}/{class}_char_test.CHAR-{PREFIX}-001.approved.txt 8 9# 4. Commit the .approved files 10git add test/characterization/{feature}/*.approved.txt

For Golden Tests (Widget):

bash
1# 1. Generate golden files 2flutter test --update-goldens test/characterization/widgets/ 3 4# 2. Review generated PNGs 5ls test/characterization/goldens/ 6 7# 3. Commit golden files 8git add test/characterization/goldens/*.png

Step 7: Update Progress Tracker

IMPORTANT: After creating the characterization test file, you MUST update docs/test-progress.yaml:

  1. Find the target class entry in the appropriate tier (tier1, tier2, tier3)
  2. Update the following fields:
    • status: Change from pending to char_test_created
    • char_test: Set to the test file path

Example update:

yaml
1# Before 2LiveViewRepository: 3 status: pending 4 char_test: null 5 6# After 7LiveViewRepository: 8 status: char_test_created 9 char_test: test/characterization/domain/repository/live_view_repository_char_test.dart

This step is mandatory. Do not skip it.

Deterministic Testing Techniques

Characterization tests must produce the same output for the same input. Handle non-deterministic elements:

ElementSolution
DateTime.now()Mock with IClock interface
Random valuesSeed fixed or mock
Network responsesMock with IDioClient
File pathsUse relative or test directories
Platform differencesRun on CI environment (ubuntu-latest)

Post-Refactoring Verification

After completing the refactoring (e.g., /interface-create):

bash
1# Run characterization tests 2flutter test test/characterization/{feature}/ 3 4# Expected results: 5# - No diff = Refactoring successful 6# - Diff found = Behavior changed, review and either: 7# - Fix the refactoring 8# - Approve as intentional change

Checklist

Before completing characterization test generation:

  • All public methods identified
  • Normal, error, boundary patterns covered
  • Non-deterministic elements mocked
  • Test file created at correct path
  • Import statements correct
  • Mock generation annotations added
  • Tags added (@Tags(['characterization']))
  • User instructed on next steps (generate/approve snapshots)
  • docs/test-progress.yaml updated (status: char_test_created, char_test: path)

References

관련 스킬

Looking for an alternative to characterization-testing or another community skill for your workflow? Explore these related open-source skills.

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
인공지능

widget-generator

Logo of f
f

prompts.chat 피드 시스템을 위한 사용자 지정 가능한 위젯 플러그인을 생성합니다

149.6k
0
인공지능

flags

Logo of vercel
vercel

리액트 프레임워크

138.4k
0
브라우저

pr-review

Logo of pytorch
pytorch

파이썬에서 텐서와 동적 신경망 구현 및 강력한 GPU 가속 지원

98.6k
0
개발자