architecture-patterns
アーキテクチャパターンを適用してAIコード生成を改善する
こちらからも入手できます: wshobson,Barnhardt-Enterprises-Inc
AIコード生成は、プロジェクトが明確なアーキテクチャガイダンスを欠いている場合、一貫性のないまたは構造の悪いコードを生成することがよくあります。このスキルは、AIアシスタントに明確な境界と一貫した構造を提供する実証済みのアーキテクチャパターンを提供し、保守的でテスト可能で拡張しやすいコードを実現します。
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「architecture-patterns」を使用しています。 Create a User entity with email validation and a UserRepository interface
期待される結果:
- アイデンティティと振る舞いを持つエンティティ
- ビジネスルール用の値オブジェクト
- リポジトリポート(実装ではなく)
- 明確な関心の分離
「architecture-patterns」を使用しています。 Set up a new backend service with Clean Architecture layers
期待される結果:
- ビジネスルールを持つドメインレイヤー
- ユースケースを持つアプリケーションレイヤー
- HTTP用のインターフェースアダプター
- データベース用のインフラストラクチャレイヤー
「architecture-patterns」を使用しています。 Write a Playwright test for the login page
期待される結果:
- ロケーターを持つLoginPageクラス
- ユーザー名とパスワードのアクションメソッド
- 検証用のアサーションメソッド
- ページオブジェクトを使用したクリーンなテストシナリオ
セキュリティ監査
安全This is a pure documentation skill containing only markdown files with architectural guidance. No executable code, network calls, file system access, or external commands exist. All 232 static findings are false positives: the scanner detected markdown code formatting (backticks) and documentation references to software concepts as security issues.
リスク要因
⚙️ 外部コマンド (111)
🌐 ネットワークアクセス (1)
品質スコア
作れるもの
新しいTypeScriptプロジェクトの構造化
クリーンアーキテクチャレイヤーでプロジェクトをセットアップして、AIが最初から整理されたコードを生成ようにする
保守可能なE2Eテストの作成
AIが一貫した読みやすいテストコードで拡張できるページオブジェクトモデルパターンを構築する
バウンデッドコンテキストの定義
複雑なドメイン全体でAIを導くDDD境界とユビキタス言語を確立する
これらのプロンプトを試す
Create a [domain] entity with value objects. Include validation rules, identity, and business methods. Use TypeScript with the domain-driven design pattern from the architecture-patterns skill.
Implement a [feature] use case following Clean Architecture. Create the domain entity, use case service, repository port, and controller. Dependencies should point inward.
Implement a [technology] adapter for the [port] port interface. Follow hexagonal architecture pattern with the core defining the contract and the adapter handling external communication.
Create a Playwright page object for [page_name]. Include locators, action methods, and assertions. Follow the Page Object Model pattern from the architecture-patterns skill.
ベストプラクティス
- AIに機能を実装させる前に、まずドメインモデルを定義する
- 内側のレイヤーを純粋に保ち、外側のレイヤーに依存しないようにする
- レイヤー間のコントラクトを定義するにはポート(インターフェース)を使用する
回避
- ビジネスロジックとHTTP処理をコントローラーで混合する
- ドメインエンティティがデータベースやフレームワークコードに依存ようにする
- ドメインオブジェクトをAPIレスポンスとして直接公開する(DTOを使用する)