Files
claude-skills-reference/engineering-team/tdd-guide/HOW_TO_USE.md
Reza Rezvani 93e750a018 docs(skills): add 6 new undocumented skills and update all documentation
Pre-Sprint Task: Complete documentation audit and updates before starting
sprint-11-06-2025 (Orchestrator Framework).

## New Skills Added (6 total)

### Marketing Skills (2 new)
- app-store-optimization: 8 Python tools for ASO (App Store + Google Play)
  - keyword_analyzer.py, aso_scorer.py, metadata_optimizer.py
  - competitor_analyzer.py, ab_test_planner.py, review_analyzer.py
  - localization_helper.py, launch_checklist.py
- social-media-analyzer: 2 Python tools for social analytics
  - analyze_performance.py, calculate_metrics.py

### Engineering Skills (4 new)
- aws-solution-architect: 3 Python tools for AWS architecture
  - architecture_designer.py, serverless_stack.py, cost_optimizer.py
- ms365-tenant-manager: 3 Python tools for M365 administration
  - tenant_setup.py, user_management.py, powershell_generator.py
- tdd-guide: 8 Python tools for test-driven development
  - coverage_analyzer.py, test_generator.py, tdd_workflow.py
  - metrics_calculator.py, framework_adapter.py, fixture_generator.py
  - format_detector.py, output_formatter.py
- tech-stack-evaluator: 7 Python tools for technology evaluation
  - stack_comparator.py, tco_calculator.py, migration_analyzer.py
  - security_assessor.py, ecosystem_analyzer.py, report_generator.py
  - format_detector.py

## Documentation Updates

### README.md (154+ line changes)
- Updated skill counts: 42 → 48 skills
- Added marketing skills: 3 → 5 (app-store-optimization, social-media-analyzer)
- Added engineering skills: 9 → 13 core engineering skills
- Updated Python tools count: 97 → 68+ (corrected overcount)
- Updated ROI metrics:
  - Marketing teams: 250 → 310 hours/month saved
  - Core engineering: 460 → 580 hours/month saved
  - Total: 1,720 → 1,900 hours/month saved
  - Annual ROI: $20.8M → $21.0M per organization
- Updated projected impact table (48 current → 55+ target)

### CLAUDE.md (14 line changes)
- Updated scope: 42 → 48 skills, 97 → 68+ tools
- Updated repository structure comments
- Updated Phase 1 summary: Marketing (3→5), Engineering (14→18)
- Updated status: 42 → 48 skills deployed

### documentation/PYTHON_TOOLS_AUDIT.md (197+ line changes)
- Updated audit date: October 21 → November 7, 2025
- Updated skill counts: 43 → 48 total skills
- Updated tool counts: 69 → 81+ scripts
- Added comprehensive "NEW SKILLS DISCOVERED" sections
- Documented all 6 new skills with tool details
- Resolved "Issue 3: Undocumented Skills" (marked as RESOLVED)
- Updated production tool counts: 18-20 → 29-31 confirmed
- Added audit change log with November 7 update
- Corrected discrepancy explanation (97 claimed → 68-70 actual)

### documentation/GROWTH_STRATEGY.md (NEW - 600+ lines)
- Part 1: Adding New Skills (step-by-step process)
- Part 2: Enhancing Agents with New Skills
- Part 3: Agent-Skill Mapping Maintenance
- Part 4: Version Control & Compatibility
- Part 5: Quality Assurance Framework
- Part 6: Growth Projections & Resource Planning
- Part 7: Orchestrator Integration Strategy
- Part 8: Community Contribution Process
- Part 9: Monitoring & Analytics
- Part 10: Risk Management & Mitigation
- Appendix A: Templates (skill proposal, agent enhancement)
- Appendix B: Automation Scripts (validation, doc checker)

## Metrics Summary

**Before:**
- 42 skills documented
- 97 Python tools claimed
- Marketing: 3 skills
- Engineering: 9 core skills

