workfront-ui-extension
БесплатноЗапускает вложенные скриптыНе проверенUse when building or editing the React/Spectrum front-end SPA of a Workfront App Builder extension. Reach for this whenever the user is: registering or…
от adobe★ 342 звезды на GitHubОб этом скилле
Workfront UI extension (front end)
Part of the appbuilder-workfront family. This is the front end — the app screens the user sees (the "SPA"). It registers extension points (the spots where the app appears in Workfront) and calls Runtime actions (the cloud back end) for all data.
This skill is the Workfront-specific front end (extension points, WF shared context). For generic React/Spectrum patterns (pages, forms, data tables, dialogs, navigation) and ExC Shell / AEM UI surfaces, use
appbuilder-ui-scaffolder. A ready-to-edit registration example is inassets/ExtensionRegistration.example.js.
Rules
- One
register()call wires everything up; individual views useattach(). - Auth comes from
sharedContext+getWFInstanceUrl()— Workfront supplies the signed-in user and instance; don't build a login. - Talk to the back end with
actionWebInvokeonly — the browser must never call Workfront directly (/attask/api/…). Back-end code lives inworkfront-actions. - Every action replies with
{ data, error }— always checkerrorbefore usingdata.
Extension points (in ExtensionRegistration)
register() takes id at the top level (a non-empty slug identifying the extension); the extension points go inside methods. Each item's url must map to a route in App.js, and every id must be unique.
const guestConnection = await register({
id: extensionId, // top-level id, non-empty
metadata, // from app-metadata.json (generated by a build hook)
methods: {
id: extensionId, // ⚠️ REQUIRED here too — the menu item won't render without it (see Gotchas)
mainMenu: {
getItems() { return [{ id, url: '/index.html#/route', label, icon }] }
},
secondaryNav: { // left panel, per object type
PROJECT: { getItems() { return [{ id, label, icon, url: '/route' }] } },
// register each separately: PROJECT, TASK, ISSUE, PORTFOLIO, PROGRAM
},
widgets: { // embed in a custom-form field
getItems() {
return [{
id, url: '/index.html#/widgets1', label,
dimensions: { height, width, maxHeight, maxWidth } // all optional
}]
}
},
}
})
Widget id/url/label are required; dimensions is optional.
Routing (App.js)
Add a <Route> per extension-point url:
<Route exact path="custom-application" element={<CustomApplication />} />
Shared context
sharedContext is get-only (.get(key) — not iterable). Confirmed shape from the Workfront host:
const ctx = conn?.sharedContext
const auth = ctx?.get('auth') // { imsClientId, imsOrgID, imsToken }
const user = ctx?.get('user') // { ID, email }
const host = ctx?.get('hostname') // e.g. ai-dev-arm.devtest.workfront-dev.adobe.com (no protocol)
// also: protocol; plus objCode, objID, isLoginAs, isInBulkEditing on object-scoped points
const imsToken = auth?.imsToken
const imsOrgId = auth?.imsOrgID // ⚠️ key is `imsOrgID` (capital ID) — NOT imsOrgId / imsOrg
Everything an action needs is right here — pass imsToken, imsOrgId (auth.imsOrgID), and host into actionWebInvoke. Don't call Workfront for the org: it's in auth, and a cross-origin currentUser fetch from the SPA is CORS-blocked anyway. Only set the x-gw-ims-org-id header when you have a value — Fetch turns undefined into the string "undefined" (→ 401 Org Id undefined). Widgets receive the same context.
Workers / errors
Do heavy CSV/XLSX (spreadsheet) work in Web Workers — background threads, so the screen doesn't freeze — but never call the WF API inside a worker. Show a toast (small popup notice) on failure; never expose tokens.
Gotchas (from building a real Main Menu extension)
- Main Menu item not rendering? It's the
id, and the fix is trivial. The WF template scaffoldsregister({ metadata, methods: { id: extensionId, mainMenu } })withextensionId = ''inConstants.js. Two things are required for the item to appear: (1) giveextensionIda non-empty value inConstants.js, and (2) keepid: extensionIdundermethods— that placement is exactly what the menu needs; if you remove it, the item still registers (Workfront even callsgetItems) but silently never renders. Simplest working form: setextensionId, and keepid: extensionIdinsidemethods(having it at the top level of the config too is fine). Don't be thrown off by reading@adobe/uix-guest:register(config)doesnew GuestServer(config.id)thenguest.register(config.methods, …)and just forwardsmethodsto the host — so from the guest source a baremethods.idlooks like an ignored no-op. It isn't: Workfront's host side consumesmethods.id, and that behavior isn't visible in the guest package. Verified in a live Main Menu extension — the item does not render without it. *(This is easy to
Установить workfront-ui-extension в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл workfront-ui-extension?
Use when building or editing the React/Spectrum front-end SPA of a Workfront App Builder extension. Reach for this whenever the user is: registering or changing extension points in `ExtensionRegistration` — a Main Menu button, a left-panel (`secondaryNav`) item for a specific Workfront object type (Project, Task, Issue, Portfolio, Program), or a custom-form widget with specific height and width; adding a new route in `App.js` to match an extension point URL; reading the Workfront shared context to get the current user, `objCode`, `objID`, or `hostname`; calling a Runtime action from the SPA via `actionWebInvoke`; or debugging a widget or route that renders blank after being registered. Never call Workfront or Adobe APIs directly from the SPA — all API calls belong in a Runtime action (see `workfront-actions`).
Как установить скилл workfront-ui-extension?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл workfront-ui-extension запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic