Generates a full suite of DDD-compliant files for new features, including domain models, repositories, use cases, and tests.

Install

mkdir -p .claude/skills/add-feature-jujunjun110 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17445" && unzip -o skill.zip -d .claude/skills/add-feature-jujunjun110 && rm skill.zip

Installs to .claude/skills/add-feature-jujunjun110

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

新しい機能を追加する。ユーザーが機能の説明をしたとき、DDD4層に従って全レイヤーのファイルを生成する
51 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Generate Domain Model files with rich domain design
  • Create Repository Interface files using domain model types
  • Generate UseCase files with class-based structure and DI
  • Implement Repository files using Prisma for ORM conversion
  • Generate Presentation layer files including Composition, Loader, and Action

How it works

This skill generates a complete set of files for a new feature across all layers of the DDD 4-layer architecture, based on a user's feature description.

Inputs & outputs

You give it
Description of a new feature
You get back
A set of files across all layers of DDD 4-layer architecture (Domain, Application, Infrastructure, Presentation)

When to use add-feature

  • Adding a new user feature
  • Implementing domain models
  • Generating repository interfaces
  • Setting up application use cases

About this skill

機能追加スキル

ユーザーが「〇〇な機能を作って」と指示したときに適用する。 DDD 4層アーキテクチャに従い、以下のファイルを一括生成する。

生成するファイル

  1. Domain Model (src/backend/domain/models/{name}.model.ts)

    • Rich Domain Model として設計(ファクトリメソッド create() + reconstruct()
    • バリデーションはモデル自身で行う
    • エラーは Result<T, E> 型で返す
  2. Repository Interface (src/backend/domain/repositories/{name}.repository.ts)

    • ドメインモデル型のみ使用(ORM型を出さない)
  3. Gateway Interface(必要な場合: src/backend/domain/gateways/{name}.gateway.ts

    • 外部API連携がある場合のみ
  4. UseCase (src/backend/application/usecases/{action}-{name}.usecase.ts)

    • クラスベース + コンストラクタ DI
    • execute() メソッドで公開
  5. Repository 実装 (src/backend/infrastructure/repositories/prisma-{name}.repository.ts)

    • Prisma 経由。ORM型 ↔ ドメインモデル変換を担当
  6. Gateway 実装(必要な場合)

    • 本番: src/backend/infrastructure/adapters/{provider}-{name}.adapter.ts
    • Stub: src/backend/infrastructure/adapters/stub-{name}.adapter.ts
  7. Composition (src/backend/presentation/composition/{name}.composition.ts)

    • DI組み立て。環境変数でStub/本番を切り替え
  8. Loader (src/backend/presentation/loaders/{name}.loader.ts)

    • データ取得用
  9. Action (src/backend/presentation/actions/{name}.action.ts)

    • 'use server' 付き。副作用用
  10. ページ (src/app/{path}/page.tsx)

    • Server Component。loader を呼んでデータ表示
  11. Unit テスト

    • test/unit/domain/models/{name}.model.test.ts
    • test/unit/application/usecases/{action}-{name}.usecase.test.ts

Prisma スキーマ

必要に応じて prisma/schema.prisma にモデルを追加し、pnpm db:migrate でマイグレーションを作成する。

ルール

  • ファイル命名は kebab-case + レイヤーサフィックス
  • 依存方向: presentation → application → domain ← infrastructure
  • application から infrastructure を直接 import しない
  • presentation/loaders, actions から domain, infrastructure を直接 import しない
  • 関数エクスポートでサービスを実装しない(クラスベース必須)
  • 生成後に pnpm verify を実行して全パスすることを確認

サンプル(参考)

既存の Joke 機能(joke.model.ts, generate-joke.usecase.ts 等)を参考にする。

When not to use it

  • When the task is not to add a new feature following DDD 4-layer architecture
  • When the user does not provide a feature description

Limitations

  • Requires adherence to DDD 4-layer architecture
  • Requires Prisma for repository implementation
  • Requires class-based implementation for UseCases

How it compares

This skill automates the creation of a feature's entire file structure according to DDD principles, ensuring architectural consistency and reducing manual setup time.

Compared to similar skills

add-feature side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
add-feature (this skill)04moNo flagsIntermediate
nextjs-chatbot01moNo flagsAdvanced
shadcn-ui-setup377moReviewBeginner
landing-page-guide-v2488moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

nextjs-chatbot

laguagu

Advanced patterns for production Next.js web chatbots built with AI SDK 6 + ai-elements. Covers tool calling with human-in-the-loop (HITL) approval, PostgreSQL session persistence, GDPR consent gating, SQL-first search, per-tool UI rendering, popup widget embedding, message feedback, follow-up sugge

00

shadcn-ui-setup

maneeshanif

Install and configure Shadcn/ui component library with Radix UI primitives, Aceternity UI effects, set up components, and manage the component registry. Use when adding Shadcn/ui to a Next.js project or installing specific UI components for Phase 2.

37194

landing-page-guide-v2

bear2u

Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.

48105

nextjs15-init

bear2u

Use when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack

8102

frontend-prompt-generator

gharam1234

Generate structured prompts for frontend development tasks following established patterns. Use when the user requests prompts for wireframes, UI implementation, data binding, or routing functionality in React/Next.js projects with specific formatting requirements (Cursor rules, file paths, test-driven development).

679

nextjs-supabase-auth

davila7

Expert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected route.

1259

Search skills

Search the agent skills registry