**After:**
- 48 skills documented (+6)
- 68+ Python tools actual (corrected overcount)
- Marketing: 5 skills (+2)
- Engineering: 13 core skills (+4)
- Time savings: 1,900 hours/month (+180 hours)
- Annual ROI: $21.0M per org (+$200K)

## Quality Checklist

- [x] Skills audit completed across 4 folders
- [x] All 6 new skills have complete SKILL.md documentation
- [x] README.md updated with detailed skill descriptions
- [x] CLAUDE.md updated with accurate counts
- [x] PYTHON_TOOLS_AUDIT.md updated with new findings
- [x] GROWTH_STRATEGY.md created for systematic additions
- [x] All skill counts verified and corrected
- [x] ROI metrics recalculated
- [x] Conventional commit standards followed

## Next Steps

1. Review and approve this pre-sprint documentation update
2. Begin sprint-11-06-2025 (Orchestrator Framework)
3. Use GROWTH_STRATEGY.md for future skill additions
4. Verify engineering core/AI-ML tools (future task)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 10:08:08 +01:00

7.0 KiB

How to Use the TDD Guide Skill

The TDD Guide skill helps engineering teams implement Test Driven Development with intelligent test generation, coverage analysis, and workflow guidance.

Basic Usage

Generate Tests from Requirements

@tdd-guide

I need to implement a user registration feature. Generate test cases for:
- Email validation
- Password strength checking
- Duplicate email detection

Language: TypeScript
Framework: Jest

Analyze Test Coverage

@tdd-guide

Analyze test coverage for my authentication module.

Coverage report: coverage/lcov.info
Source code: src/auth/

Identify gaps and prioritize improvements.

Get TDD Workflow Guidance

@tdd-guide

Guide me through TDD for implementing a shopping cart feature.

Requirements:
- Add items to cart
- Update quantities
- Calculate totals
- Apply discount codes

Framework: Pytest

Example Invocations

Example 1: Generate Tests from Code

@tdd-guide

Generate comprehensive tests for this function:

