원클릭으로
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 직업 분류 기준
| 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();
}
}
}
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.