Use Ng22 logo

Use Ng22

Organization
duplocloud
use-ng22

The Angular 22 patterns a DuploCloud extension frontend must be written in — standalone components, signals, the OnPush default, inject(), the @if/@for/@switch block syntax, and a Routes export instead of an NgModule. Use when writing or reviewing any component, service, route or template in an extension's frontend/, when scaffolding a new extension's UI, or when deciding whether an Angular 22 API (resource, httpResource, signal forms, zoneless) is allowed in the extension context. Also the source of the rules that duplo-extension-dev scaffolds to and duplo-extension-ng22-migration modernizes toward.

Overview

Publisherduplocloud
Repositorydevkit
Skill nameuse-ng22
Stars
51
Forks
18
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by duplocloud on GitHub. Read the source before you install it.

Installation

Install the Use Ng22 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/duplocloud/devkit/tree/main/.claude/skills/use-ng22
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/duplocloud/devkit.git /tmp/devkit
mkdir -p .claude/skills
cp -r /tmp/devkit/.claude/skills/use-ng22 .claude/skills/use-ng22
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Use Ng22 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Use Ng22 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Use Ng22 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

use-ng22 — how extension frontends are written on Angular 22

Every DuploCloud extension remote runs inside the portal's Angular 22 host, sharing its @angular/core, its NgZone and its injector. That makes some Angular 22 patterns mandatory, some merely available, and a few actively wrong here even though they are current Angular elsewhere. This skill is the ruling on all three.

The exhaustive per-API catalogue is reference/patterns.md. This file is the short version: the default shape, the rules that bite, and the verification gate.