```typescript
export function calculateTax(amount: number, rate: number): number {
  if (amount < 0) throw new Error('Amount cannot be negative');
  if (rate < 0 || rate > 1) throw new Error('Rate must be between 0 and 1');
  return Math.round(amount * rate * 100) / 100;
}

Include:

  • Happy path tests
  • Error cases
  • Boundary values
  • Edge cases

### Example 2: Improve Coverage

@tdd-guide

My coverage is at 65%. Help me get to 80%.

Coverage report: [paste LCOV or JSON coverage data]

Source files:

  • src/services/payment-processor.ts
  • src/services/order-validator.ts

Prioritize critical paths.


### Example 3: Review Test Quality

@tdd-guide

Review the quality of these tests:

def test_login():
    result = login("user", "pass")
    assert result is not None
    assert result.status == "success"
    assert result.token != ""
    assert len(result.permissions) > 0

def test_login_fails():
    result = login("bad", "wrong")
    assert result is None

Suggest improvements for:

  • Test isolation
  • Assertion quality
  • Naming conventions
  • Test organization

### Example 4: Framework Migration

@tdd-guide

Convert these Jest tests to Pytest:

describe('Calculator', () => {
  it('should add two numbers', () => {
    const result = add(2, 3);
    expect(result).toBe(5);
  });

  it('should handle negative numbers', () => {
    const result = add(-2, 3);
    expect(result).toBe(1);
  });
});

Maintain test structure and coverage.


### Example 5: Generate Test Fixtures

@tdd-guide

Generate realistic test fixtures for:

Entity: User Fields:

  • id (UUID)
  • email (valid format)
  • age (18-100)
  • role (admin, user, guest)

Generate 5 fixtures with edge cases:

  • Minimum age boundary
  • Maximum age boundary
  • Special characters in email

## What to Provide

### For Test Generation
- Source code (TypeScript, JavaScript, Python, or Java)
- Requirements (user stories, API specs, or business rules)
- Testing framework preference (Jest, Pytest, JUnit, Vitest)
- Specific scenarios to cover (optional)

### For Coverage Analysis
- Coverage report (LCOV, JSON, or XML format)
- Source code files (optional, for context)
- Coverage threshold target (e.g., 80%)

### For TDD Workflow
- Feature requirements
- Current phase (RED, GREEN, or REFACTOR)
- Test code and implementation (for validation)

### For Quality Review
- Existing test code
- Specific quality concerns (isolation, naming, assertions)

## What You'll Get

### Test Generation Output
- Complete test files with proper structure
- Test stubs with arrange-act-assert pattern
- Framework-specific imports and syntax
- Coverage for happy paths, errors, and edge cases

### Coverage Analysis Output
- Overall coverage summary (line, branch, function)
- Identified gaps with file/line numbers
- Prioritized recommendations (P0, P1, P2)
- Visual coverage indicators

### TDD Workflow Output
- Step-by-step guidance for current phase
- Validation of RED/GREEN/REFACTOR completion
- Refactoring suggestions
- Next steps in TDD cycle

### Quality Review Output
- Test quality score (0-100)
- Detected test smells
- Isolation and naming analysis
- Specific improvement recommendations

## Tips for Best Results

### Test Generation
1. **Be specific**: "Generate tests for password validation" is better than "generate tests"
2. **Provide context**: Include edge cases and error conditions you want covered
3. **Specify framework**: Mention Jest, Pytest, JUnit, etc., for correct syntax

### Coverage Analysis
1. **Use recent reports**: Coverage data should match current codebase
2. **Provide thresholds**: Specify your target coverage percentage
3. **Focus on critical code**: Prioritize coverage for business logic

### TDD Workflow
1. **Start with requirements**: Clear requirements lead to better tests
2. **One cycle at a time**: Complete RED-GREEN-REFACTOR before moving on
3. **Validate each phase**: Run tests and share results for accurate guidance

### Quality Review
1. **Share full context**: Include test setup/teardown and helper functions
2. **Ask specific questions**: "Is my isolation good?" gets better answers than "review this"
3. **Iterative improvement**: Implement suggestions incrementally

## Advanced Usage

### Multi-Language Projects

@tdd-guide

Analyze coverage across multiple languages:

  • Frontend: TypeScript (Jest) - src/frontend/
  • Backend: Python (Pytest) - src/backend/
  • API: Java (JUnit) - src/api/

Provide unified coverage report and recommendations.


### CI/CD Integration

@tdd-guide

Generate coverage report for CI pipeline.

Input: coverage/coverage-final.json Output format: JSON

Include:

  • Pass/fail based on 80% threshold
  • Changed files coverage
  • Trend comparison with main branch

### Parameterized Test Generation

@tdd-guide

Generate parameterized tests for:

Function: validateEmail(email: string): boolean

Test cases:

Framework: Jest (test.each)


## Related Commands

- `/code-review` - Review code quality and suggest improvements
- `/test` - Run tests and analyze results
- `/refactor` - Get refactoring suggestions while keeping tests green

## Troubleshooting

**Issue**: Generated tests don't match my framework syntax
- **Solution**: Explicitly specify framework (e.g., "using Pytest" or "with Jest")

**Issue**: Coverage analysis shows 0% coverage
- **Solution**: Verify coverage report format (LCOV, JSON, XML) and try including raw content

**Issue**: TDD workflow validation fails
- **Solution**: Ensure you're providing test results (passed/failed status) along with code

**Issue**: Too many recommendations
- **Solution**: Ask for "top 3 P0 recommendations only" for focused output

## Version Support

- **Node.js**: 16+ (Jest 29+, Vitest 0.34+)
- **Python**: 3.8+ (Pytest 7+)
- **Java**: 11+ (JUnit 5.9+)
- **TypeScript**: 4.5+

## Feedback

If you encounter issues or have suggestions, please mention:
- Language and framework used
- Type of operation (generation, analysis, workflow)
- Expected vs. actual behavior