extract-domain-concepts

映射领域模型组件:识别并列出实体、值对象、聚合、服务、事件与仓储。构建通用语言术语表,将代码中使用的名称与业务术语一一关联。

仓库最近推送
GitHub Stars
109
Forks
26
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "extract-domain-concepts":https://skillpi.com/zh/skills/deepskill-3bf264d6e2113b0bd7f067d8136673a83936e350e28a6c97e7d1002abbf7ec9f。安装前核对上游来源和版本:https://github.com/dykyi-roman/awesome-claude-code。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

映射领域模型组件:识别并列出实体、值对象、聚合、服务、事件与仓储。构建通用语言术语表,将代码中使用的名称与业务术语一一关联。

0 下载

介绍来源: third_party · dykyi-roman · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
减记
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: extract-domain-concepts
description: Maps domain model components — Entities, Value Objects, Aggregates, Services, Events, Repositories. Builds Ubiquitous Language glossary connecting code names to business terminology.

Domain Concepts Extractor

Overview

Extracts and catalogs all domain model components from the codebase, maps relationships between them, and builds a Ubiquitous Language glossary that connects technical class names to business concepts.

Domain Component Detection

Entities

# DDD entities
Glob: "**/Domain/**/Entity/*.php"
Glob: "**/Domain/**/*Entity.php"
Grep: "class.*Entity|extends.*Entity" --glob "**/Domain/**/*.php"

# Doctrine entities
Grep: "#\\[ORM\\\\Entity" --glob "**/*.php"
Grep: "@ORM\\\\Entity" --glob "**/*.php"

# Identity markers
Grep: "function getId|private.*\\$id|readonly.*Id \\$id" --glob "**/Domain/**/*.php"

Value Objects

# Explicit Value Objects
Glob: "**/Domain/**/ValueObject/*.php"
Glob: "**/ValueObject/**/*.php"
Grep: "class.*ValueObject|extends.*ValueObject" --glob "**/*.php"

# Readonly classes in Domain (likely VOs)
Grep: "readonly class" --glob "**/Domain/**/*.php"

# Common VO patterns
Grep: "class (Email|Money|Address|PhoneNumber|Name|Quantity|Price|DateRange)" --glob "**/*.php"

# Self-validating constructors (VO pattern)
Grep: "private function __construct" --glob "**/Domain/**/*.php"

Aggregates

# Explicit aggregates
Grep: "class.*Aggregate|extends.*AggregateRoot" --glob "**/*.php"
Glob: "**/Domain/**/Aggregate/*.php"

# Aggregate behavior (event recording)
Grep: "function (recordEvent|raise|apply)" --glob "**/Domain/**/*.php"

# Classes with multiple entity relationships
Grep: "private.*Collection|private.*array.*\\$" --glob "**/Domain/**/*.php"

Domain Events

# Event classes
Glob: "**/Domain/**/Event/*.php"
Grep: "class.*Event|extends.*DomainEvent" --glob "**/Domain/**/*.php"

# Event data (what happened)
Grep: "readonly class.*Event" --glob "**/*.php"
Grep: "function __construct" --glob "**/Domain/**/Event/**/*.php"

Domain Services

# Domain services
Glob: "**/Domain/**/Service/*.php"
Grep: "class.*Service" --glob "**/Domain/**/*.php"

# Services with domain logic (not infrastructure)
# Read files and check for: no external dependencies, pure domain logic

Repositories

# Repository interfaces (Domain)
Grep: "interface.*Repository" --glob "**/Domain/**/*.php"

# Repository methods
Grep: "function (find|findBy|save|remove|nextIdentity|exists)" --glob "**/Domain/**/*.php"

# Repository implementations (Infrastructure)
Grep: "implements.*Repository" --glob "**/Infrastructure/**/*.php"

Enumerations

# PHP 8.1+ enums
Grep: "^enum " --glob "**/Domain/**/*.php"

# Backed enums
Grep: "enum.*: string|enum.*: int" --glob "**/Domain/**/*.php"

# Status/Type enums
Grep: "enum.*(Status|Type|State|Category|Priority|Role)" --glob "**/*.php"

Specifications

# Specification pattern
Grep: "class.*Specification|implements.*Specification" --glob "**/*.php"
Grep: "function isSatisfiedBy" --glob "**/*.php"

