- [Overview](#overview)
/plugin marketplace add secondsky/sap-skills/plugin install sapui5-cli@sap-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdreferences/benchmarking.mdreferences/build-process.mdreferences/cli-commands.mdreferences/code-analysis.mdreferences/configuration.mdreferences/es-support.mdreferences/extensibility.mdreferences/filesystem-api.mdreferences/migration-guides.mdreferences/project-structures.mdreferences/server-features.mdreferences/troubleshooting.mdtemplates/custom-middleware-template.jstemplates/custom-task-template.jstemplates/ui5-workspace.yamltemplates/ui5.yaml.applicationtemplates/ui5.yaml.libraryThis skill provides comprehensive guidance for working with the UI5 CLI (UI5 Tooling), the official command-line interface for developing, building, and deploying SAPUI5 and OpenUI5 applications and libraries.
Current CLI Version: 4.0.0+ (Released July 24, 2024) Node.js Requirements: v20.11.0+ or v22.0.0+ (v21 not supported) npm Requirements: v8.0.0+
Use this skill when you need to:
# 1. Install UI5 CLI (choose one)
npm install --global @ui5/cli # Global installation
npm install --save-dev @ui5/cli # Project-level installation
# 2. Initialize project (if new)
npm init --yes # Initialize npm
ui5 init # Create ui5.yaml
# 3. Select framework variant
ui5 use openui5@latest # For OpenUI5
ui5 use sapui5@latest # For SAPUI5
# 4. Add framework libraries
ui5 add sap.ui.core sap.m sap.ui.table themelib_sap_fiori_3
# 5. Start development
ui5 serve # Start dev server
ui5 serve --open index.html # Start and open browser
# 6. Build for production
ui5 build --all # Build with dependencies
ui5 build --clean-dest # Clean before building
# 1. Enable CLI support
ui5 init
# 2. Configure framework (if ui5.yaml exists)
ui5 use openui5@latest # or sapui5@latest
# 3. Verify setup
ui5 tree # Show dependency tree
ui5 serve # Test development server
UI5 CLI supports four project types, each with specific configurations:
Standard UI5 applications with a webapp directory.
webapp/ → /templates/ui5.yaml.application for configuration templateReusable component libraries for sharing across projects.
src/ → /resources, test/ → /test-resourcessrc/my/company/library/)templates/ui5.yaml.library for configuration templateProvides theming resources for libraries.
my/library/themes/custom_theme/)references/configuration.md for detailed configurationThird-party resources with flexible path mapping.
references/project-types.md for module configurationui5 init # Initialize UI5 CLI configuration
ui5 use <framework>[@version] # Set framework (openui5/sapui5)
ui5 add <libraries...> # Add framework libraries
ui5 remove <libraries...> # Remove framework libraries
ui5 serve [options] # Start development server
--port <number> # Specify port (default: 8080)
--open <path> # Open browser to path
--h2 # Enable HTTP/2
--accept-remote-connections # Allow non-localhost access
ui5 tree [options] # Display dependency tree
--flat # Show flat list
--level <number> # Limit tree depth
ui5 build [child-command] [options] # Build project
preload # Create preload bundles (default)
self-contained # Create standalone bundle
jsdoc # Generate JSDoc documentation
--all # Include all dependencies
--include-dependency <names> # Include specific dependencies
--exclude-dependency <names> # Exclude dependencies
--dest <path> # Output directory (default: ./dist)
--clean-dest # Clean destination before build
--create-build-manifest # Store build metadata
--experimental-css-variables # Generate CSS variable artifacts [experimental]
ui5 config set <key> [value] # Set configuration value
ui5 config get <key> # Get configuration value
ui5 config list # List all settings
# Common configurations
ui5 config set ui5DataDir /path/.ui5 # Change cache directory
ui5 versions # Display all module versions
ui5 --help # Display help
ui5 --version # Display version
For complete command reference, see references/cli-commands.md.
specVersion: "4.0" # Specification version (required)
type: application # Project type (required)
metadata:
name: my.project.name # Project name (required)
copyright: "© ${currentYear} Company" # Optional copyright
framework:
name: SAPUI5 # OpenUI5 or SAPUI5
version: "1.120.0" # Framework version
libraries:
- name: sap.ui.core
- name: sap.m
- name: sap.ui.table
- name: themelib_sap_fiori_3
optional: true # Optional library
resources:
configuration:
paths:
webapp: webapp # Path mapping
propertiesFileSourceEncoding: UTF-8 # Encoding (default: UTF-8)
builder:
resources:
excludes:
- "index.html" # Exclude from build
- "/resources/my/project/test/**"
server:
settings:
httpPort: 8080 # HTTP port
httpsPort: 8443 # HTTPS port
For complete configuration reference, see references/configuration.md.
This main skill file provides essential workflows and quick reference. For detailed information on specific topics, refer to these reference files:
references/cli-commands.md: Complete CLI command reference with all options and examplesreferences/configuration.md: Comprehensive ui5.yaml configuration guide (includes workspace config)references/project-structures.md: Detailed project types with directory structures and build output stylesreferences/extensibility.md: Custom tasks, middleware, and project shims with complete API documentationreferences/filesystem-api.md: Complete FileSystem API for custom task/middleware developmentreferences/build-process.md: Complete build process including tasks, minification, source maps, and bundlingreferences/server-features.md: Complete server documentation with middleware stack, HTTP/2, SSL, and CSPreferences/code-analysis.md: Dependency analyzers, JSDoc generation, and code analysis featuresreferences/es-support.md: Complete ECMAScript version support, restrictions, and module format requirementsreferences/benchmarking.md: Performance testing and benchmarking with hyperfinereferences/migration-guides.md: Complete version migration guides (v1→v2→v3→v4)references/troubleshooting.md: Common issues, errors, and solutions with exact error messagesWhen to use: Starting a new SAPUI5/OpenUI5 application from scratch.
Steps:
npm init --yesnpm install --save-dev @ui5/cliui5 initui5 use sapui5@latest (or openui5@latest)ui5 add sap.ui.core sap.m themelib_sap_fiori_3ui5 servegit add ui5.yaml package.json && git commitWhen to use: Adding UI5 CLI support to an existing UI5 project.
Steps:
ui5 init to create ui5.yamlui5 use sapui5@latestui5 add sap.ui.core sap.m sap.ui.tableresources.configuration.paths if neededui5 serveui5 build --allWhen to use: Extending the build process with custom processing.
Steps:
lib/tasks/customTask.js)templates/custom-task-template.js)ui5 buildreferences/extensibility.mdWhen to use: Managing multiple related UI5 projects in a single repository.
Steps:
--workspace <name> flag to activate specific workspaceui5 tree to verify dependency resolutionreferences/configuration.md (workspace section)When to use: Upgrading from UI5 CLI v3 to v4.
Prerequisites:
Steps:
npm install --save-dev @ui5/cli@latest"4.0"references/migration-guides.mdusePredefineCalls bundle option if presentasync: true for modern loadingui5 build --allui5 serveQuestion: Which framework should I use?
Does project need SAP-specific components (e.g., sap.ui.comp, sap.ushell)?
├─ YES → Use SAPUI5
│ └─ Command: ui5 use sapui5@latest
└─ NO → Can use OpenUI5
└─ Command: ui5 use openui5@latest
Note: SAPUI5 projects can depend on OpenUI5, but not vice versa.
Question: Which build type should I use?
What is the deployment target?
├─ Standard deployment (with separate framework loading)
│ └─ Use: ui5 build --all
│
├─ Standalone deployment (single bundle with framework)
│ └─ Use: ui5 build self-contained --all
│
├─ Documentation generation
│ └─ Use: ui5 build jsdoc
│
└─ Development/testing (no build needed)
└─ Use: ui5 serve
Question: Should I create a custom task or middleware?
What do you need to extend?
├─ Build process (modify/generate resources during build)
│ └─ Create custom task (see templates/custom-task-template.js)
│ Examples: Transpiling, image optimization, file generation
│
├─ Development server (modify requests/responses during dev)
│ └─ Create custom middleware (see templates/custom-middleware-template.js)
│ Examples: Proxying, authentication, dynamic content
│
└─ Third-party library configuration
└─ Create project shim (see references/extensibility.md)
Examples: Configuring non-UI5 npm packages
This skill provides working templates for common configurations:
templates/ui5.yaml.application: Complete application configurationtemplates/ui5.yaml.library: Complete library configurationtemplates/ui5-workspace.yaml: Monorepo workspace setuptemplates/custom-task-template.js: Custom build task boilerplatetemplates/custom-middleware-template.js: Custom server middleware boilerplateUI5 CLI uses specification versions to manage features:
Always use the latest specVersion for new projects.
Important: During development, always use ui5 serve instead of ui5 build. Building should only occur when deploying to production. The development server provides:
When both global and local UI5 CLI installations exist, the local version takes precedence automatically. This allows different projects to use different CLI versions.
Override behavior: UI5_CLI_NO_LOCAL=X ui5 serve
UI5 CLI caches framework versions in ~/.ui5/ (configurable via ui5DataDir).
Clear cache: rm -rf ~/.ui5/framework/
UI5 CLI does not support JavaScript modules with import/export syntax. All modules must use sap.ui.define format.
Unsupported:
import Module from './module.js';
export default MyClass;
Supported:
sap.ui.define(['./module'], function(Module) {
return MyClass;
});
Expressions in template literals cannot be used in:
Unsupported:
sap.ui.define([`modules/${moduleName}`], ...); // Will fail
JavaScript modules requiring 'top level scope' cannot be bundled as strings. They will be omitted from bundles with error logging.
For UI5 1.71, manifest _version property must be ≤ 1.17.0 for supportedLocales generation. Update manifest version to match UI5 framework version.
For detailed troubleshooting, see references/troubleshooting.md.
Issue: ERR_SSL_PROTOCOL_ERROR in Chrome when accessing HTTP server
Solution: Chrome enforces HTTPS via HSTS. Clear HSTS settings:
chrome://net-internals/#hstsIssue: Excessive disk space in ~/.ui5/
Solution: Clear cached framework versions:
rm -rf ~/.ui5/framework/
Issue: Build fails with "TypeError: invalid input"
Solution: Check manifest _version compatibility with UI5 framework version. For UI5 1.71, use manifest version ≤ 1.17.0.
Issue: Custom task not executing
Solution: Verify task configuration:
beforeTask or afterTask references valid task nameui5 build --verbose for detailed loggingUI5_LOG_LVL: Set log level (silent/error/warn/info/perf/verbose/silly)UI5_DATA_DIR: Override default data directory (~/.ui5)UI5_CLI_NO_LOCAL: Disable local CLI precedence (use global)Examples:
UI5_LOG_LVL=verbose ui5 build
UI5_DATA_DIR=/custom/.ui5 ui5 serve
--save-dev)ui5 serve --h2)ui5 build --clean-dest --all)references/cli-commands.md - Complete CLI command referencereferences/configuration.md - Configuration options and ui5.yamlreferences/project-structures.md - Project structure patternsreferences/server-features.md - Development server featuresreferences/build-process.md - Build process and optimizationreferences/es-support.md - ES module supportreferences/extensibility.md - Extensibility optionsreferences/code-analysis.md - Code analysis toolsreferences/migration-guides.md - Migration from older versionsreferences/troubleshooting.md - Common issues and solutionsreferences/benchmarking.md - Performance benchmarkingtemplates/package.json.template - Package.json templateThis skill follows official Anthropic Agent Skills best practices and SAP UI5 CLI documentation standards.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.