v0.x-to-tdd-rpccases

Migrate legacy CRUD handler test scaffolds to table-driven tdd.RunRPCCases runners.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-tdd-rpccases
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v0.x-to-tdd-rpccases
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/migration/v0.x-to-tdd-rpccases
Command: npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-tdd-rpccases

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes test scaffolding drift by migrating legacy per-RPC CRUD handler tests to the standardized table-driven runner shape, so updates across versions keep your generated tests consistent and maintainable.

Core Features & Use Cases

  • Convert generated CRUD test harnesses: Rewrites handlers/<svc>/handlers_crud_gen_test.go from inlined per-RPC boilerplate into thin shims that delegate to forge/pkg/tdd.RunRPCCases.
  • Preserve expected behavior fingerprints: Keeps connect error-code matching, per-row setup ordering, default context behavior, and nil/Check semantics aligned with the pkg/tdd test harness.
  • Codemod support for common hand-rolled shapes: Runs forge test migrate-tdd to convert typical legacy tests := []struct{...} table styles into per-RPC TestXxx_Generated functions backed by tdd.RunRPCCases.

Quick Start

Run this from your project root to migrate the scaffolded handler tests: forge generate.

Frequently Asked Questions about v0.x-to-tdd-rpccases

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

FAQPage Schema
How do I migrate generated Go CRUD handler tests to table-driven format?

To migrate generated Go CRUD handler tests to table-driven format, rewrite handlers_crud_gen_test.go files into thin shims that delegate logic to the forge/pkg/tdd.RunRPCCases runner.

What does the forge test migrate-tdd command do for legacy test scaffolds?

The forge test migrate-tdd command converts common hand-rolled tests := []struct{} table styles into per-RPC TestXxx_Generated functions backed by the tdd.RunRPCCases runner.

Does migrating to table-driven tests preserve connect error code matching?

Migrating to table-driven tests preserves connect error-code matching, per-row setup ordering, default context behavior, and nil/Check semantics aligned with the pkg/tdd test harness.

When do I need to migrate handler tests to the tdd.RunRPCCases runner?

You need to migrate handler tests to the tdd.RunRPCCases runner when your project has CRUD RPC auto-generation and requires updating handlers_crud_gen_test.go files across a version jump.

Can I run forge generate to update table-driven handler tests directly?

You can run forge generate from your project root to execute the migration of scaffolded handler tests to the standardized table-driven runner shape.

Why do my generated CRUD handler tests drift across Forge version jumps?

Generated CRUD handler tests drift across Forge version jumps due to evolving test scaffolding, which requires migrating inline per-RPC boilerplate to standardized table-driven runners to keep tests consistent.