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

building-ui-bundle-app构建 ui 捆绑应用程序

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

8,114

周安装

345

GitHub Stars

212

下载量

2,843
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:building-ui-bundle-app(构建 ui 捆绑应用程序)
来源仓库:https://github.com/forcedotcom/afv-library
仓库路径:skills/building-ui-bundle-app
安装命令:
npx skills add https://github.com/forcedotcom/afv-library --skill building-ui-bundle-app
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/forcedotcom/afv-library --skill building-ui-bundle-app

简介

从自然语言描述自动生成完整的 Salesforce React UI 应用包。

  • 适用于快速原型开发或构建非 LWC 前端应用的全栈解决方案。
  • 按依赖顺序调用专用技能,生成脚手架、功能模块与数据访问层。
  • 需明确目标平台与认证方式,避免生成无法部署的孤立代码。
  • 生产环境使用前应审查权限模型与安全边界,防止越权访问。

SKILL.md

Building a UI Bundle App

Overview

Build a complete, deployable Salesforce React UI bundle application from a natural language description by orchestrating specialized UI bundle skills in correct dependency order. Each skill MUST be explicitly loaded before executing its phase.

When to Use This Skill

Use when:

  • User requests a "React app", "UI bundle", "web app", or "full-stack app" on Salesforce
  • User says "build an app", "create an application" and the context implies a non-LWC based frontend (e.g. React)
  • The work produces a complete UI bundle with scaffolding, features, data access, and UI -- not a single component in isolation

Examples that should trigger this skill:

  • "Build a React app for managing customer cases with Salesforce data"
  • "Create a UI bundle for an employee directory with search and navigation"
  • "I need a full-stack React app with authentication, data tables, and file uploads"
  • "Build a coffee shop ordering app on Salesforce"

Do NOT use when:

  • Creating a single page or component (use building-ui-bundle-frontend)
  • Only installing a feature (use generating-ui-bundle-features)
  • Only setting up data access (use using-ui-bundle-salesforce-data)
  • Only deploying an existing app (use deploying-ui-bundle)
  • Building a Lightning Experience app with custom objects and metadata (use generating-lightning-app)
  • Troubleshooting or debugging an existing UI bundle

Dependency Graph & Build Order

Phase 1: Scaffolding (Foundation)

UI Bundle scaffold (sf template generate ui-bundle)
    v
Install dependencies (npm install)
    v
Bundle metadata (uibundle-meta.xml, ui-bundle.json)
    v
CSP Trusted Sites (if external domains needed)

Creates the UI bundle directory structure, meta XML, and optional routing/headers config. All subsequent phases require the scaffold to exist.

Phase 2: Features (Optional)

Search project code (src/) for existing implementations
    v
Install dependencies (npm install)
    v
Search, describe, and install features (auth, shadcn, search, navigation, GraphQL)
    v
Resolve conflicts (two-pass: --on-conflict error, then --conflict-resolution)
    v
Integrate __example__ files into target files, then delete them

Installs pre-built, tested feature packages. Skip if the app requires no pre-built features. Always check for an existing feature before building from scratch. Features provide the foundation that UI components build on top of.

Phase 3: Data Access (Backend Wiring)

Acquire schema (npm run graphql:schema)
    v
Look up entity schema (graphql-search.sh, max 2 runs)
    v
Generate queries/mutations (use verified field names, @optional on all record fields)
    v
Validate and test (npx eslint, ask user before testing mutations)

Sets up the data layer using @salesforce/sdk-data. GraphQL is preferred for record operations; REST for Connect, Apex, or UI API endpoints.

Phase 4: UI (Frontend)

Layout, navigation, header, and footer (appLayout.tsx)
    v
Pages (routed views)
    v
Components (widgets, forms, tables)

Builds the React UI. References the data layer from Phase 3 and the features from Phase 2. Must replace all boilerplate and placeholder content.

Phase 5: Integrations (Optional)

Agentforce chat widget (if requested)
File upload API (if requested)

These are independent and can be executed in parallel if both are needed.

Phase 6: Deployment

Org authentication
    v
Pre-deploy UI bundle build (npm install + npm run build)
    v
