Skip to content
Back to skills

Ac Test Generator

ASecurity

Generate tests for features using TDD approach. Use when creating test files, generating test cases, implementing RED phase of TDD, or scaffolding test infrastructure.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmentpythonapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add adaptationio/Skrillz --skill ac-test-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ac Test Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ac Test Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adaptationio-ac-test-generator/badge)](https://www.skillsdirectory.com/skills/adaptationio-ac-test-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ac-test-generator
description: Generate tests for features using TDD approach. Use when creating test files, generating test cases, implementing RED phase of TDD, or scaffolding test infrastructure.
---

# AC Test Generator

Generate test files and test cases following TDD principles.

## Purpose

Implements the RED phase of TDD by generating failing tests before implementation, ensuring all features have comprehensive test coverage.

## Quick Start

```python
from scripts.test_generator import TestGenerator

generator = TestGenerator(project_dir)
tests = await generator.generate_for_feature(feature)
await generator.write_test_file(tests)
```

## Generated Test Structure

```python
# tests/test_auth_001.py
"""Tests for feature auth-001: User can register"""

import pytest
from app.auth import register_user

class TestUserRegistration:
    """Test suite for user registration."""

    def test_valid_registration_creates_user(self):
        """Valid registration creates user in database."""
        # Arrange
        email = "test@example.com"
        password = "SecurePass123!"

        # Act
        result = register_user(email, password)

        # Assert
        assert result.success
        assert result.user.email == email

    def test_duplicate_email_returns_error(self):
        """Duplicate email registration returns error."""
        # Arrange - create existing user
        # Act - try to register same email
        # Assert - error returned
        pass

    def test_weak_password_rejected(self):
        """Weak password is rejected with message."""
        pass
```

## Test Types

### Unit Tests
- Test individual functions
- Mock dependencies
- Fast execution
- High coverage

### Integration Tests
- Test component interactions
- Real dependencies
- Database transactions
- API endpoints

### E2E Tests
- Full user workflows
- Browser automation
- Real environment
- Acceptance criteria

## Configuration

```json
{
  "test_framework": "pytest",
  "coverage_target": 80,
  "test_patterns": {
    "unit": "tests/unit/",
    "integration": "tests/integration/",
    "e2e": "tests/e2e/"
  },
  "fixtures": "tests/fixtures/"
}
```

## Workflow

1. **Analyze**: Read feature and test cases
2. **Scaffold**: Create test file structure
3. **Generate**: Write test functions
4. **Validate**: Ensure tests fail (RED)
5. **Report**: Output test locations

## TDD Integration

```
RED   → ac-test-generator creates failing tests
GREEN → Claude implements minimum code to pass
REFACTOR → Code cleaned while tests pass
```

## API Reference

See `scripts/test_generator.py` for full implementation.

Files in this skill

  • SKILL.md2.6 KB
  • scripts/test_generator.py12.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…