用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/umbraco/Umbraco-CMS-Backoffice-Skills --skill umbraco-user-profile-app命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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-user-profile-app |
| description | Implement user profile apps in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
User Profile Apps are custom views/tabs that appear in the current user's profile section. They allow you to add custom functionality to the user profile area, such as preferences, activity logs, connected accounts, or any user-specific settings.
Always fetch the latest docs before implementing:
Umbraco Element: For implementing the profile app element
umbraco-umbraco-elementContext API: For accessing user context
umbraco-context-apiimport type { ManifestUserProfileApp } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestUserProfileApp = {
type: 'userProfileApp',
alias: 'My.UserProfileApp.Preferences',
name: 'User Preferences',
element: () => import('./preferences-app.element.js'),
meta: {
label: 'Preferences',
pathname: 'preferences',
},
};
export const manifests = [manifest];
import { html, css, customElement, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
@customElement('my-preferences-app')
export class MyPreferencesAppElement extends UmbLitElement {
@state()
private _userName?: string;
@state()
private _emailNotifications = true;
@state()
private _darkMode = false;
constructor() {
super();
this.consumeContext(UMB_CURRENT_USER_CONTEXT, (context) => {
this.observe(context.currentUser, (user) => {
this._userName = user?.name;
});
});
}
#handleEmailToggle() {
this._emailNotifications = !.;
.#();
}
#() {
. = !.;
.#();
}
#() {
.(, .({
: .,
: .,
}));
}
() {
html`;
}
styles = css`;
}
;
{
{
: ;
}
}
@customElement('my-activity-log-app')
export class MyActivityLogAppElement extends UmbLitElement {
@state()
private _activities: Array<{ action: string; date: string }> = [];
async connectedCallback() {
super.connectedCallback();
await this.#loadActivities();
}
async #loadActivities() {
// Fetch user activities from API
const response = await fetch('/api/user/activities');
this._activities = await response.json();
}
render() {
return html`
<uui-box headline="Recent Activity">
<uui-table>
<uui-table-head>
<uui-table-head-cell>Action</uui-table-head-cell>
<>Date
;
}
}
const manifest: ManifestUserProfileApp = {
type: 'userProfileApp',
alias: 'My.UserProfileApp.ConnectedAccounts',
name: 'Connected Accounts',
element: () => import('./connected-accounts.element.js'),
meta: {
label: 'Connected Accounts',
pathname: 'connected-accounts',
},
};
| Property | Description |
|---|---|
label | Tab label displayed in profile |
pathname | URL path segment for deep linking |
import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
this.consumeContext(UMB_CURRENT_USER_CONTEXT, (context) => {
this.observe(context.currentUser, (user) => {
// Access user properties
console.log(user?.name, user?.email, user?.unique);
});
});
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.