This AI Skill supports development using the Next2D Framework and Next2D Player. It assists with code generation following the MVVM + Clean Architecture + Atomic Design patterns, optimizes WebGL rendering, and enables intuitive animation implementation.
SaferSkills independently audited next2d-development-assistant (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
View Layer (view/, ui/)
└─ depends on ─→ Interface Layer (interface/)
↑
Application Layer (model/application/)
├─ depends on ─→ Interface Layer
├─ depends on ─→ Domain Layer (model/domain/)
└─ calls ──────→ Infrastructure Layer (model/infrastructure/)Design Patterns: MVVM + Clean Architecture + Atomic Design Language: TypeScript (any 禁止, Interface は I プレフィックス) Build Tool: Vite / Testing: Vitest / Package Manager: npm
新規プロジェクトを作成する場合は以下のコマンドを実行する。TypeScript テンプレートを推奨する:
# 推奨: TypeScript
npx create-next2d-app {{PROJECT-NAME}} --template @next2d/framework-typescript-template
# JavaScript (非推奨)
npx create-next2d-app {{PROJECT-NAME}} --template @next2d/framework-javascript-templatesrc/config/routing.json にルートを追加npm run generate で View/ViewModel の雛形を自動生成interface/ にレスポンス型を定義 (I プレフィックス)model/infrastructure/repository/ に Repository を作成 (try-catch 必須, config からエンドポイント取得)model/application/{screen}/usecase/ に UseCase を作成 (execute メソッド統一)routing.json の requests で自動取得、または ViewModel から UseCase 経由で取得.n2d ファイルを file/ に配置ui/content/ に MovieClipContent 継承クラスを作成 (namespace でシンボル名を指定)routing.json で type: "content" として読み込みstopIndex で表示文字数を制御し、Tween でアニメーション。RPGゲームの台詞ウィンドウ演出に使用する。 stopIndex のデフォルトは -1(全文字表示)。0 にすると文字が非表示になる。 コード例は references/player-specs.md を参照。
ViewModel 生成 → ViewModel.initialize() → View 生成 (VM注入) → View.initialize() → View.onEnter() → (操作) → View.onExit()重要: ViewModel の initialize() は View の initialize() より前に呼ばれる。View 初期化時にはデータ準備済み。
execute。単一責任config から取得。any 禁止I プレフィックス。必要最小限のプロパティのみconstructor.name は minify でクラス名が変わるため禁止。displayObject.namespace(インスタンス)または Stage.namespace(static)の文字列比較で判定する。詳細は references/player-specs.md の「クラス判定(namespace)」を参照npx playwright によるE2E動作確認を推奨(例: npx playwright test)default-src 'self' data: blob: / worker-src 'self' blob: data: / style-src 'self' 'unsafe-inline' が必須。frame-ancestors 'none' は追加禁止Next2D の表示オブジェクトの継承関係。型キャストや子オブジェクト管理で誤りやすいため注意:
DisplayObject (基底クラス)
├── InteractiveObject
│ ├── DisplayObjectContainer
│ │ └── Sprite
│ │ └── MovieClip ← addChild() 可能、タイムラインアニメーション
│ └── TextField ← addChild() 不可、テキスト表示/入力
├── Shape ← addChild() 不可、軽量ベクター描画専用
└── Video ← addChild() 不可、動画再生専用重要な型制約:
Shape は DisplayObjectContainer を継承しない → addChild() 不可、子オブジェクト管理不可Shape と Sprite は直接キャスト不可(Conversion of type 'Shape' to type 'Sprite' エラー)→ as unknown as Sprite の二段階アサーションが必要hitArea プロパティの型は Sprite | null → Shape を hitArea に渡す場合は型アサーション必須| Command | Platform | Output |
|---|---|---|
npm run build:web -- --env prd | Web | dist/web/prd/ |
npm run build:steam:windows -- --env prd | Windows | dist/steam/windows/ |
npm run build:steam:macos -- --env prd | macOS | dist/steam/macos/ |
npm run build:ios -- --env prd | iOS | Xcode project |
npm run build:android -- --env prd | Android | Android Studio project |
Environment options: --env local|dev|stg|prd
Detailed specifications are available in the references/ directory. Read the relevant file based on the user's needs:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.