Token导航 LogoToken导航

Agent Skill · 研究检索

tactical-ddd(战术 DDD)

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

tactical-ddd 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 55,495。

总安装 475周安装 20GitHub Stars 305下载 166核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ntcoding/claude-skillz --skill tactical-ddd

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

tactical-ddd 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于基于关键词或任务场景从来源线索中提取领域驱动设计相关内容。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

建议确认权限范围和维护状态,避免触发联网或文件读写操作。可结合原始 README 进一步核验具体功能和调用方式。

来源仓库内路径:skills/tactical-ddd

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ntcoding/claude-skillz --skill tactical-ddd;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tactical-ddd 怎么安装?

在终端执行 npx skills add https://github.com/ntcoding/claude-skillz --skill tactical-ddd。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tactical-ddd 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tactical-ddd 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

tactical-ddd 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

tactical-ddd 用的人多吗?

公开数据是累计安装 475 次,近一周安装 20 次,下载 166 次,GitHub 305 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tactical-ddd 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tactical-ddd

战术 DDD · 本页

475305需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Tactical DDD

Design, refactor, analyze, and review code by applying the principles and patterns of tactical domain-driven design.

Principles

  1. Isolate domain logic
  2. Use rich domain language
  3. Orchestrate with use cases
  4. Avoid anemic domain model
  5. Separate generic concepts
  6. Make the implicit explicit... like your life depends on it
  7. Design aggregates around invariants
  8. Extract immutable value objects liberally
  9. Repositories are for loading and saving full aggregates

1. Isolate domain logic

What: Domain logic is not mixed with technical code like HTTP and database transactions.

Why: Easier to understand the most important part of the code, easier to validate with domain experts, easier to test and evolve, easier to plan and implement new features.

Test: Could a domain expert read the code? Can the code be unit tested without mocks or spinning up databases?

// ❌ WRONG - domain polluted with infrastructure
class Delivery {
  async dispatch() {
    this.logger.info('Dispatching delivery', { id: this.id })  // Infrastructure!
    await this.db.beginTransaction()                           // Infrastructure!
    if (this.status !== 'ready') throw new Error('Not ready')
    this.status = 'dispatched'
    await this.db.save(this)                                   // Infrastructure!
    await this.db.commit()                                     // Infrastructure!
    await this.pushNotification.notifyDriver()                 // Infrastructure!
  }
}

// ✅ RIGHT - isolated domain logic
class Delivery {
  dispatch(): void {
    if (this.status !== DeliveryStatus.Ready) {
      throw new DeliveryNotReadyError(this.id)
    }
    this.status = DeliveryStatus.Dispatched
    this.dispatchedAt = new Date()
  }
}

2. Use rich domain language

What: Names in code match exactly what domain experts say. No programmer jargon. No generic names.

Why: Translation between code-speak and business-speak causes bugs. When a domain expert says "assess a claim" and the code says "processEntity", someone will misunderstand something.

Test: Would a domain expert recognize this name? If you'd need to translate it for them, it's wrong.

Common generic terms to watch for:

  • Manager, Handler, Processor, Helper, Util
  • Data, Info, Item (when domain terms exist)
  • process, handle, execute (what does it actually DO?)
// ❌ WRONG - programmer jargon
class ClaimHandler {
  processClaimData(claimData: ClaimDTO): ProcessingResult {
    return this.claimProcessor.handle(claimData)
  }
}

// ✅ RIGHT - domain language
class ClaimAssessor {
  assessClaim(claim: InsuranceClaim): AssessmentDecision {
    if (claim.exceedsCoverageLimit()) {
      return AssessmentDecision.deny(DenialReason.ExceedsCoverage)
    }
    return AssessmentDecision.approve()
  }
}

3. Orchestrate with use cases

What: A use case is a user goal—something a user would recognize as an action they can perform in your application.

Why: Use cases define the entry points to your domain. They answer "what can a user do?" If something isn't a user goal, it's supporting machinery that belongs elsewhere.

Test (the menu test): If you described your application's features to a user like a menu, would this be on it?

DELIVERY APP MENU:
├── Request Delivery     ← Use case: user goal
├── Track Delivery       ← Use case: user goal
├── Cancel Delivery      ← Use case: user goal
├── Calculate ETA        ← NOT a use case: internal machinery
└── Check Delivery Radius ← NOT a use case: domain rule
// ❌ WRONG - not a user goal, this is internal machinery
// use-cases/calculate-eta.use-case.ts
async function calculateETA(deliveryId: DeliveryId) {
  const delivery = await deliveryRepository.find(deliveryId)
  const driver = await driverRepository.find(delivery.driverId)
  return routeService.estimateArrival(driver.location, delivery.destination)
}

// ✅ RIGHT - actual user goal (appears in menu)
// use-cases/cancel-delivery.use-case.ts
async function cancelDelivery(deliveryId: DeliveryId, reason: CancellationReason) {
  const delivery = await deliveryRepository.find(deliveryId)
  delivery.cancel(reason)
  await deliveryRepository.save(delivery)
}

4. Avoid anemic domain model

What: Domain logic lives in domain objects, not in use cases. Use cases orchestrate; domain objects decide.

Why: When business rules leak into use cases, they scatter across the codebase, duplicate, and diverge. The domain becomes a dumb data carrier.

Test: Is your use case making business decisions, or just coordinating? If the use case contains if/else business logic, you likely have an anemic model.

// ❌ WRONG - business logic in use case (anemic domain)
async function confirmDropoff(deliveryId: DeliveryId, photo: ProofPhoto) {
  const delivery = await deliveryRepository.find(deliveryId)

  // Business rules leaked into use case!
  if (delivery.status !== 'in_transit') {
    throw new Error('Delivery not in transit')
  }
  if (!photo && delivery.requiresSignature) {
    throw new Error('Proof of delivery required')
  }

  delivery.status = 'delivered'
  delivery.proofPhoto = photo
  delivery.deliveredAt = new Date()
  await deliveryRepository.save(delivery)
}

// ✅ RIGHT - use case orchestrates, domain decides
async function confirmDropoff(deliveryId: DeliveryId, photo: ProofPhoto) {
  const delivery = await deliveryRepository.find(deliveryId)

  delivery.confirmDropoff(photo)  // Domain enforces the rules

  await deliveryRepository.save(delivery)
}

Signs of anemic model:

  • Use cases full of if/else business logic
  • Domain objects are just data with getters/setters
  • Business rules duplicated across multiple use cases
  • Validation logic outside the object being validated

5. Separate generic concepts

What: Generic capabilities that aren't specific to your domain live separately from domain-specific logic.

Why: A retry mechanism, a caching layer, a validation framework—these aren't YOUR domain. Mixing them with domain logic obscures what's actually specific to your business.

Test: Would this code exist in a completely different business domain? If yes, it's generic. If it's specific to YOUR business rules, it's domain.

// ❌ WRONG - generic retry logic mixed with domain
// domain/driver-locator.ts
class DriverLocator {
  // Generic retry logic does not belong in domain!
  private async withRetry<T>(fn: () => Promise<T>, attempts: number): Promise<T> {
    for (let i = 0; i < attempts; i++) {
      try { return await fn() }
      catch (e) { if (i === attempts - 1) throw e }
    }
    throw new Error('Retry failed')
  }

  async findAvailableDriver(zone: Zone): Promise<Driver> {
    return this.withRetry(() => this.searchDriversInZone(zone), 3)
  }

  private async searchDriversInZone(zone: Zone): Promise<Driver> {
    // domain logic to find nearest available driver
  }
}

// ✅ RIGHT - same behavior, properly separated
// infra/retry.ts (generic, reusable in any project)
export async function withRetry<T>(fn: () => Promise<T>, attempts: number): Promise<T> {
  for (let i = 0; i < attempts; i++) {
    try { return await fn() }
    catch (e) { if (i === attempts - 1) throw e }
  }
  throw new Error('Retry failed')
}

// domain/driver-locator.ts (pure domain, no infra imports)
class DriverLocator {
  async findAvailableDriver(zone: Zone): Promise<Driver> {
    // domain logic to find nearest available driver
  }
}

// use-cases/dispatch-delivery.ts (orchestrates domain + infra)
async function dispatchDelivery(deliveryId: DeliveryId) {
  const delivery = await deliveryRepository.find(deliveryId)
  const driver = await withRetry(
    () => driverLocator.findAvailableDriver(delivery.zone), 3
  )
  delivery.assignDriver(driver)
  await deliveryRepository.save(delivery)
}

6. Make the implicit explicit... like your life depends on it

What: Strive for maximum expressiveness. Go as far as possible to identify and name domain concepts in code. Don't settle for "good enough"—push until the code speaks the domain fluently.

Why: Maximum alignment optimizes communication between engineers and domain experts. Easier to discuss nuances and avoid misconceptions. Easier to plan and implement features and detect when the design of code is causing unnecessary friction.

Test: Could you discuss this code with a domain expert without translation? Are there concepts they use that don't exist in your code?

// This code looks fine - isolated, uses domain terms
class Delivery {
  status: DeliveryStatus
  driver: Driver | null
  pickupTime: Date | null
  dropoffTime: Date | null
  proofOfDelivery: Photo | null

  assignDriver(driver: Driver): void {
    if (this.status !== DeliveryStatus.Confirmed) throw new Error('...')
    this.driver = driver
    this.status = DeliveryStatus.Assigned
  }

  recordPickup(): void {
    if (this.status !== DeliveryStatus.Assigned) throw new Error('...')
    this.pickupTime = new Date()
    this.status = DeliveryStatus.InTransit
  }

  recordDropoff(photo: Photo): void {
    if (this.status !== DeliveryStatus.InTransit) throw new Error('...')
    this.proofOfDelivery = photo
    this.dropoffTime = new Date()
    this.status = DeliveryStatus.Delivered
  }
}

// But the TYPES can describe the domain! Each state is a distinct concept.
// Reading the types alone tells you how deliveries work.

type Delivery =
  | RequestedDelivery      // Customer placed request
  | ConfirmedDelivery      // Restaurant accepted
  | AssignedDelivery       // Driver assigned, heading to restaurant
  | InTransitDelivery      // Driver picked up, heading to customer
  | DeliveredDelivery      // Complete with proof

interface RequestedDelivery {
  kind: 'requested'
  customer: Customer
  restaurant: Restaurant
  items: MenuItem[]
}

interface ConfirmedDelivery {
  kind: 'confirmed'
  customer: Customer
  restaurant: Restaurant
  items: MenuItem[]
  estimatedPrepTime: Duration
}

interface AssignedDelivery {
  kind: 'assigned'
  customer: Customer
  restaurant: Restaurant
  items: MenuItem[]
  driver: Driver              // Now guaranteed to exist
  estimatedPickup: Time
}

interface InTransitDelivery {
  kind: 'in_transit'
  customer: Customer
  restaurant: Restaurant
  items: MenuItem[]
  driver: Driver
  pickupTime: Time            // Now guaranteed to exist
  estimatedDropoff: Time
}

interface DeliveredDelivery {
  kind: 'delivered'
  customer: Customer
  restaurant: Restaurant
  items: MenuItem[]
  driver: Driver
  pickupTime: Time
  dropoffTime: Time           // Now guaranteed to exist
  proofOfDelivery: Photo      // Now guaranteed to exist
}

// State transitions are explicit functions
function confirmDelivery(d: RequestedDelivery, prepTime: Duration): ConfirmedDelivery
function assignDriver(d: ConfirmedDelivery, driver: Driver): AssignedDelivery
function recordPickup(d: AssignedDelivery): InTransitDelivery
function recordDropoff(d: InTransitDelivery, photo: Photo): DeliveredDelivery

Smaller improvements matter too:

// Extract an if statement to a named method
if (distance.kilometers > 10 && !driver.hasLongRangeVehicle) { ... }
if (delivery.exceedsDriverRange(driver)) { ... }

// Name a boolean expression
const canAssign = driver.isAvailable && driver.isInZone(delivery.zone) && !driver.atCapacity
const canAssign = driver.canAccept(delivery)

// Rename to use domain language
const fee = customFee ?? standardFee
const fee = customFee ?? defaultDeliveryFee

Ways to increase expressiveness:

  • Model states as distinct types (Delivery with status → RequestedDelivery, ConfirmedDelivery, etc.)
  • Make optional fields guaranteed at the right state (driver: Driver | null → driver: Driver)
  • Extract conditionals to named methods (complex if → exceedsDriverRange)
  • Rename variables to use domain language (standardFee → defaultDeliveryFee)

7. Design aggregates around invariants

What: An aggregate is a cluster of objects that must be consistent together. The aggregate root enforces the rules. External code cannot violate invariants.

Why: Without clear boundaries, inconsistent states creep in. One piece of code updates the delivery, another updates the route, and suddenly the ETA is wrong.

Test: What must be true at all times? What rules must never be broken? The objects involved in those rules form an aggregate.

// ❌ WRONG - no aggregate boundary, invariants violated
class Delivery {
  stops: DeliveryStop[]  // Exposed!
  totalDistance: Distance
}

