搜索

PythonReactSEOPDF
GitHub Skill

crud-implementation

Complete workflow guide for implementing new CRUD entities. Use when adding a new resource, implementing full CRUD operations, or needing an overview of the database-to-API flow. Triggers: "new entity", "add resource", "implement CRUD", "create table and API". Orchestrates add-database-table, add-domain-entity, and add-api-endpoint skills.

abyssparanoia☆ 18 仓库 Stars2 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

CRUD Implementation Workflow

Entry point for implementing a new entity with full CRUD operations.

Workflow Overview

┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────────────┐
│  add-database-table │ --> │  add-domain-entity  │ --> │  add-api-endpoint   │
│                     │     │                     │     │                     │
│  - Migration SQL    │     │  - Domain model     │     │  - Usecase          │
│  - Constant tables  │     │  - Repository       │     │  - Proto definition │
│  - SQLBoiler gen    │     │  - Marshaller       │     │  - gRPC handler     │
└─────────────────────┘     └─────────────────────┘     └─────────────────────┘

Quick Start

Step Skill Key Command
1 add-database-table make migrate.create then make migrate.up
2 add-domain-entity make generate.mock
3 add-api-endpoint make generate.buf

Before You Start

  1. Know the entity name and its fields
  2. Identify relationships to existing entities
  3. Determine which API actor (admin/public/debug)

Step-by-Step

Step 1: Database Layer

Use the add-database-table skill for:

  • Creating migration file with table DDL
  • Adding indexes and foreign keys
  • Creating constant tables for enum fields
  • Running make migrate.up to generate SQLBoiler
Step 2: Domain Layer

Use the add-domain-entity skill for:

  • Domain model with constructor and update methods
  • Repository interface with query structs
  • Marshaller (DB model <-> domain model)
  • Repository implementation
Step 3: API Layer

Use the add-api-endpoint skill for:

  • Usecase input/output structs
  • Interactor interface and implementation
  • Protocol Buffers messages and RPCs
  • gRPC handler and marshaller
  • DI registration

Final Verification

make lint.go && make test

Related Skills

  • code-investigation - Analyze existing patterns before implementation
  • review-pr - Self-review before creating PR
  • create-pull-request - PR creation with proper format

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!