Deploy metadata
    v
Post-deploy configuration (permissions, profiles, named credentials, connected apps, custom settings, flow activation)
    v
Import data (if data plan exists)
    v
Fetch GraphQL schema and run codegen
*(Re-fetches schema from the deployed org -- required because the remote schema may differ from the local one used in Phase 3)*
    v
Final UI bundle build (rebuilds with the deployed schema)

Follows the canonical 7-step deployment sequence. Must deploy metadata before fetching schema. Must assign permissions before schema fetch.

Phase 7: Experience Site (Optional)

Resolve site properties (siteName, appDevName, etc.)
    v
Generate site metadata (Network, CustomSite, DigitalExperience)
    v
Deploy site infrastructure

Creates the Digital Experience site that hosts the UI bundle. Only needed when the user wants a public-facing or authenticated site URL.


Execution Workflow

STEP 1: Requirements Analysis & Planning

Actions:

  1. Parse the user's natural language request
  2. Identify the app name and purpose
  3. Extract pages and navigation structure
  4. Identify data entities and Salesforce objects needed
  5. Detect feature requirements (authentication, search, file upload, chat)
  6. Determine if an Experience Site is needed
  7. Identify external domains for CSP registration

Output: Build Plan

UI Bundle App Build Plan: [App Name]

SCAFFOLDING:
- App name: [PascalCase name]
- Routing: [SPA rewrites, trailing slash config]
- External domains: [domains needing CSP registration]

FEATURES:
- [list of features to install: auth, shadcn, search, navigation, etc.]

DATA ACCESS:
- Objects: [Salesforce objects to query/mutate]
- Queries: [list of GraphQL queries needed]
- REST endpoints: [Apex REST or Connect API calls, if any]

UI:
- Layout: [description of app shell/navigation]
- Pages: [list of pages with routes]
- Components: [key components per page]
- Design direction: [aesthetic/style intent]

INTEGRATIONS (if applicable):
- Agentforce chat: [yes/no, agent ID if known]
- File upload: [yes/no, record linking pattern]

DEPLOYMENT:
- Target org: [org alias if known]
- Experience Site: [yes/no, site name if applicable]

SKILL LOAD ORDER:
1. generating-ui-bundle-metadata
2. generating-ui-bundle-features (if features needed)
3. using-ui-bundle-salesforce-data (if data access needed)
4. building-ui-bundle-frontend
5a. implementing-ui-bundle-agentforce-conversation-client (if chat requested)
5b. implementing-ui-bundle-file-upload (if file upload requested)
6. deploying-ui-bundle
7. generating-experience-react-site (if site requested)

STEP 2: Per-Phase Execution

Execute each phase sequentially. Complete all steps within a phase before moving to the next. For each phase:

StepWhat to doWhy
1. Load skillInvoke the skill (e.g., via the Skill tool) for this phaseGives you the current rules, patterns, constraints, and implementation guides
2. ExecuteFollow the loaded skill's workflow to generate code/configThe skill defines HOW to do the work correctly
3. VerifyRun lint and build from the UI bundle directoryCatch errors before moving to the next phase
4. CheckpointConfirm phase completion before proceedingEnsures dependencies are satisfied for the next phase

Do NOT skip step 1 (loading the skill). Even if you remember the skill's content, skills evolve. Always load the current version.


Phase 1 -- Scaffolding

  • 1. Load skill: Invoke generating-ui-bundle-metadata
  • 1. Execute: Run sf template generate ui-bundle, install dependencies (npm install), configure meta XML, ui-bundle.json, and CSP trusted sites
  • 1. Verify: Confirm directory structure and metadata files exist
  • 1. Checkpoint: UI bundle scaffold is ready -- proceed to Phase 2

Phase 2 -- Features (skip if no pre-built features needed)

  • 1. Load skill: Invoke generating-ui-bundle-features
  • 1. Execute: Install dependencies, search and install features, integrate example files
  • 1. Verify: Run npm run build to confirm features integrate cleanly
  • 1. Checkpoint: Features installed -- proceed to Phase 3

