reference-core
Explains the mental model and architecture of the code under `packages/core`. You MUST use this skill any time you plan to work with code in `packages/core`
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o reference-core.zip https://jpskill.com/download/22424.zip && unzip -o reference-core.zip && rm reference-core.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22424.zip -OutFile "$d\reference-core.zip"; Expand-Archive "$d\reference-core.zip" -DestinationPath $d -Force; ri "$d\reference-core.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
reference-core.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
reference-coreフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Angular Core (packages/core) Mental Model
This document outlines the architecture and mental model for packages/core, the heart of the Angular framework.
1. High-Level Architecture
packages/core contains the runtime logic for Angular. Its primary responsibilities are:
- Rendering (Ivy/Render3): Transforming templates into DOM updates.
- Dependency Injection (DI): Managing object creation and lifetime.
- Change Detection: Synchronizing the model with the view.
- Reactivity: Signals and Zone.js integration.
2. Rendering Engine (Ivy / Render3)
The rendering engine (located in packages/core/src/render3) uses an instruction-based approach.
Key Concepts
-
Instructions: The Angular compiler transforms templates into a sequence of instruction calls (e.g.,
ɵɵelementStart,ɵɵtext,ɵɵproperty). These instructions are executed at runtime to create and update the view.- Location:
packages/core/src/render3/instructions
- Location:
-
LView (Logical View): An array containing the state of a specific view instance. It holds:
- DOM nodes (
RElement,RText). - Binding values (for change detection).
- Directive/Component instances.
- Context:
packages/core/src/render3/interfaces/view.ts
- DOM nodes (
-
TView (Template View): An array containing the static structure of a view. It is shared across all instances (
LViews) of the same component/template. It holds:- Property names for bindings.
- Node relationship information.
- Compiled directive definitions.
- Context:
packages/core/src/render3/interfaces/view.ts
-
Memory Layout:
LViewandTVieware parallel arrays. IndexiinLViewcorresponds to metadata at indexiinTView.HEADER: Fixed size, contains context (Parent, Host, etc.).DECLS: Static nodes (elements, text, pipes).VARS: Binding values.EXPANDO: Dynamic data (host bindings, injectors).
The Render Cycle
- Creation Mode: Instructions create DOM nodes and store them in
LView. - Update Mode: Instructions check current values against previous values stored in
LView. If changed, they update the DOM.
3. Dependency Injection (DI)
DI in Angular is hierarchical and split into two systems that interact:
Module Injector (R3Injector)
- Configured via
@NgModule.providersorprovidedIn: 'root'. - Stored in a hierarchy of
R3Injectorinstances. - Location:
packages/core/src/di/r3_injector.ts
Node Injector
- Configured via
@Component.providersor@Directive.providers. - Not a class, but a data structure embedded in the
LView("Expando" section). - Uses Bloom Filters (
TView.data) to quickly check if a token is present at a specific node index before traversing up the tree. - Resolves tokens starting from the current node, walking up the view tree (Element Injector hierarchy), and falling back to the Module Injector if not found.
4. Change Detection
- Dirty Checking: Angular checks if values bound in templates have changed.
- Strategies:
Default: Checks everything.OnPush: Checks only if inputs change, events fire, or signals update.
- Signals: The new reactivity primitive. Signals notify the scheduler when they change, potentially allowing for fine-grained updates (Zoneless).
5. Key Directories to Know
src/render3: The Ivy rendering engine.instructions: The runtime instructions called by compiled code.interfaces:LView,TView,TNodedefinitions.
src/di: Dependency injection system.src/change_detection: Change detection logic.src/zone: Zone.js integration.src/signal: Signals implementation (if present in this version, otherwise likely inprimitives).
6. Conventions & Gotchas
- Prefixes: Private/Internal exports often start with
ɵ. - Global State: Ivy relies heavily on global state (e.g.,
getLView()) during instruction execution to avoid passing context arguments everywhere. This is for performance and code size. - Performance: The code is highly optimized for performance and memory. You will see arrays used instead of objects, bitmasks, and manual memory management patterns. Respect these patterns.
7. How to Modify Core
- Understand the Instruction: If modifying runtime behavior, find the corresponding instruction in
src/render3/instructions. - Check
LView/TViewImpact: If adding state, understand where it fits in theLViewarray. - Tests: Core has extensive tests. Run them using Bazel.