Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

umbraco-workspaceumbraco 工作区

Agent Skill

umbraco-workspace 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,231

周安装

136

GitHub Stars

23

下载量

1,132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:umbraco-workspace(umbraco 工作区)
来源仓库:https://github.com/umbraco/umbraco-cms-backoffice-skills
仓库路径:skills/umbraco-workspace
安装命令:
npx skills add https://github.com/umbraco/umbraco-cms-backoffice-skills --skill umbraco-workspace
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/umbraco/umbraco-cms-backoffice-skills --skill umbraco-workspace

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • umbraco-workspace 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Umbraco Workspace

What is it?

Workspaces are dedicated editing environments designed for specific entity types in Umbraco. They create isolated areas where users can edit content, media, members, and other entities with specialized interfaces tailored to each type. Workspaces maintain draft copies of entity data separate from published versions and support multiple extension types including contexts, views, actions, and footer apps.

Documentation

Always fetch the latest docs before implementing:

CRITICAL: Workspace Kinds

kind: 'default' vs kind: 'routable'

Featurekind: 'default'kind: 'routable'
Use caseStatic pages, root workspacesEntity editing with unique IDs
Tree integrationNo selection stateProper selection state
URL routingNo route paramsSupports edit/:unique
ContextSimpleHas unique observable

For tree item navigation, ALWAYS use kind: 'routable' - otherwise:

  • Tree item selection won't update when clicking between items
  • Navigation between same-type items won't work
  • "Forever loading" can occur

Routable Workspace Context Pattern

For kind: 'routable' workspaces, you MUST create a workspace context class:

import { UmbWorkspaceRouteManager, UMB_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace';
import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
import { LitElement, html } from '@umbraco-cms/backoffice/external/lit';
import { customElement } from '@umbraco-cms/backoffice/external/lit';

// Workspace editor element that renders views
@customElement('my-workspace-editor')
class MyWorkspaceEditorElement extends LitElement {
  override render() {
    return html`<umb-workspace-editor></umb-workspace-editor>`;
  }
}

interface MyEntityData {
  unique: string;
  name?: string;
}

export class MyWorkspaceContext extends UmbContextBase {
  public readonly workspaceAlias = 'My.Workspace';

  #data = new UmbObjectState<MyEntityData | undefined>(undefined);
  readonly data = this.#data.asObservable();

  // CRITICAL: Observable unique for workspace views to consume
  readonly unique = this.#data.asObservablePart((data) => data?.unique);
  readonly name = this.#data.asObservablePart((data) => data?.name);

  readonly routes = new UmbWorkspaceRouteManager(this);

  constructor(host: UmbControllerHost) {
    super(host, UMB_WORKSPACE_CONTEXT);

    // Route pattern for tree item navigation
    this.routes.setRoutes([
      {
        path: 'edit/:unique',
        component: MyWorkspaceEditorElement,
        setup: (_component, info) => {
          const unique = info.match.params.unique;
          this.load(unique);
        },
      },
    ]);
  }

  async load(unique: string) {
    // Load entity data and update state
    this.#data.setValue({ unique });
  }

  getUnique() {
    return this.#data.getValue()?.unique;
  }

  getEntityType() {
    return 'my-entity';  // Must match tree item entityType!
  }

  public override destroy(): void {
    this.#data.destroy();
    super.destroy();
  }
}

export { MyWorkspaceContext as api };

Workspace View Consuming Context

Workspace views observe the context's unique to react to navigation:

import { UMB_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace';

override connectedCallback() {
  super.connectedCallback();

  this.consumeContext(UMB_WORKSPACE_CONTEXT, (context) => {
    if (!context) return;

    // Observe unique - will fire when navigating between items
    this.observe((context as any).unique, (unique: string | null) => {
      if (unique) {
        this._loadData(unique);
      }
    });
  });
}

Reference Examples

The Umbraco source includes working examples:

Workspace Context Counter: /Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/workspace-context-counter/

This example demonstrates a workspace with context, views, and footer apps. Includes unit tests.

Workspace Context Initial Name: /Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/workspace-context-initial-name/

This example shows workspace context initialization patterns.

Workspace View Hint: /Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/workspace-view-hint/

This example demonstrates workspace view hints and metadata.

Related Foundation Skills

If you need to explain these foundational concepts when implementing workspaces, reference these skills:

  • Context API: When implementing workspace contexts, context consumption, or explaining workspace extension communication

- Reference skill: umbraco-context-api

  • State Management: When implementing draft state, observables, reactive updates, or workspace data management

- Reference skill: umbraco-state-management

  • Umbraco Element: When implementing workspace view elements, explaining UmbElementMixin, or creating workspace components

- Reference skill: umbraco-umbraco-element

  • Controllers: When implementing workspace actions, controllers, side effects, or action logic

- Reference skill: umbraco-controllers

  • Trees: When workspace is linked to tree navigation

- Reference skill: umbraco-tree

Workflow

  1. Fetch docs - Use WebFetch on the documentation URLs above to get current code examples and patterns
  2. Ask questions - What entity type? What views needed? What actions? Is this linked to a tree?
  3. Choose kind - Use kind: 'routable' for tree navigation, kind: 'default' for static pages
  4. Generate files - Create manifest + workspace context + views + actions based on the fetched docs
  5. Add project reference - The extension must be referenced by the main Umbraco project to work:

- Search for .csproj files in the current working directory - If exactly one Umbraco instance is found, add the reference to it - If multiple Umbraco instances are found, ask the user which one to use - If no Umbraco instance is found, ask the user for the path

  1. Explain - Show what was created and how to test

Minimal Manifest Example

export const manifests: UmbExtensionManifest[] = [
  // Routable workspace for tree integration
  {
    type: 'workspace',
    kind: 'routable',
    alias: 'My.Workspace',
    name: 'My Workspace',
    api: () => import('./my-workspace.context.js'),
    meta: {
      entityType: 'my-entity',  // Must match tree item entityType!
    },
  },
  // Workspace view
  {
    type: 'workspaceView',
    alias: 'My.WorkspaceView',
    name: 'My Workspace View',
    element: () => import('./my-workspace-view.element.js'),
    weight: 100,
    meta: {
      label: 'Details',
      pathname: 'details',
      icon: 'icon-info',
    },
    conditions: [
      {
        alias: 'Umb.Condition.WorkspaceAlias',
        match: 'My.Workspace',
      },
    ],
  },
];

Always fetch fresh docs before generating code - the API and patterns may have changed.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.81%
按下载量换算405

Claude

30.15%
按下载量换算341

Cursor

16.71%
按下载量换算189

Gemini CLI

8.63%
按下载量换算98

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills