Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

reference-core参考核心

Agent Skill

reference-core 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

20,767

周安装

832

GitHub Stars

100,076

下载量

6,723
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:reference-core(参考核心)
来源仓库:https://github.com/angular/angular
仓库路径:skills/reference-core
安装命令:
npx skills add https://github.com/angular/angular --skill reference-core
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/angular/angular --skill reference-core

简介

reference-core 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于 Angular 核心模块重构时的 API 变更追踪、依赖注入结构调整或生命周期钩子优化。
  • 提供官方文档片段、RFC 草案和社区讨论摘要。
  • 安装命令:npx skills add https://github.com/angular/angular --skill reference-core。
  • Angular 更新频繁,部分信息可能滞后于当前稳定版本。

SKILL.md

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:

  1. Rendering (Ivy/Render3): Transforming templates into DOM updates.
  2. Dependency Injection (DI): Managing object creation and lifetime.
  3. Change Detection: Synchronizing the model with the view.
  4. 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

  • 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

  • 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: LView and TView are parallel arrays. Index i in LView corresponds to metadata at index i in TView.

- 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

  1. Creation Mode: Instructions create DOM nodes and store them in LView.
  2. 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.providers or providedIn: 'root'.
  • Stored in a hierarchy of R3Injector instances.
  • *Location*: packages/core/src/di/r3_injector.ts

Node Injector

  • Configured via @Component.providers or @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, TNode definitions.

  • 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 in primitives).

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

  1. Understand the Instruction: If modifying runtime behavior, find the corresponding instruction in src/render3/instructions.
  2. Check LView/TView Impact: If adding state, understand where it fits in the LView array.
  3. Tests: Core has extensive tests. Run them using Bazel.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.36%
按下载量换算2,377

Claude

28.91%
按下载量换算1,944

Cursor

16.49%
按下载量换算1,109

Gemini CLI

9.34%
按下载量换算628

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills