/appfront:validate [path/to/project]from appfront
Validate SAP appFront (Application Frontend) application configuration for correctness and deployment readiness. Checks mta.yaml structure, xs-app.json routing, xs-security.json scopes, service bindings, and CDM configuration. Use when the user asks to validate, check, or verify an appFront application.
Ships in appfront. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Validate an appFront application — both static configuration (local files) and runtime (live deployed app via afctl + Playwright).
The skill has two modes:
Scan the project for all configuration files:
# Find configuration files
find . -name "mta.yaml" -o -name "xs-app.json" -o -name "xs-security.json" -o -name "ias-security.json" -o -name "manifest.json" 2>/dev/null
Build an inventory:
xs-security.json present) or IAS (ias-security.json present)Read mta.yaml and check:
| Check | Condition | Result |
|---|---|---|
| appFront resource present | A resource with service: app-front exists | FAIL if absent |
| appFront service plan | Plan is developer | WARN if any other plan name is used |
| html5-apps-repo residue | No resource with service: html5-apps-repo | FAIL if present |
| destination-content module absent | No module named destination-content or similar | FAIL if present |
| HTML5Runtime_enabled absent | No HTML5Runtime_enabled: true in any resource | FAIL if present |
| app-content module present | A com.sap.application.content module exists | FAIL if absent |
| app-content requires app-front | The deployer module requires the appFront resource | FAIL if missing |
| Build result path | build-parameters.build-result points to a directory that exists or will exist after build | WARN if path looks wrong |
| XSUAA/IAS resource present | Auth service resource is present (xsuaa or identity service) | FAIL if absent |
Read each xs-app.json and check:
| Check | Condition | Result |
|---|---|---|
welcomeFile present | welcomeFile property is set | WARN if absent |
welcomeFile reachable | welcomeFile value corresponds to a file that will be served by appFront | WARN if file not found in app directory |
authenticationMethod set | Root-level authenticationMethod is present | WARN if absent |
| appFront service route | At least one route has "service": "app-front" | FAIL if absent |
| No html5-apps-repo-rt | No route has "service": "html5-apps-repo-rt" | FAIL if present (migration residue) |
| Route order valid | Catch-all route ^(.*)$ is the last route | WARN if not last |
| /resources route is public | Route for /resources/ has authenticationType: "none" | WARN if auth on resources route (will break UI5 bootstrap) |
| No circular source/target | No route where source would match its own target | WARN if detected |
| Destination names exist | Destination names referenced in routes match destinations configured in mta.yaml or destination service | WARN if mismatch found |
For XSUAA (xs-security.json):
| Check | Condition | Result |
|---|---|---|
xsappname present | xsappname field exists and is non-empty | FAIL if absent |
xsappname format | Does not contain spaces, follows <app-id>-<qualifier> pattern | WARN if unusual format |
tenant-mode present | tenant-mode is dedicated or shared | WARN if absent |
| Scopes defined if routes require auth | If xs-app.json has authenticationType: "xsuaa" routes, scopes should be defined | WARN if empty scopes array with authenticated routes |
| Role templates valid | Each role-template references only defined scopes | FAIL if undefined scope referenced |
For IAS (ias-security.json):
| Check | Condition | Result |
|---|---|---|
oauth2-configuration present | Required for IAS app registration | FAIL if absent |
redirect-uris non-empty | Must contain at least one valid redirect URI | FAIL if empty |
grant-types includes authorization_code | Required for web app login flow | WARN if absent |
Read app/*/webapp/manifest.json or webapp/manifest.json and check:
| Check | Condition | Result |
|---|---|---|
sap.app.id present | Application ID is defined | FAIL if absent |
sap.app.id format | Follows reverse-domain notation (e.g., com.example.myapp) | WARN if does not contain dots |
dataSources URIs | Each dataSource uri matches a route in xs-app.json | WARN if no matching xs-app.json route found |
| Fiori Elements dependency | If sap.ui5.rootView uses sap.fe.templates, then sap.fe.templates is in sap.ui5.dependencies.libs | WARN if missing |
sap.fiori.registrationIds | Present if app is to be registered in SAP Fiori Launchpad | WARN if absent (not a hard requirement) |
Produce a structured report:
Validation Summary
| File | PASS | WARN | FAIL |
|---|---|---|---|
| mta.yaml | |||
| xs-app.json | |||
| xs-security.json | |||
| manifest.json | |||
| TOTAL |
Overall Verdict:
DEPLOYMENT READYREADY WITH WARNINGS — review warnings before deployingNOT READY — fix FAILs before deployingFAILs (require action):
For each FAIL:
[FAIL] <check name>
File: <file>:<line if known>
Issue: <description>
Fix: <exact fix instruction>
WARNs (recommended review):
For each WARN:
[WARN] <check name>
File: <file>
Issue: <description>
Recommendation: <what to consider>
After completing Phases 1–6, ask:
Would you like to also validate the live deployed app by fetching files directly from the runtime?
- Yes — validate the live app
- No — static validation only
If the user chooses 2, skip this phase entirely.
Step 1 — Detect the deployed app name
Read the app name from the local project:
# Try manifest.json sap.app.id first
grep -r '"id"' . --include="manifest.json" -m1 | grep -o '"id"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1
# Fall back to mta.yaml ID
grep "^ID:" mta.yaml 2>/dev/null | head -1
If multiple apps are found, list them and ask the user which one to validate.
Step 2 — Check afctl login status
afctl list -o json 2>&1
If the command fails with an authentication error, prompt for credentials one field at a time:
What is your SAP BTP Application Frontend API server URI? (e.g.
https://app-front.cfapps.eu10.hana.ondemand.com)
What is your username (email)?
Then run (password is read securely — never echoed or stored):
read -s -p "Password: " AF_PASSWORD && echo && afctl login -a "<api-uri>" -u "<username>" -p "$AF_PASSWORD"
Step 3 — Fetch the runtime URL
afctl list "<app-name>" -o json 2>&1
Parse the JSON output to extract the runtime URL. The URL is the value of the url or applicationUrl field in the response. Present it to the user:
Runtime URL:
https://...
Step 1 — Prompt for login credentials (securely — one at a time):
What is your email address for the SAP login page?
Then:
read -s -p "Password (will not be echoed): " APP_PASSWORD && echo
Store the password only in a shell variable for the duration of this step. Never log, print, or write it to a file.
Step 2 — Navigate and log in via Playwright
Use the Playwright MCP tools to:
Handle common SAP login flows:
If login fails (login page still visible after submit), report a FAIL and stop.
Step 3 — Fetch runtime files
Once authenticated, use Playwright to fetch each file by navigating to its URL:
| File | URL pattern | Purpose |
|---|---|---|
xs-app.json | <runtime-url>/xs-app.json | Routing config served at runtime |
manifest.json | <runtime-url>/manifest.json | App descriptor served at runtime |
index.html | <runtime-url>/index.html (or welcomeFile path) | Entry point |
For each file, evaluate the page content and save it:
() => document.body.innerText
For each fetched file, diff it against the local version:
| Check | PASS condition |
|---|---|
xs-app.json matches local | Runtime content identical to local xs-app.json |
manifest.json matches local | Runtime content identical to local webapp/manifest.json |
index.html reachable | HTTP 200, non-empty content |
xs-app.json is valid JSON | Parses without error |
manifest.json sap.app.id matches local | Same value as local manifest |
| No login page content in fetched files | Files do not contain login form HTML (would indicate auth failed silently) |
Report any mismatches as WARN (runtime differs from local — possible stale deployment).
Append a Runtime Validation section to the Phase 6 report:
## Runtime Validation
App URL: <url>
| File | Status | Notes |
|------|--------|-------|
| xs-app.json | PASS/FAIL | |
| manifest.json | PASS/FAIL | |
| index.html | PASS/FAIL | |
Runtime verdict: LIVE APP OK / ISSUES FOUND
Load references/validation-checklist.md for the extended validation rule set.
Load references/common-misconfigurations.md if any FAIL is found and the cause is unclear.
Load references/approuter-troubleshooting.md when a FAIL relates to routing, authentication errors, or token exchange — it contains error codes 1–9, decision trees, and approuter request processing flow.
Load references/approuter-flows.md for the 9-step approuter request processing flow when debugging route resolution or authentication sequencing.
Load references/service-to-approuter-flow.md when validating programmatic authentication patterns (x-approuter-authorization header, IAS app2app flows, mTLS requirements).
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/cleanupClean up a deployed SAP appFront application. Undeploys from Cloud Foundry (optionally deleting service instances and keys), and removes the local output folder if applicable (appfront-migrated/ for migrated apps; the project folder itself for apps created from scratch). Use when the user asks to clean up, remove, or tear down an appFront app./migrateMigrate SAP BTP HTML5 applications to the appFront (Application Frontend) deployment model. Handles migration from SAP Neo HTML5 apps, html5-apps-repo with managed approuter, and standalone approuter (approuter.nodejs with localDir routes). Supports Cloud Foundry and Kyma runtimes with XSUAA or IAS authentication. Produces updated mta.yaml, xs-app.json, and xs-security.json files. Use when the user asks to migrate, convert, or move an HTML5 app to appFront.Other plugins' skills for the same job
npx claudepluginhub sap-samples/html5-applications-migration-skills-for-sap-btp --plugin appfront