test-code

Codify unit and E2E test best practices with safety rules and fake repositories.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/GreenFirst-kr/green_first_be --skill test-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-code
Source: https://github.com/GreenFirst-kr/green_first_be/tree/main/.claude/skills/test-code
Command: npx skills add https://github.com/GreenFirst-kr/green_first_be --skill test-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill helps developers write, review, and debug unit tests and E2E tests by enforcing critical safety rules and mirroring real repository behavior with accurate Fake implementations.

Core Features & Use Cases

  • Enforces essential safety rules for E2E tests, such as preventing dangerous data deletions.
  • Guides proper test structure, fixtures, and test data management across unit and integration layers.
  • Provides Fake repositories that mirror real implementations to enable reliable, isolated unit tests.
  • Offers practical guidance on test design, access control validation, exception handling, and edge-case coverage.

Quick Start

Start by reading the real implementation, then craft unit tests that mirror its behavior, cover edge cases, and enforce E2E safety patterns.

Frequently Asked Questions about test-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests that accurately mirror real repository behavior?

Unit tests require Fake repositories that precisely mirror real implementations to ensure reliability. By reading the actual implementation first, you can craft isolated unit tests that accurately reflect production data interactions and track created data effectively.

What are the best practices for preventing dangerous data deletions in E2E tests?

E2E tests must enforce essential safety rules to prevent dangerous data deletions. This involves applying specific safety patterns that restrict destructive operations, track created test data, and ensure the testing environment remains stable and secure throughout execution.

How do I handle edge cases and exception handling in test design?

Handling edge cases and exceptions in test design requires covering boundary conditions and documenting expected failure modes. You should structure tests to validate access control, track created data, and ensure exceptions are clearly defined to enforce safe and realistic test coverage.

When do I need fake repositories for isolated unit testing?

You need fake repositories for isolated unit testing when verifying business logic without hitting real databases. They mirror real implementations to provide reliable, isolated testing environments, ensuring tests run safely while accurately reflecting actual data access patterns.

Does this approach work for both unit and integration layer test data management?

Yes, this approach guides proper test structure, fixtures, and test data management across both unit and integration layers. It enforces consistent safety patterns, access control validation, and realistic behavior mirroring for all test types.