ワンクリックで
add-action
Adds a custom action to a Ybyra schema with handler, positioning, variant, and scope configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Adds a custom action to a Ybyra schema with handler, positioning, variant, and scope configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
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.
Creates a service layer with persistence for a Ybyra domain, implementing ServiceContract with optional custom methods.
| name | add-action |
| description | Adds a custom action to a Ybyra schema with handler, positioning, variant, and scope configuration. |
Add a new action button to an existing Ybyra domain.
schema.ts)import { action, Position, Scope } from "@ybyra/core";
actions: {
// ... existing actions
export: action()
.order(2) // display order
.primary() // variant: primary | destructive | warning | info | success
.positions(Position.header) // header | footer | floating
.scopes(Scope.index), // which scopes show this action
}
| Method | Description |
|---|---|
.order(n) | Display order (lower = first, negative allowed) |
.primary() | Blue/primary variant |
.destructive() | Red/danger variant |
.warning() | Yellow/warning variant |
.info() | Neutral/info variant |
.success() | Green/success variant |
.positions(Position.header) | Where to render |
.scopes(Scope.index) | Whitelist scopes |
.excludeScopes(Scope.view) | Blacklist scopes |
.hidden() | Hidden (override inherited) |
null | Remove inherited action |
handlers.ts)export function create ExampleHandlers(service: ServiceContract) {
return ExampleSchema.handlers({
...createDefault(service),
// Handler name must match action name
export ({ state, component, form, table }) {
// state — current form/table record
// component.navigator.push(path) — navigate
// component.dialog.confirm(msg) — show dialog
// component.toast.success(msg) — show toast
// component.loading.show() / hide() — loading overlay
// form.validate() — trigger validation
// form.reset() — reset form
// table.reload() — refresh table data
},
});
}
{domain}: {
// ... existing keys
actions: {
export: "Export",
},
}
actions: {
save: action().hidden(), // hide inherited save
remove: null, // completely remove inherited remove
back: action().order(-100), // reorder inherited back
}
async export({ state, component }) {
const confirmed = await component.dialog.confirm("person.export.confirm");
if (confirmed) {
component.loading.show();
try {
await service.exportAll();
component.toast.success("person.export.success");
} finally {
component.loading.hide();
}
}
}