skills/migration/SKILL.md
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.
npx skillsauth add cumulocity-iot/cumulocity-skills migrationInstall 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.
This skill guides you through a full migration of a Cumulocity Web SDK application from one version to another. It combines three tools into a single repeatable workflow:
new-app skill — scaffold a clean reference project at the target versioncode-quality-analysis skill — verify the migrated code meets quality standardsBefore starting, identify:
| Variable | Description | Example |
|---|---|---|
| FROM_VERSION | Your current @c8y/ngx-components version | y2025-lts, 1021.22.50 |
| TO_VERSION | The target SDK version | y2026-lts, cd |
| PROJECT_ROOT | Absolute path to the app you are migrating | /home/user/my-c8y-app |
To find your current version:
cat package.json | grep '@c8y/ngx-components'
Use the ui-breaking-changes-cli to get a full report of everything that changed between
your current and target versions.
Download the latest .tgz from the
GitHub Releases page,
then extract and run it directly — no global install required:
tar -xzf c8y-breaking-changes-cli-v*.*.*.tgz
Alternatively, build from source:
git clone https://github.com/Cumulocity-IoT/ui-breaking-changes-cli.git
cd ui-breaking-changes-cli
pnpm install
pnpm build
The CLI accepts several version alias formats for --from and --to:
| Format | Examples |
|---|---|
| LTS alias | y2025-lts, y2026-lts |
| Year alias | y2025, y2026 |
| Minor / stable line | 1021, 1023, 1021.22 |
| Full patch version | 1021.22.145, 1023.13.2 |
| Continuous delivery | cd — resolves to the current latest tag on npm |
Version format: use the
y-prefixed dist-tag form (y2026-lts) — this is whatnpm dist-tags @c8y/websdkwill show and what the breaking-changes-cli resolves against. The un-prefixed form (2026-lts) is also accepted by the CLI but is not a real npm tag.
# Human-readable overview
node index.js --from <FROM_VERSION> --to <TO_VERSION>
# Markdown output — paste into a PR or issue for tracking
node index.js --from <FROM_VERSION> --to <TO_VERSION> --format markdown
# Breaking changes only (suppress NOTABLE / INFO noise)
node index.js --from <FROM_VERSION> --to <TO_VERSION> --breaking-only
# Angular-specific breaking changes only
node index.js --from <FROM_VERSION> --to <TO_VERSION> --breaking-only --category angular
# Generate grep patterns to locate affected symbols in your codebase
node index.js --from <FROM_VERSION> --to <TO_VERSION> --show-grep
For each item in the report:
BREAKING, NOTABLE, INFO) and category (angular,
websdk-ui, rest-api, security, migration).--show-grep to find affected usages in the project:
grep -rn "<symbol>" <PROJECT_ROOT>/src
BREAKING items — these must be resolved before the app
will compile or run correctly.Read and follow the new-app skill (skills/new-app/SKILL.md) to generate a fresh
application at TO_VERSION. Use a temporary directory so it does not interfere with the
project being migrated:
mkdir /tmp/c8y-reference-app
cd /tmp/c8y-reference-app
# … follow new-app skill steps with ng add @c8y/websdk@<TO_VERSION> (e.g. y2026-lts)
The reference app provides the canonical shape of every generated file at the target version — use it as the ground truth for the comparison in Step 3.
Diff the following files between the reference app (target version) and your project (current version). For each file, apply the changes needed to align your project with the new structure.
| File | What to look for |
|---|---|
| src/app/app.ts | ApplicationOptions, feature flags, runTime / buildTime changes |
| src/bootstrap.ts | Bootstrap function signature, standalone vs. module-based setup |
| angular.json | builder targets, styles array, assets paths, budget thresholds |
| package.json | @c8y/* package versions, peer dependency constraints, scripts |
| src/app/app.module.ts | Module imports, lazy-loaded routes, removed / replaced modules |
| src/app/app-routing.module.ts | Route guards, lazy chunk syntax changes |
| tsconfig.json / tsconfig.app.json | target, lib, strictTemplates, decorator metadata |
Use VS Code's built-in diff, or run:
diff -u <PROJECT_ROOT>/<file> /tmp/c8y-reference-app/<file>
Or with git diff for colour output:
git diff --no-index <PROJECT_ROOT>/<file> /tmp/c8y-reference-app/<file>
For each diffed file:
For each BREAKING item identified in Step 1:
src/.npx tsc --noEmit
ng build --configuration development
Repeat until tsc --noEmit and ng build both succeed without errors.
Read and follow the code-quality-analysis skill (skills/code-quality-analysis/SKILL.md)
to run a full quality pass over the migrated source code.
Pay special attention to:
*ngIf / *ngFor / *ngSwitch with Angular's new
control flow syntax (@if, @for, @switch) if the target version supports it.mcp_c8y-docs_query-codex queries
(MCP server: https://c8y-codex-mcp.schplitt.workers.dev/ — see AGENTS.md for setup).Address all BREAKING and HIGH severity findings before considering the migration done.
Use this checklist to track migration progress:
FROM_VERSION and TO_VERSION identified--format markdown saved for reference)BREAKING items cataloguedTO_VERSIONapp.ts compared and updatedbootstrap.ts compared and updatedangular.json compared and updatedpackage.json @c8y/* versions bumped and peer deps resolvedapp.module.ts / routing compared and updatedtsconfig.json compared and updatedBREAKING source-code fixes appliedtsc --noEmit passesng build passesHIGH quality findings resolvedtools
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.
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.
development
Recommends and support the best approach for migrating PKI certificates when moving from another platform or PKI to Cumulocity. Use when a developer or architect asks about how to migrate existing PKI certificates to Cumulocity, how to handle certificate rotation during migration, or best practices for PKI management in Cumulocity.