skills/websdk-1018-upgrade/SKILL.md
Step-by-step guide for upgrading a Cumulocity Web SDK project from a version below 1018 to 1018 (Angular 15). Covers dependency updates, TypeScript version, Node version requirements, and the migration from deprecated HOOK token providers to function hooks.
npx skillsauth add cumulocity-iot/cumulocity-skills websdk-1018-upgradeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Angular 15 support is introduced from Web SDK version 1018.157.0. This skill walks through all required changes to migrate a frontend project from Web SDK <1018.
Use this skill when the project:
@c8y/ngx-components, @c8y/cli, or @c8y/client with a version below 1018.x.HOOK_* token providers that must be replaced with function hooks.Angular 15 requires one of the following Node versions:
^14.20.0 || ^16.13.0 || ^18.10.0
Verify the active Node version and switch via nvm (or your version manager of choice) if needed:
node --version
nvm install 18
nvm use 18
Update .nvmrc or .node-version in the repository if present.
package.jsonBump every @angular/* package to exactly 15.2.7:
{
"@angular/animations": "15.2.7",
"@angular/common": "15.2.7",
"@angular/compiler": "15.2.7",
"@angular/core": "15.2.7",
"@angular/forms": "15.2.7",
"@angular/platform-browser": "15.2.7",
"@angular/platform-browser-dynamic": "15.2.7",
"@angular/router": "15.2.7",
"@angular/upgrade": "15.2.7",
"@angular-devkit/build-angular": "15.2.7",
"@angular/compiler-cli": "15.2.7",
"@angular/language-service": "15.2.7"
}
Include
@angular/cdkand@angular/materialif used, also at15.2.7.
{
"typescript": "4.9.5"
}
Update all @c8y/* packages to the target 1018.x release (e.g. 1018.157.0):
{
"@c8y/cli": "1018.157.0",
"@c8y/client": "1018.157.0",
"@c8y/ngx-components": "1018.157.0",
"@c8y/style": "1018.157.0"
}
Run the Angular update schematics for any third-party libraries that provide them:
npx ng update @angular/core@15 @angular/cli@15
Refer to the official Angular upgrade guide for a full checklist of breaking changes between Angular 14 and Angular 15, including:
ENVIRONMENT_INITIALIZER token changes.DefaultTitleStrategy in favour of TitleStrategy.RouterModule and RouterLink directive changes.Delete node_modules and any lock files, then reinstall cleanly:
# Yarn (used by this project)
rm -rf node_modules
yarn install
# npm alternative
rm -rf node_modules package-lock.json
npm install
HOOK_* Token ProvidersToken-based hooks were deprecated in favour of function hooks. Replace every occurrence in NgModule providers arrays.
| Deprecated token | New function hook |
|---|---|
| HOOK_TABS | hookTab |
| HOOK_NAVIGATOR_NODES | hookNavigator |
| HOOK_ACTION | hookAction |
| HOOK_BREADCRUMB | hookBreadcrumb |
| HOOK_SEARCH | hookSearch |
| HOOK_ONCE_ROUTE | hookRoute |
| HOOK_COMPONENTS | hookComponent |
| HOOK_WIZARD | hookWizard |
| HOOK_STEPPER | hookStepper |
Before (token-based):
import { HOOK_NAVIGATOR_NODES } from '@c8y/ngx-components';
import { MyNavigatorFactory } from './my-navigator.factory';
@NgModule({
providers: [
{
provide: HOOK_NAVIGATOR_NODES,
useClass: MyNavigatorFactory,
multi: true,
},
],
})
export class MyModule {}
After (function hook):
import { hookNavigator } from '@c8y/ngx-components';
import { MyNavigatorFactory } from './my-navigator.factory';
@NgModule({
providers: [
hookNavigator(MyNavigatorFactory),
],
})
export class MyModule {}
Run the following to locate every file that still uses a deprecated token:
grep -rn "HOOK_TABS\|HOOK_NAVIGATOR_NODES\|HOOK_ACTION\|HOOK_BREADCRUMB\|HOOK_SEARCH\|HOOK_ONCE_ROUTE\|HOOK_COMPONENTS\|HOOK_WIZARD\|HOOK_STEPPER" src/
Apply the replacement pattern shown above to each result.
# Type-check the project
yarn lint
# Run unit tests
yarn jest
# Start the dev server against a tenant
yarn start
Fix any remaining TypeScript or Angular compilation errors surfaced by the stricter Angular 15 / TypeScript 4.9 checks.
| Concern | Before | After |
|---|---|---|
| Angular version | 14.x | 15.2.7 |
| TypeScript | 4.8.x | 4.9.5 |
| Node | ^14.15 | ^16.10 | ^14.20 | ^16.13 | ^18.10 |
| Web SDK | <1018.x | 1018.157.0+ |
| Hook providers | HOOK_* tokens | hook*() functions |
tools
Scaffold a new Cumulocity application using the @c8y/websdk Angular schematic without human interaction. Covers Angular CLI installation, app generation, schematic setup, AI tools configuration, dev server, and build commands. Triggers: new app, scaffold, create application, ng add websdk, setup cumulocity app, new cumulocity project.
tools
Step-by-step guide to migrate a Cumulocity Web SDK application to a target version. Detects breaking changes with the ui-breaking-changes-cli, scaffolds a reference app at the target version with the new-app skill, compares key configuration files (app.ts, bootstrap.ts, angular.json, etc.), and finishes with a code-quality-analysis review. Triggers: migrate app, upgrade version, breaking changes, sdk upgrade, migrate cumulocity, upgrade websdk.
development
Complete guide to internationalizing a Cumulocity Web SDK application. Covers all approaches to annotating and translating text (gettext, translate pipe, translate directive, TranslateService), extracting strings, creating and updating .po files, overriding existing translations, and adding brand-new languages. Triggers: i18n, internationalization, add language, translate, translation, localization, l10n, new language, po file, gettext, TranslateService, language switcher.
development
Analyze Angular / Cumulocity Web SDK code for anti-patterns, bugs, and quality issues. Use when reviewing components, services, or modules for code quality, maintainability, performance, and correctness. Covers TypeScript best practices, Angular idioms, C8Y SDK usage patterns, and project-specific conventions. Triggers: code review, anti-pattern, quality check, refactor suggestion, style guide, bug analysis.