新增功能 API Skill

Scaffold complete CRUD modules with admin and API routes.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/smile95137a/kuji-client --skill api-skill-smile95137a
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 新增功能 API Skill
Source: https://github.com/smile95137a/kuji-client/tree/main/.github/skills/add-feature-api
Command: npx skills add https://github.com/smile95137a/kuji-client --skill api-skill-smile95137a

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides teams to rapidly scaffold a complete CRUD module that works across both admin (/admin) and api (/api) routes, ensuring project conventions and DTOs are consistently applied.

Core Features & Use Cases

  • Unified CRUD scaffolding: Controller, service, condition, req/Res DTOs, entity, mapper, and example MBG items organized by a standard layered structure.
  • Cross-layer consistency: Provides clear separation of concerns with admin and api controllers, request/response DTOs, and service interfaces.
  • Use Case: Create a ContactInquiry module from zero, including DB schema, query conditions, and REST endpoints.

Quick Start

Follow the Step 1 through Step 5 workflow to scaffold a complete CRUD module with admin and API routes.

Frequently Asked Questions about 新增功能 API Skill

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

FAQPage Schema
How do I scaffold a complete CRUD module with both admin and API routes?

To scaffold a complete CRUD module with admin and API routes, use a guided workflow that generates controllers, services, conditions, DTOs, entities, and mappers for both routing paths. This ensures consistent separation of concerns across backend layers.

What is the best way to generate backend CRUD layers without using PageHelper?

The best way to generate backend CRUD layers without using PageHelper is to apply a scaffolding process that enforces project-convention constraints. This generates standard controllers, services, and DTOs while strictly avoiding PageHelper for optional query conditions.

Can I generate request and response DTOs for separate admin and api controllers?

Yes, you can generate request and response DTOs for separate admin and api controllers. The scaffolding process provides clear separation of concerns by creating distinct admin and api controllers alongside their corresponding req/res DTOs and service interfaces.

How does cross-layer consistency work when creating a new backend service and controller?

Cross-layer consistency works by organizing generated components like controllers, services, conditions, and entities into a standard layered structure. This enforces consistent naming and optional query conditions across both admin and api paths during backend development.

What are the limitations of scaffolding CRUD features for backend development?

The main limitation of scaffolding CRUD features is that it enforces strict project-convention constraints, such as avoiding PageHelper usage entirely. Additionally, the generated module structure is rigidly organized into standard layers, requiring adherence to the specific admin and api routing separation.

Do I need an existing database schema to scaffold CRUD components and mappers?

You do not need an existing schema to start scaffolding CRUD components and mappers. You can create a module from zero, which includes generating the DB schema, query conditions, and REST endpoints alongside the entity and mapper files.