v0.x-to-crud-lib

Migrate generated CRUD RPC handlers to delegate to forge/pkg/crud.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves repetitive, per-RPC CRUD lifecycle code by migrating generated CRUD handlers to delegate that lifecycle logic to forge/pkg/crud, while preserving the existing observable behavior and error wording.

Core Features & Use Cases

  • Thin per-RPC delegations: Rewrites generated handlers_crud_gen.go so each CRUD RPC becomes a single call into forge/pkg/crud with a small op struct describing auth, tenant scoping, entity mapping, persistence, and response packing.
  • Behavioral fingerprints preserved: Keeps the same error envelopes and messages for Create/Get/List/Update/Delete, including cursor decoding errors, required-field validation messages, page-size defaults/clamps, and order-by validation semantics.
  • Safe generator boundary: Regenerates only handlers that the generator owns (generated CRUD methods), skipping hand-written sibling overrides to avoid clobbering custom implementations.

Quick Start

Run forge generate to rewrite handlers_crud_gen.go for every service that has auto-generated CRUD RPCs so they delegate to forge/pkg/crud.

Frequently Asked Questions about v0.x-to-crud-lib

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

FAQPage Schema
How do I migrate generated CRUD handlers to use forge/pkg/crud after an upgrade?

Running forge generate rewrites handlers_crud_gen.go so each CRUD RPC becomes a thin delegation to forge/pkg/crud, replacing inline lifecycle logic with a small op struct.

Does CRUD handler migration preserve existing error messages and cursor validation?

Yes, migration preserves behavioral fingerprints including connect error codes, exact error message strings, cursor decoding errors, page-size clamps, and order-by validation semantics.

Will migrating CRUD handlers to forge/pkg/crud overwrite my custom handler implementations?

No, the generator only rewrites auto-generated CRUD methods in handlers_crud_gen.go and safely skips any hand-written sibling overrides to avoid clobbering custom implementations.

When do I need to migrate CRUD RPC handlers to forge/pkg/crud?

You need migration when a forge upgrade introduces forge/pkg/crud and your project contains at least one auto-generated CRUD method such as Create, Get, List, Update, or Delete.

What does forge/pkg/crud delegation replace in generated CRUD handlers?

Delegation replaces repetitive per-RPC lifecycle code by mapping auth, tenant scoping, entity mapping, persistence, and response packing into a single forge/pkg/crud call.

Can I use forge/pkg/crud migration for services without auto-generated CRUD methods?

No, this migration applies only to services with auto-generated CRUD RPCs in handlers_crud_gen.go; services lacking generated Create, Get, List, Update, or Delete methods are unaffected.