// External code can break invariants
delivery.stops.push(new DeliveryStop(location))
// Oops - totalDistance is now wrong!

// ✅ RIGHT - aggregate protects invariants
class Delivery {
  private stops: DeliveryStop[] = []
  private _totalDistance: Distance = Distance.zero()

  addStop(location: Location): void {
    if (this.status !== DeliveryStatus.Planning) {
      throw new DeliveryNotModifiableError(this.id)
    }
    const previousStop = this.stops[this.stops.length - 1]
    const stop = new DeliveryStop(location)
    this.stops.push(stop)
    this._totalDistance = this._totalDistance.add(
      previousStop.distanceTo(location)  // Invariant maintained!
    )
  }

  removeStop(stopId: StopId): void {
    if (this.stops.length <= 2) {
      throw new MinimumStopsRequiredError(this.id)
    }
    // Recalculate total distance after removal
    this.stops = this.stops.filter(s => !s.id.equals(stopId))
    this._totalDistance = this.calculateTotalDistance()  // Invariant maintained!
  }

  get totalDistance(): Distance {
    return this._totalDistance
  }
}

Aggregate rules:

  • One root entity per aggregate
  • External code accesses only through the root
  • The root enforces all invariants
  • Reference other aggregates by ID, not object
  • Methods should operate on the same state—if they don't, split the aggregate

8. Extract immutable value objects liberally

What: When something is defined by its attributes (not identity), make it an immutable value object. Do this liberally—more value objects is usually better.

Why: Value objects are simple. They can't change unexpectedly. They're easy to test. They make domain concepts explicit. They're also a good way to extract logic from aggregates and entities that can easily get large—keep entities focused by pulling cohesive concepts into value objects.

Test: Does this need a unique ID to track it over time? No? It's probably a value object.

// Entity with primitives that should be a value object
class Delivery {
  id: DeliveryId
  feeAmount: number
  feeCurrency: string
}

// Extract the value object
class Delivery {
  id: DeliveryId
  fee: Money
}

class Money {
  constructor(
    readonly amount: number,
    readonly currency: Currency
  ) {}

  add(other: Money): Money {
    if (this.currency !== other.currency) {
      throw new CurrencyMismatchError(this.currency, other.currency)
    }
    return new Money(this.amount + other.amount, this.currency)
  }

  equals(other: Money): boolean {
    return this.amount === other.amount && this.currency === other.currency
  }
}

Good candidates for value objects:

  • Money, Currency, Percentage
  • DateRange, TimeSlot, Duration
  • Address, Coordinates, Distance
  • EmailAddress, PhoneNumber, URL
  • Quantity, Weight, Temperature
  • PersonName, CompanyName

9. Repositories are for loading and saving full aggregates

The job of a repository is to load and save entire aggregates - not partial aggregates or nested entities inside an aggregate. The load method takes an ID and returns the full aggregate.

A repository should not exist for a domain object that is not an aggregate. Entity that is part of an aggreate -> does not have a repository. It is loaded via the aggregate root's repository.

The hydrate method is used ONLY for constructing an aggregate from it's persisted state. It should not be abused for other use cases like creating new instances. Each creation flow should have a dedicated factory method, e.g. Order.fromExisting(), Order.new(), Order.draft().

The save method of a repository should take the full aggregate.

If you just want to query information to display without modifying state and applying business rules, create a separate read model object and don't use a repository.


Mandatory Checklist

When designing, refactoring, analyzing, or reviewing code:

  1. Verify domain is isolated from infrastructure (no DB/HTTP/logging in domain; generic utilities in infra; domain doesn't import infra)
  2. Verify names are from YOUR domain, not generic developer jargon
  3. Verify use cases are intentions of users, human or automated (apply the menu test)
  4. Verify business logic lives in domain objects, use cases only orchestrate
  5. Verify states are modeled as distinct types where appropriate
  6. Verify hidden domain concepts are extracted and named explicitly
  7. Verify aggregates are designed around invariants, not naive mapping of domain nouns
  8. Verify values are extracted into value objects expressing a domain concept
  9. Veirfy no abuse of hydrate methods for creation scenarios. Each creation scenario must have dedicated factory method

Do not proceed until all checks pass.

平台分布

Codex

35.9%
按下载量换算60

Claude

27.84%
按下载量换算46

Cursor

18.72%
按下载量换算31

Gemini CLI

9.1%
按下载量换算15

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills