用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/umbraco/Umbraco-CMS-Backoffice-Skills --skill umbraco-property-action命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Run tests from skill examples and generate a report (project)
Validate links and references in SKILL.md files using deterministic scripts
Umbraco backoffice extension customisation - complete working examples showing how extension types combine
正在显示 SKILL.md
基于 SOC 职业分类
| name | umbraco-property-action |
| description | Implement property actions in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
Property Actions are buttons that appear next to property labels in the backoffice, providing secondary functionality for property editors. They expand to show available actions when clicked. Property Actions let you add auxiliary features to existing property editors without modifying the editors themselves - useful for shortcuts, transformations, or context-specific operations.
Always fetch the latest docs before implementing:
Context API: When accessing property context to read/modify values
umbraco-context-apiModals: When the action opens a modal dialog
umbraco-modalsimport type { ManifestPropertyAction } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestPropertyAction = {
type: 'propertyAction',
alias: 'My.PropertyAction.Clear',
name: 'Clear Value',
api: () => import('./clear-action.js'),
forPropertyEditorUis: ['Umb.PropertyEditorUi.TextBox', 'Umb.PropertyEditorUi.TextArea'],
meta: {
icon: 'icon-trash',
label: 'Clear',
},
weight: 100,
};
export const manifests = [manifest];
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
export class ClearPropertyAction extends UmbPropertyActionBase {
constructor(host: UmbControllerHost, args: any) {
super(host, args);
}
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
propertyContext?.setValue('');
}
}
export default ClearPropertyAction;
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
export class UppercasePropertyAction extends UmbPropertyActionBase {
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
const currentValue = propertyContext?.getValue() as string;
if (currentValue) {
propertyContext?.setValue(currentValue.toUpperCase());
}
}
}
export default UppercasePropertyAction;
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
export class PickerPropertyAction extends UmbPropertyActionBase {
async execute() {
const propertyContext = await this.getContext(UMB_PROPERTY_CONTEXT);
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
const modal = modalManager.open(this, MY_PICKER_MODAL, {
data: {
currentValue: propertyContext?.getValue(),
},
});
const result = await modal.onSubmit();
if (result?.value) {
propertyContext?.setValue(result.value);
}
}
}
export default PickerPropertyAction;
const manifest: ManifestPropertyAction = {
type: 'propertyAction',
alias: 'My.PropertyAction.Copy',
name: 'Copy to Clipboard',
api: () => import('./copy-action.js'),
// Omit forPropertyEditorUis to target all editors
meta: {
icon: 'icon-documents',
label: 'Copy',
},
};
Umb.PropertyEditorUi.TextBoxUmb.PropertyEditorUi.TextAreaUmb.PropertyEditorUi.RichTextUmb.PropertyEditorUi.IntegerUmb.PropertyEditorUi.DecimalUmb.PropertyEditorUi.ContentPickerUmb.PropertyEditorUi.MediaPickerThat's it! Always fetch fresh docs, keep examples minimal, generate complete working code.