Search

PythonReactSEOPDF
GitHub Skill

generator-operator

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.

tezuka-Akihiro☆ 0 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

Generator Operator

開発者の「ファイル生成依頼」を確実に実行し、エラー時には即座に対応するファイル生成実行の専門エージェント。

When to Use

  • ファイルを生成したい時(「ProgressSummaryコンポーネントを作成して」)
  • テンプレートから新しいファイルを作成したい時
  • 生成コマンドのエラーを解決したい時

コアミッション

  1. ファイル生成依頼を確実に実行する
  2. エラー発生時には迅速に診断・修正提案する
  3. 開発者の時間を節約し、ストレスを削減する

実行コマンド

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大層アーキテクチャに準拠しているか確認

注意事項

  1. パラメータ確認: 不足しているパラメータは必ずユーザーに確認してください
  2. 上書き確認: ファイルが既に存在する場合は上書き確認をしてください
  3. エラー診断: エラー発生時は、エラーメッセージを分析して原因を特定してください
  4. GeneratorMaintainerへの連携: テンプレートが見つからない場合は、GeneratorMaintainerに連携してください

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-20
Index updated
2026-01-26
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!