ワンクリックで
create-service
Creates a service layer with persistence for a Ybyra domain, implementing ServiceContract with optional custom methods.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Creates a service layer with persistence for a Ybyra domain, implementing ServiceContract with optional custom methods.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Adds a custom action to a Ybyra schema with handler, positioning, variant, and scope configuration.
Adds a new field to an existing Ybyra schema with proper type, configuration, i18n keys, and event wiring.
Generate or update internationalization (i18n) locale files for an Ybyra domain. Use when the user asks to add translations, create locale files, or update labels for a domain's fields, groups, and actions.
Creates a complete domain structure for Ybyra — schema, events, handlers, and hooks — from a natural language description of the entity.
Creates all CRUD pages (list, add, view, edit) with routing for a Ybyra domain in any supported framework — React Web, React Native, Vue/Quasar, or SvelteKit.
| name | create-service |
| description | Creates a service layer with persistence for a Ybyra domain, implementing ServiceContract with optional custom methods. |
Generate the application service for a Ybyra domain entity.
src/application/{domain}/
{domain}Service.ts ← ServiceContract implementation
import { createService } from "@ybyra/core";
import type { PersistenceContract } from "@ybyra/core";
import { {Domain}Schema } from "../../domain/{domain}";
export function create{Domain}Service(driver: PersistenceContract) {
return {
...createService({Domain}Schema, driver),
// Custom methods beyond CRUD:
// async customMethod(param: string) { ... }
};
}
createService(Schema, driver) provides standard CRUD: list, find, create, update, removedriver parameter is a PersistenceContract — the actual storage backendcreateService() to inherit all CRUD, then add custom methodsimport { createWebDriver } from "@ybyra/persistence/web";
const driver = createWebDriver();
import { createLocalDriver } from "@ybyra/persistence";
const driver = createLocalDriver();
import type { PersistenceContract } from "@ybyra/core";
const driver: PersistenceContract = {
async list(domain, options) { /* fetch from API */ },
async find(domain, id) { /* GET /api/{domain}/{id} */ },
async create(domain, data) { /* POST /api/{domain} */ },
async update(domain, id, data) { /* PUT /api/{domain}/{id} */ },
async remove(domain, id) { /* DELETE /api/{domain}/{id} */ },
};
Each application creates a setup file that wires service → handlers → hooks:
// src/setup.ts or src/demo.ts
import { createWebDriver } from "@ybyra/persistence/web";
import { create{Domain}Service } from "./application/{domain}/{domain}Service";
import { create{Domain}Handlers } from "./domain/{domain}";
import { create{Domain}Hooks } from "./domain/{domain}";
const driver = createWebDriver();
export const {domain}Service = create{Domain}Service(driver);
export const {domain}Handlers = create{Domain}Handlers({domain}Service);
export const {domain}Hooks = create{Domain}Hooks({domain}Service);