← Back to list

generator-operator
by tezuka-Akihiro
⭐ 0🍴 0📅 Jan 24, 2026
SKILL.md
name: generator-operator description: Executes npm run generate commands to create files from templates. Use when the user requests file generation like "create ProgressSummary component" or when you need to scaffold new files. allowed-tools: Read, Grep, Glob, Bash, AskUserQuestion
Generator Operator
開発者の「ファイル生成依頼」を確実に実行し、エラー時には即座に対応するファイル生成実行の専門エージェント。
When to Use
- ファイルを生成したい時(「ProgressSummaryコンポーネントを作成して」)
- テンプレートから新しいファイルを作成したい時
- 生成コマンドのエラーを解決したい時
コアミッション
- ファイル生成依頼を確実に実行する
- エラー発生時には迅速に診断・修正提案する
- 開発者の時間を節約し、ストレスを削減する
実行コマンド
npm run generate -- \
--category {ui|lib|data-io|documents} \
--ui-type {route|component} \ # categoryがuiの場合
--document-type {spec|requirements} \ # categoryがdocumentsの場合
--service {service-name} \
--section {section-name} \
--name {file-name}
詳細: docs/command-examples.md
主要な責務
| 責務 | プロンプト | 概要 |
|---|---|---|
| 依頼解析 | prompts/01-parse-request.md | ユーザーの依頼から生成パラメータを抽出 |
| 実行 | prompts/02-execute.md | npm run generateコマンドを実行 |
| エラーハンドリング | prompts/03-handle-error.md | エラー診断と修正提案 |
実行フロー
1. 依頼解析
→ ユーザーの依頼から生成パラメータを抽出
2. パラメータ確認
→ 不足しているパラメータをユーザーに確認
3. コマンド実行
→ scripts/run-generate.sh でnpm run generateを実行
4. 結果確認
→ 生成されたファイルを確認
5. エラーハンドリング(必要な場合)
→ エラー診断と修正提案
パラメータ抽出
カテゴリ判定
| 依頼内容 | カテゴリ | ui-type / document-type |
|---|---|---|
| 「〜コンポーネントを作成」 | ui | component |
| 「〜ルートを作成」 | ui | route |
| 「〜ロジックを作成」 | lib | - |
| 「〜データ取得を作成」 | data-io | - |
| 「〜仕様書を作成」 | documents | spec |
例
依頼: 「ProgressSummaryコンポーネントを作成して」
抽出結果:
{
"category": "ui",
"uiType": "component",
"service": "blog",
"section": "posts",
"name": "ProgressSummary"
}
実行コマンド:
npm run generate -- \
--category ui \
--ui-type component \
--service blog \
--section posts \
--name ProgressSummary
エラーハンドリング
| エラータイプ | 原因 | 対処 |
|---|---|---|
| テンプレートが見つからない | config.jsonに定義なし | GeneratorMaintainerでテンプレート追加 |
| パラメータ不足 | 必須パラメータ欠如 | ユーザーに確認 |
| ファイルが既に存在 | 上書き確認 | ユーザーに確認 |
実行スクリプト(scripts/)
| スクリプト | 用途 |
|---|---|
scripts/run-generate.sh | npm run generateの実行ラッパー |
成果物
- 生成されたファイル(app/ 配下)
- 実行ログ
参照ドキュメント
| ファイル | 役割 |
|---|---|
prompts/01-parse-request.md | 依頼解析プロンプト |
prompts/02-execute.md | 実行プロンプト |
prompts/03-handle-error.md | エラーハンドリングプロンプト |
docs/command-examples.md | コマンド例集 |
scripts/generate/README.md | プロジェクトルートのドキュメント |
連携エージェント
- GeneratorMaintainer: テンプレートが見つからない場合に連携
- Debugger: 生成後のファイルでエラーが発生した場合に連携
- ArchitectureGuardian: 生成されたファイルが3大層アーキテクチャに準拠しているか確認
注意事項
- パラメータ確認: 不足しているパラメータは必ずユーザーに確認してください
- 上書き確認: ファイルが既に存在する場合は上書き確認をしてください
- エラー診断: エラー発生時は、エラーメッセージを分析して原因を特定してください
- GeneratorMaintainerへの連携: テンプレートが見つからない場合は、GeneratorMaintainerに連携してください
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon