sapui5
The sapui5 skill provides comprehensive guidance for building enterprise web applications using the SAP UI5 framework. Use this skill when developing Fiori Elements applications, creating XML views and controllers, configuring OData integration, implementing data binding patterns, writing unit and integration tests, or troubleshooting UI5 development issues including responsive design, accessibility, and performance optimization with sap.m controls and metadata-driven controls.
git clone --depth 1 https://github.com/secondsky/sap-skills /tmp/sapui5 && cp -r /tmp/sapui5/plugins/sapui5/skills/sapui5 ~/.claude/skills/sapui5SKILL.md
# SAPUI5 Development Skill
## Related Skills
- **sap-fiori-tools**: Use for rapid Fiori application development, Page Editor configuration, and deployment automation
- **sap-cap-capire**: Use for backend service integration, OData model binding, and CAP service consumption
- **sap-btp-cloud-platform**: Use for deployment options, HTML5 Application Repository service, and BTP integration
- **sap-abap**: Use when connecting to ABAP backends or consuming OData services from SAP systems
- **sap-api-style**: Use when documenting UI5 application APIs or following REST/OData standards
- **dependency-upgrade**: Use for secure dependency upgrades, lockfile policies, and supply-chain controls in SAPUI5 frontend toolchains
Comprehensive skill for building enterprise applications with SAP UI5 framework.
## Using MCP Tools (New in v2.0.0)
This skill integrates with the official **@ui5/mcp-server** for live development tools:
- **Scaffolding**: Create projects with `ui5-app-scaffolder` agent or `/ui5-scaffold` command
- **API Reference**: Lookup controls with `ui5-api-explorer` agent or `/ui5-api` command
- **Code Quality**: Run linter with `ui5-code-quality-advisor` agent or `/ui5-lint` command
- **Migration**: Upgrade versions with `ui5-migration-specialist` agent
- **Version Info**: Check releases with `/ui5-version` command
- **Tool Catalog**: List all MCP tools with `/ui5-mcp-tools` command
For setup and troubleshooting, see [references/mcp-integration.md](references/mcp-integration.md).
**Graceful Fallback**: All features work without MCP by using reference files and built-in templates.
## Table of Contents
1. [Quick Start](#quick-start)
2. [Core Concepts](#core-concepts)
3. [SAP Fiori Elements](#sap-fiori-elements)
4. [Metadata-Driven Controls (MDC)](#metadata-driven-controls-mdc)
5. [Testing](#testing)
6. [Best Practices](#best-practices)
7. [Common Patterns](#common-patterns)
8. [Troubleshooting](#troubleshooting-common-issues)
9. [Development Tools](#development-tools)
10. [Bundled Resources](#bundled-reference-files)
---
## Quick Start
### Creating a Basic SAPUI5 App
Use UI5 Tooling (recommended) or SAP Business Application Studio:
```bash
# Install UI5 CLI
npm install -g @ui5/cli
# Create new project
mkdir my-sapui5-app && cd my-sapui5-app
npm init -y
# Initialize UI5 project
ui5 init
# Add UI5 dependencies
npm install --save-dev @ui5/cli
# Start development server
ui5 serve
```
**Project Structure**:
```
my-sapui5-app/
├── webapp/
│ ├── Component.js
│ ├── manifest.json
│ ├── index.html
│ ├── controller/
│ │ └── Main.controller.js
│ ├── view/
│ │ └── Main.view.xml
│ ├── model/
│ │ └── formatter.js
│ ├── i18n/
│ │ └── i18n.properties
│ ├── css/
│ │ └── style.css
│ └── test/
│ ├── unit/
│ └── integration/
├── ui5.yaml
└── package.json
```
**Templates Available**:
- `templates/basic-component.js`: Component template
- `templates/manifest.json`: Application descriptor template
- `templates/xml-view.xml`: XML view with common patterns
- `templates/controller.js`: Controller with best practices
- `templates/formatter.js`: Common formatter functions
**Use templates** by copying to your project and replacing placeholders (`{{namespace}}`, `{{ControllerName}}`, etc.).
---
## Core Concepts
### 1. MVC Architecture
- **Model**: Data layer (JSON, OData, XML, Resource models)
- **View**: Presentation layer (XML, JavaScript, JSON, HTML)
- **Controller**: Business logic layer
- **Binding**: Synchronizes model and view (One-way, Two-way, One-time)
**Reference**: `references/core-architecture.md` for detailed architecture concepts.
### 2. Component & Manifest
- **Component.js**: Entry point, initializes router and models
- **manifest.json**: Central configuration (models, routing, dependencies, data sources)
**Key manifest sections**:
- `sap.app`: Application metadata and data sources
- `sap.ui`: UI technology and device types
- `sap.ui5`: UI5-specific configuration (models, routing, dependencies)
### 3. Data Models
**JSON Model** (client-side):
```javascript
var oModel = new JSONModel({
products: [...]
});
this.getView().setModel(oModel);
```
**OData V2 Model** (server-side):
```javascript
"": {
"dataSource": "mainService",
"settings": {
"defaultBindingMode": "TwoWay",
"useBatch": true
}
}
```
**Resource Model** (i18n):
```javascript
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "my.app.i18n.i18n"
}
}
```
**Reference**: `references/data-binding-models.md` for comprehensive guide.
### 4. Views & Controllers
**XML View** (recommended):
```xml
<mvc:View
controllerName="my.app.controller.Main"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
<Page title="{i18n>title}">
<List items="{/products}">
<StandardListItem title="{name}" description="{price}"/>
</List>
</Page>
</mvc:View>
```
### 5. Routing & Navigation
**Navigate programmatically**:
```javascript
this.getOwnerComponent().getRouter().navTo("detail", {
objectId: sId
});
```
**Reference**: `references/routing-navigation.md` for routing patterns.
---
## SAP Fiori Elements
Build applications without JavaScript UI code using OData annotations.
### Application Types
1. **List Report**: Searchable, filterable tables/charts
2. **Object Page**: Detailed view with sections and facets
3. **Analytical List Page**: Visual filters and analytics
4. **Overview Page**: Card-based dashboards
5. **Worklist**: Simplified list for tasks
### Quick Setup
**manifest.json for List Report + Object Page**:
```json
{
"sap.ui5": {
"dependencies": {
"libs": {
"sap.fe.templates": {}
}
},
"routing": {
"targets": {
"ProductsList": {
"type": "Component",
"name": "sap.fe.templates.ListReport",
"options":Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
Secure dependency upgrades with supply chain protection, cooldowns, and staged rollout. Use when upgrading deps, configuring security policies, or preventing supply chain attacks.
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters, using built-in functions, writing CASE expressions, implementing access control with DCL, handling CURR/QUAN data types, troubleshooting CDS errors, querying CDS views from ABAP, or displaying data with SALV IDA. Covers ABAP 7.4+ through ABAP Cloud.
|
|
|