Phase 3 -- Data Access (skip if no Salesforce data needed)

  • 1. Load skill: Invoke using-ui-bundle-salesforce-data
  • 1. Execute: Fetch schema, look up entities, generate queries/mutations, wire into components
  • 1. Verify: Run npx eslint on files with GraphQL queries
  • 1. Checkpoint: Data layer ready -- proceed to Phase 4

Phase 4 -- UI

  • 1. Load skill: Invoke building-ui-bundle-frontend
  • 1. Execute: Build layout, pages, components, navigation. Replace all boilerplate.
  • 1. Verify: Run lint and build -- 0 errors required
  • 1. Checkpoint: UI complete -- proceed to Phase 5

Phase 5 -- Integrations (skip if not requested)

  • 1. Load skill(s): Invoke implementing-ui-bundle-agentforce-conversation-client (5a) and/or implementing-ui-bundle-file-upload (5b). If both are needed, they are independent and can be executed in parallel.
  • 1. Execute: Follow each skill's workflow to add the integration
  • 1. Verify: Run lint and build
  • 1. Checkpoint: Integrations complete -- proceed to Phase 6

Phase 6 -- Deployment

  • 1. Load skill: Invoke deploying-ui-bundle
  • 1. Execute: Follow the 7-step deployment sequence (auth, build, deploy, permissions, data, schema, final build)
  • 1. Verify: Confirm deployment succeeds and app is accessible
  • 1. Checkpoint: App deployed -- proceed to Phase 7 if needed

Phase 7 -- Experience Site (skip if not requested)

  • 1. Load skill: Invoke generating-experience-react-site
  • 1. Execute: Resolve properties, generate site metadata, deploy
  • 1. Verify: Confirm site URL is accessible
  • 1. Checkpoint: Site live -- build complete

STEP 3: Final Summary

After all phases complete, present a build summary:

UI Bundle App Build Complete: [App Name]

PHASES COMPLETED:
[x] Phase 1: Scaffolding -- [app name] UI bundle created
[x] Phase 2: Features -- [list of features installed, or "skipped"]
[x] Phase 3: Data Access -- [list of entities wired up]
[x] Phase 4: UI -- [count] pages, [count] components
[x] Phase 5: Integrations -- [list or "none"]
[x] Phase 6: Deployment -- deployed to [org]
[x] Phase 7: Experience Site -- [site URL or "skipped"]

FILES GENERATED:
[list key files and their paths]

NEXT STEPS:
[any manual steps the user should take]

Validation

Before presenting the build as complete, verify:

  • Scaffold exists: UI bundle directory with valid meta XML and ui-bundle.json
  • Dependencies installed: node_modules/ exists and package.json has expected packages
  • Build passes: npm run build produces dist/ with no errors
  • Lint passes: npx eslint src/ reports 0 errors
  • No boilerplate: All placeholder text, default titles, and template content has been replaced
  • Navigation works: appLayout.tsx has real nav items matching created pages
  • Data layer wired: Components use @salesforce/sdk-data (if data access phase was executed)
  • CSP registered: All external domains have CSP Trusted Site metadata (if applicable)

Error Handling

Category 1: Stop and Ask User

  • App purpose is too vague to determine pages or data needs
  • User wants features that conflict (e.g., "no authentication" + "show user-specific data")
  • Target org is unknown and deployment is requested

Category 2: Log Warning, Continue

  • A feature install has minor conflicts (resolve and continue)
  • Optional integration setup encounters non-blocking issues
  • Build has non-error warnings

Best Practices

1. Always Follow Phase Order

Never build UI before installing features. Never deploy before building. Dependencies are strict.

2. Replace All Boilerplate

Every generated app must feel purpose-built. Replace "React App" titles, "Vite + React" placeholders, and all default content with real app-specific text and branding.

3. Design with Intent

Follow the design thinking and frontend aesthetics guidance from building-ui-bundle-frontend. Every app should have a clear visual direction -- not generic defaults.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.52%
按下载量换算1,038

Claude

31.99%
按下载量换算909

Cursor

17.41%
按下载量换算495

Gemini CLI

8.92%
按下载量换算254

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/forcedotcom/afv-library --skill building-ui-bundle-app 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills