Dot Ui Angular Standardsのロゴ

Dot Ui Angular Standards

組織
dotCMS
dot-ui-angular-standards

core-web Nxワークスペース向けのdotCMS Angularコーディング規約です。core-web/内のあらゆるフロントエンド作業で使用します。コンポーネント、サービス、ストア、ディレクティブ、パイプ、ガード、テンプレート、SCSSファイル、Jest specの作成や編集、フロントエンド差分のレビュー、新しいUIのひな形作成、このリポジトリでのAngularの実装方法に関する質問が対象です。次の項目が含まれる場合も必ず使用します: `standalone: true`、`changeDetection`、`ChangeDetectionStrategy`、`ng new`/`ng generate`/`ng serve`/`ng build`/`ng test`、`angular.json`、Karma、`@ngneat/spectator`、core-web内での`npm run`/`yarn`、デコレーター内のインライン`template:`や`styles:`、`*ngIf`/`*ngFor`、`ngClass`/`ngStyle`、`@Input()`/`@Output()`デコレーター、`@HostBinding`/`@HostListener`、`destroy$`/`takeUntil`、コンストラクターインジェクション、`dot-icon`、PrimeIcons、「アイコンを追加」など。このスキルは、このリポジトリ内の作業では、ベンダー提供の`angular-developer`スキルに含まれる一般的なAngularおよびAngular CLIのガイダンスより優先されます。

Add to TypingMind

概要

公開者dotCMS
リポジトリcore
スキル名dot-ui-angular-standards
スター
971
フォーク
487
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    dotCMSがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Dot Ui Angular Standards」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/dotCMS/core/tree/main/.claude/skills/dot-ui-angular-standards
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dotCMS/core.git /tmp/core
mkdir -p .claude/skills
cp -r /tmp/core/.claude/skills/dot-ui-angular-standards .claude/skills/dot-ui-angular-standards
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDot Ui Angular Standardsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDot Ui Angular Standardsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Dot Ui Angular Standardsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

dotCMS Angular Standards (core-web)

Precedence. This skill overrides the vendored angular-developer skill for all work in this repository. That skill is upstream, generic Angular guidance: it assumes ng CLI, angular.json, Karma, and a greenfield app. None of those apply here. Where the two disagree, this skill wins. Use angular-developer only for framework concepts it explains better (signals semantics, DI resolution, routing APIs) — never for its tooling, project-creation, or standalone/changeDetection advice.

That skill is vendored byte-for-byte from upstream Angular and must never be hand-edited — new dotCMS rules belong here instead. See .agents/skills/angular-developer/PROVENANCE.md for its upstream source and re-sync procedure.

Source of truth

docs/frontend/ANGULAR_STANDARDS.md is the single source of truth for Angular work in this repository. Read it before writing or reviewing Angular code.

It has siblings — load the one your task needs, or docs/frontend/README.md (the index) if you are unsure:

TaskDoc
Component structure, file layout, data flowCOMPONENT_ARCHITECTURE.md
Feature state — NgRx Signal Store, rxMethod, patchStateSTATE_MANAGEMENT.md
Tailwind, PrimeNG theme, BEM, SCSSSTYLING_STANDARDS.md
Strict types, as const, # privateTYPESCRIPT_STANDARDS.md
Writing tests — Spectator, Jest, byTestIdTESTING_FRONTEND.md
Reviewing tests — violation checklistTESTING_REVIEW_RULES.md
GlobalStore breadcrumb trailBREADCRUMBS.md

This file is deliberately not a copy of it. It carries only:

  1. the trigger (so it fires automatically when you touch frontend code),
  2. the precedence declaration over the vendored angular-developer skill, and
  3. the rules where upstream actively tells you to do the wrong thing here, so the correction is in front of you at the moment you would otherwise follow upstream.

Everything else — full rationale, examples, and the rules upstream already gets right — lives in the doc. If this file and the doc ever disagree, the doc wins and this file is the bug. When a standard changes, change it in the doc; only touch this file if the change is one upstream contradicts.

Workspace facts

  • Nx monorepo rooted at core-web/. There is no angular.json — the workspace is driven by nx.json.
  • Angular 22.x, PrimeNG 21.x, Tailwind 4.x, NgRx Signals 21.x, Jest 30, TypeScript 6, Node 22.22.3+.
  • Package manager: pnpm (see packageManager in core-web/package.json).
  • core-web/package.json is the source of truth for versions. Read it; never hardcode or assume a patch version.

Non-negotiables

1. Never write standalone: true

Standalone is the Angular default. The property is forbidden in decorators here. Remove it when you see it in a file you are already editing.

2. Never set changeDetection on a new component

OnPush is the framework default as of Angular v22 (docs), so an explicit ChangeDetectionStrategy.OnPush is redundant noise.

Components explicitly marked ChangeDetectionStrategy.Eager (the opt-in eager mode, renamed from Default in v22) opted in deliberately — leave them alone. Do not convert Eager to OnPush when touching a file for unrelated work.

3. Build, test, and serve through pnpm nx — never ng

There is no Angular CLI workspace here. Never yarn, never npm.

TaskCommand (run from core-web/)
Install depspnpm install
Serve the UIpnpm nx run dotcms-ui:serve
Test a projectpnpm nx run dotcms-ui:test
Build a projectpnpm nx build dotcms-ui
Scaffold codeNx generators (pnpm nx g …) — see the nx-generate skill

4. Testing is Jest 30 + @openng/spectator

  • Never @ngneat/spectator — the workspace has fully migrated (0 occurrences remain). Never Karma, never Vitest.
  • Select with byTestId and put data-testid on the elements you assert against.
  • Set inputs with spectator.setInput(). Never assign to component properties directly.
  • Mock stores in componentProviders, not providers.

5. Three files per component — .ts + .html + .scss

Inline template: and inline styles: in the decorator are forbidden. Reference the files with templateUrl and styleUrls (plural — matching docs/frontend/ANGULAR_STANDARDS.md and the dominant convention in the workspace).

6. Reuse before creating

Before creating a new component, in this order:

  1. Check dotCMS's own components — core-web/libs/ui (@dotcms/ui) and the existing feature libs.
  2. Check PrimeNG.
  3. Only then create a new component — and say in the PR why neither of the above fit.

7. Every component that renders data handles all four states

loading, empty, error, loaded — explicitly. Never leave a blank render path. If a template has no branch for a state, that state is a bug.

8. Error handling is mandatory

No silent failures. No unguarded .subscribe(). No empty catchError. Handle the error in the service with catchError, surface a user-facing error state in the component, and log the diagnostic detail.

9. Icons are Material Symbols

html
<span class="material-symbols-outlined">drag_indicator</span>

The icon name goes in the element's text content, not in the class. Fonts are self-hosted via core-web/libs/dotcms-scss/shared/_material-symbols-outlined.scss.

  • Existing PrimeIcons (pi pi-*) stay as they are — do not mass-migrate them.
  • PrimeNG's internal icons are a theming concern and out of scope.
  • Do not use the deprecated dot-icon component.

10. dotCMS-specific naming

These differ from stock Angular convention, so upstream will not tell you about them:

RuleDoDon't
Signals$mySignal ($ prefix)mySignal, mySignal$
ObservablesmyObservable$ ($ suffix)$myObservable
Selectorsdot- prefixanything else

Covered in full by the doc — read it, do not rely on this file

docs/frontend/ANGULAR_STANDARDS.md is authoritative for everything below. Upstream Angular guidance already agrees with us on these, so they are not restated here and this file must not grow a second copy of them:

  • Subscription teardown — inject(DestroyRef) + takeUntilDestroyed(); the legacy destroy$ pattern is not for new work and is not to be mass-migrated.
  • Signal Forms first — new forms use @angular/forms/signals; existing Reactive Forms stay.
  • TypeScript 6 — the transitional "ignoreDeprecations": "6.0" flag; new code must not rely on it.
  • Standard modern Angular API — input() / output() over decorators, inject() over constructor injection, @if / @for (with track) / @switch over *ngIf / *ngFor / *ngSwitch, [class.x] / [style.x] over ngClass / ngStyle, and host bindings in the host: { … } object over @HostBinding / @HostListener.

Before you finish

  • No standalone: true and no changeDetection added
  • Any Eager component you touched is still Eager
  • Three files exist for each new component; no inline template or styles
  • Loading, empty, error, and loaded paths all render something
  • Every stream is torn down with takeUntilDestroyed(destroyRef); every failure path is handled
  • Specs use @openng/spectator, byTestId, and setInput()
  • Verified with pnpm nx run <project>:test and pnpm nx run <project>:lint — not ng

よくある質問

AIスキル「Dot Ui Angular Standards」では何ができますか?

core-web Nxワークスペース向けのdotCMS Angularコーディング規約です。core-web/内のあらゆるフロントエンド作業で使用します。コンポーネント、サービス、ストア、ディレクティブ、パイプ、ガード、テンプレート、SCSSファイル、Jest specの作成や編集、フロントエンド差分のレビュー、新しいUIのひな形作成、このリポジトリでのAngularの実装方法に関する質問が対象です。次の項目が含まれる場合も必ず使用します: `standalone: true`、`changeDetection`、`ChangeDetectionStrategy`、`ng new`/`ng generate`/`ng serve`/`ng build`/`ng test`、`angular.json`、Karma、`@ngneat/spectator`、core-web内での`npm run`/`yarn`、デコレーター内のインライン`template:`や`styles:`、`*ngIf`/`*ngFor`、`ngClass`/`ngStyle`、`@Input()`/`@Output()`デコレーター、`@HostBinding`/`@HostListener`、`destroy$`/`takeUntil`、コンストラクターインジェクション、`dot-icon`、Prim...

TypingMindでDot Ui Angular Standardsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Dot Ui Angular Standardsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDot Ui Angular Standardsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/dotCMS/core/tree/main/.claude/skills/dot-ui-angular-standardsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Dot Ui Angular Standardsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Dot Ui Angular Standardsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDot Ui Angular Standardsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Dot Ui Angular Standards」は無料ですか?

dotCMSがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