Both are reconciled against Angular's own shipped guidance (node_modules/@angular/core/resources/best-practices.md, what ng mcp's get_best_practices serves) and every API was verified present in the pinned @angular/*@22.1.0. Where the platform overrides Angular's default advice — forms, chiefly — the catalogue says so explicitly rather than quietly differing.

The worked reference is the helloworld template in duplo-extension-dev/templates/helloworld/frontend/.


The one that silently breaks everything

Angular 22 defaults a component with no changeDetection property to OnPush — the enum is OnPush = 0, Eager = 1, where Eager is the old Default.

This does not error. The build passes, unit tests pass, the shell renders — and then a field assigned from a subscribe/setTimeout/promise never repaints. A list sits empty forever while the network tab shows the data arrived. It is invisible until you load the page in the host.

The fix is not to add Eager. Hold async state in signal() and leave the property off — a signal write marks the view dirty, which is what makes the modern default correct rather than a trap. (Eager is a bulk-migration shim; duplo-ui/portal uses it on 898 of 904 components because retrofitting them to signals was not feasible. A new extension has no such excuse.)


Default component shape

Scaffold every new component like this. No standalone, no changeDetection, no constructor DI.

ts
import { Component, OnInit, inject, signal } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SearchableDatatableModule } from '@duplocloud-internal/ng-common-lib';
import { ThingService, Thing } from '../thing.service';

@Component({
  selector: 'xx-list',
  imports: [SearchableDatatableModule],   // NgModules are fine in a standalone imports[]
  template: `
    @if (loading()) {
      <div class="card p-2 text-muted">Loading…</div>
    } @else {
      <searchable-datatable [rows]="rows()" columnMode="force">…</searchable-datatable>
    }
  `,
})
export class ListThingComponent implements OnInit {
  private readonly svc = inject(ThingService);
  private readonly router = inject(Router);
  private readonly route = inject(ActivatedRoute);

  protected readonly rows = signal<Thing[]>([]);
  protected readonly loading = signal(true);

  ngOnInit(): void {
    this.svc.list().subscribe({
      next: rows => { this.rows.set(rows ?? []); this.loading.set(false); },
      error: () => { this.rows.set([]); this.loading.set(false); },
    });
  }
}

Routes replace the NgModule entirely — loadChildren accepts a Routes array, and the host's extension-route-registrar.ts resolves the export named Extension:

ts
// src/app/extension.routes.ts  — federation.config.js: exposes { './Extension': './src/app/extension.routes.ts' }
export const Extension: Routes = [
  { path: '',          component: ListThingComponent },
  { path: 'add',       component: AddThingComponent },
  { path: 'edit/:id',  component: AddThingComponent, data: { action: 'Edit' } },
  { path: 'view/:id',  component: ViewThingComponent },
];

Rules

  1. Standalone components, no standalone: true — it is the default in Angular 19+; writing it is noise. Each component declares its own imports.
  2. No changeDetection property. All async state in signal(). See above.
  3. inject(), not constructor parameters — including for the platform's string tokens: private readonly http = inject<any>(REMOTE_DuploHttpClient as any) — the token cast is required, since these are string keys and inject() is typed for ProviderToken (a bare string is TS2345).
  4. input() / output() / model() / viewChild(), not the @Input/@Output/@ViewChild decorators. viewChild() returns a signal — call it: this.formErrors()?.reportError(err).
  5. computed(), never a getter, for derived template values. A getter re-runs on every check; a computed recomputes only when an input signal changes.
  6. @if / @for / @switch / @let, not *ngIf / *ngFor / [ngSwitch]. @for requires track. Block syntax needs no CommonModule import.
  7. A Routes export, not an NgModule. Delete extension.module.ts.
  8. Template-driven forms stay — see the constraint below.

Constraints specific to running inside the portal

These are the ones a generic Angular 22 guide will get wrong.

Angular 22 APIVerdict hereWhy
Zoneless (provideZonelessChangeDetection)ForbiddenThe host bootstraps with provideZoneChangeDetection() and the remote shares its NgZone. Never provide either in a remote — a second zone forks change detection.
Signal Forms (@angular/forms/signals)Forbidden for platform formsReal and exported in 22.1.0, but the platform's form-field, validation-state, validation-errors and form-group-errors are built on NgModel. Signal Forms bypass all of them and the form stops looking and behaving like the suite.
[(ngModel)]="someSignal"BrokenTwo-way binding compiles to sig = $event, which cannot assign to a signal. Use [ngModel]="sig()" (ngModelChange)="sig.set($event)".
httpResourceNot usable@publicApi 22.0, but it needs Angular's HttpClient from provideHttpClient. Extensions get the host's REMOTE_DuploHttpClient token, not that provider. Use rxResource or toSignal over the token's observables.
resource / rxResourceAllowed@publicApi 22.0. Good fit for view/:id loads. Plain subscribe + signal.set is equally correct and is what the template uses.
provideZoneChangeDetection in the remoteForbiddenHost-only concern; see zoneless row.
@deferAllowed, rarely usefulThe whole remote is already lazy-loaded by route.
ng mcp → onpush_zoneless_migrationIgnore its outputIt plans a zoneless migration and tells you to add ChangeDetectionStrategy.Eager — contradicting Angular's own best-practices and re-adding the shim. Extensions run in a zone-based host.

Verification gate

A green build proves nothing about change detection. The OnPush trap, unresolved attribute directives, and a missing imports entry can all compile cleanly.

Run these from frontend/. Everything under src/app — including the shared detail shell and every result-view panel component (reference/17, reference/19) — is your code and must pass this gate.

bash
OWN=$(find src/app -name '*.ts')

# 1. no component silently relying on the OnPush default while assigning plain fields
for f in $OWN; do
  grep -q "@Component(" "$f" || continue
  grep -q "changeDetection:" "$f" && continue
  grep -q "this\.[A-Za-z_]* = " "$f" && echo "CHECK: $f — no strategy, assigns plain fields"
done

# 2. no legacy structural directives or decorator queries left
grep -nE "\*ngIf|\*ngFor|ngSwitch|@Input\(|@Output\(|@ViewChild\(" $OWN || echo clean

# 3. two-way ngModel onto a signal — compiles, then silently fails to write
#    (the second grep drops comment lines, which legitimately mention the anti-pattern)
grep -nE "\[\(ngModel\)\]" $OWN | grep -vE ":[[:space:]]*(//|\*)" || echo clean

# 4. build
npm run build

All three checks return clean on the helloworld template.

Then load the page in the portal and watch a list actually populate after its request resolves. That is the only check that catches the failure this skill exists to prevent.


Related

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Use Ng22 AI skill do?

The Angular 22 patterns a DuploCloud extension frontend must be written in — standalone components, signals, the OnPush default, inject(), the @if/@for/@switch block syntax, and a Routes export instead of an NgModule. Use when writing or reviewing any component, service, route or template in an extension's frontend/, when scaffolding a new extension's UI, or when deciding whether an Angular 22 API (resource, httpResource, signal forms, zoneless) is allowed in the extension context. Also the source of the rules that duplo-extension-dev scaffolds to and duplo-extension-ng22-migration moderniz...

Why use Use Ng22 on TypingMind?

Because you install it once and use it with any model. Use Ng22 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Use Ng22 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/duplocloud/devkit/tree/main/.claude/skills/use-ng22. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Use Ng22?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Use Ng22?

As many as you like. As long as a model supports skills, you can use Use Ng22 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Use Ng22 AI skill free?

Yes. It is published on GitHub by duplocloud under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