Analysis Process

  1. Discover — Find all domain components using patterns above
  2. Read — Read each component to understand its purpose
  3. Classify — Categorize by DDD building block type
  4. Map relationships — Identify which entities belong to which aggregates
  5. Build glossary — Translate class names to business terms

Relationship Mapping

For each aggregate:

  • Which entities it contains
  • Which value objects it uses
  • Which events it raises
  • Which repository manages it
# Find relationships by reading constructor and use statements
Read: aggregate file
# Extract: constructor parameters, property types, use statements

Output Format

## Domain Model

### Component Summary

| Type | Count | Examples |
|------|-------|---------|
| Entities | 12 | Order, Customer, Product |
| Value Objects | 18 | Money, Email, Address |
| Aggregates | 4 | Order, Customer, Product, Catalog |
| Domain Events | 8 | OrderCreated, PaymentReceived |
| Domain Services | 3 | PricingService, ShippingCalculator |
| Repositories | 6 | OrderRepository, CustomerRepository |
| Enumerations | 5 | OrderStatus, PaymentMethod |

### Aggregate Map

#### Order Aggregate

Order (Aggregate Root) ├── OrderId (Value Object) — unique identifier ├── OrderItem[] (Entity) — line items │ ├── ProductId (Value Object) — reference to Product │ ├── Quantity (Value Object) — item quantity │ └── Price (Value Object) — item price ├── Money (Value Object) — total amount ├── OrderStatus (Enum) — current status ├── ShippingAddress (Value Object) — delivery address └── Events: ├── OrderCreated ├── OrderConfirmed └── OrderShipped


### Ubiquitous Language Glossary

| Business Term | Code Name | Type | Description |
|---------------|-----------|------|-------------|
| Order | `Order` | Aggregate | A customer's purchase request |
| Line Item | `OrderItem` | Entity | Single product in an order |
| Price | `Money` | Value Object | Amount with currency |
| Order Number | `OrderId` | Value Object | Unique order identifier |
| Customer | `Customer` | Aggregate | Person who places orders |
| Shipping Address | `ShippingAddress` | Value Object | Delivery destination |
| Order Status | `OrderStatus` | Enum | pending, confirmed, shipped, delivered |

### Entity Relationship Diagram Data

| Entity | Relates To | Relationship | Description |
|--------|-----------|--------------|-------------|
| Order | Customer | belongs-to | Order placed by Customer |
| Order | OrderItem | has-many | Order contains items |
| OrderItem | Product | references | Item refers to Product |
| Payment | Order | belongs-to | Payment for an Order |

### Bounded Context Map (if multi-context)

| Context | Aggregates | Shared Concepts |
|---------|-----------|----------------|
| Order | Order, OrderItem | CustomerId, ProductId |
| Customer | Customer, Address | CustomerId |
| Payment | Payment, Transaction | OrderId, Money |
| Catalog | Product, Category | ProductId |

Glossary Building Rules

  1. Use business names — "Shopping Cart" not "CartAggregate"
  2. Define relationships — "A Customer places Orders"
  3. Include synonyms — "Purchase" = "Order" in this context
  4. Note ambiguities — "Account" means different things in different contexts
  5. Map to code — Always link to the actual class

Integration

This skill is used by:

  • business-logic-analyst — provides domain model documentation
  • explain-business-process — references domain concepts
  • extract-business-rules — connects rules to domain entities
  • diagram-designer — generates class/ER diagrams from this data

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 提供领域驱动设计(DDD)模型组件的自动化提取与分类能力
  • 构建通用语言术语表,有效连接代码与业务概念,提升团队协作效率
触发精准92/100

亮点

  • 触发描述精准覆盖 DDD 核心组件(实体、值对象、聚合等)
  • 明确说明输出目标为 Ubiquitous Language 术语表,边界清晰
结构规范95/100

亮点

  • 文档结构完整,包含检测规则、分析流程、输出格式、集成说明
  • 提供详细的 Markdown 输出示例,便于用户理解预期结果
执行可靠85/100

待提升项

  • 缺少文件读取异常处理说明 原报告严重程度:轻微

    未显式说明如何处理文件读取失败、权限不足或文件损坏等异常情况

    改进建议:建议在 Analysis Process 中补充异常处理说明,如跳过无法读取的文件并记录警告

亮点

  • 使用标准 Glob 和 Grep 命令,工具来源明确且参数合理
  • 覆盖多种 DDD 实现模式(如 Doctrine 注解、readonly 类、事件记录等)
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。