jpskill.com
📦 その他 コミュニティ

stack-analyzer

プロジェクトの技術構成を分析し、必要なスキルを提案するSkillで、フレームワークを自動検出し、汎用的なAI開発キットを起動、さらにプロジェクト固有のスキルをリポジトリに構築することも可能です。

📜 元の英語説明(参考)

Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

🇯🇵 日本人クリエイター向け解説

一言でいうと

プロジェクトの技術構成を分析し、必要なスキルを提案するSkillで、フレームワークを自動検出し、汎用的なAI開発キットを起動、さらにプロジェクト固有のスキルをリポジトリに構築することも可能です。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o stack-analyzer.zip https://jpskill.com/download/18052.zip && unzip -o stack-analyzer.zip && rm stack-analyzer.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18052.zip -OutFile "$d\stack-analyzer.zip"; Expand-Archive "$d\stack-analyzer.zip" -DestinationPath $d -Force; ri "$d\stack-analyzer.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して stack-analyzer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → stack-analyzer フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Stack Analyzer Skill

プロジェクトの技術スタックを分析し、AI支援開発に適したスキルを推奨またはスキャフォールディングするメタスキルです。このスキルは /ai-dev-kit:setup の実行中に自動的に実行されますが、手動で呼び出すこともできます。

設計原則

プラグインの分離

痕跡を残さない: ai-dev-kit プラグインは、アーティファクトを残さずに完全に削除できる必要があります。このスキルは以下を強制します。

コンポーネント 場所 アンインストール時
汎用スキル plugins/ai-dev-kit/skills/ プラグインとともに削除
プロジェクト固有のスキル ターゲットリポジトリ .claude/skills/ ユーザーの選択
生成されたマニフェスト .claude/skills/_generated.json ユーザーの選択

汎用性

すべての ai-dev-kit スキルは、特定のコードベースに特化せず、フレームワークに依存しないものです。

パターン 正しい 間違い
BAML スキル 汎用的な BAML パターン CodeGraph-DE 固有の DTO
Supabase スキル 一般的なベストプラクティス Book-Vetting 固有のクエリ
スキーマアライメント 任意の ORM で動作 特定のモデルを仮定

変数

変数 デフォルト 説明
AUTO_ACTIVATE false 推奨される汎用スキルを自動的にアクティブ化します
SCAFFOLD_SKILLS false ターゲットリポジトリにプロジェクト固有のスキルをスキャフォールディングします
OUTPUT_REPORT true 推奨レポートを生成します
MANIFEST_PATH .claude/skills/_generated.json 生成されたマニフェストのパス

手順

必須 - 以下のワークフローの手順を順番に実行してください。

  1. library-detection スキルを実行して、プロジェクトのスタックを取得します
  2. 検出されたスタックをスキルの推奨事項と照合します
  3. 推奨される汎用スキルを報告します
  4. 必要に応じて、プロジェクト固有のスキルをスキャフォールディングします
  5. スキルが作成された場合は、生成されたマニフェストを更新します

危険信号 - 停止して再検討

もしあなたが以下をしようとしているなら:

  • 特定のコードベースに合わせたスキルを作成する (汎用的なパターンではなく)
  • プロジェクト固有のスキルをプラグインディレクトリに配置する
  • 生成されたマニフェストの更新をスキップする
  • 検出されていないテクノロジーのスキルを推奨する

停止 -> 検出結果を確認 -> 汎用的なパターンを使用 -> その後、続行

ワークフロー

1. プロジェクトスタックの検出

最初に library-detection スキルを呼び出します。

Read and execute plugins/ai-dev-kit/skills/library-detection/SKILL.md

これにより、以下が返されます。
- languages (typescript, python, etc.)
- frameworks (react, fastapi, etc.)
- test_frameworks (vitest, pytest, etc.)
- databases (postgresql, sqlite, etc.)
- build_tools (vite, uv, etc.)

2. スキルの推奨事項との照合

./config/recommendations.yaml から推奨事項をロードして照合します。

検出されたテクノロジーごとに:
  IF スキルのアクティベーションルールに一致する場合:
    recommended_skills リストに追加
  IF スキャフォールドテンプレートルールに一致する場合:
    scaffold_candidates リストに追加

3. レポートの生成

推奨レポートを作成します。

# Stack Analysis Report

## 検出されたスタック
- **言語**: TypeScript, Python
- **フレームワーク**: Next.js, FastAPI
- **データベース**: PostgreSQL (via Supabase)
- **テスト**: Vitest, Pytest
- **AI/ML**: BAML

## 推奨される汎用スキル (プラグイン内)

| スキル | 理由 | ステータス |
|-------|--------|--------|
| baml-integration | baml_src/ に BAML が検出されました | アクティブ |
| supabase-patterns | Supabase の依存関係が見つかりました | アクティブ |
| schema-alignment | SQLAlchemy が検出されました | アクティブ |

## プロジェクト固有のスキル (スキャフォールディング可能)

| テンプレート | トリガー | 出力 |
|----------|---------|--------|
| project-research | 3 つのリサーチサブエージェントが見つかりました | .claude/skills/{project}-research/ |
| project-domain | src/models/ にモデルがあります | .claude/skills/{project}-domain/ |

4. プロジェクト固有のスキルのスキャフォールディング (有効な場合)

スキャフォールド候補ごとに:

# 1. テンプレートをターゲットリポジトリにコピーします
cp -r ./templates/{template}/ ${TARGET_REPO}/.claude/skills/{project}-{template}/

# 2. 生成ヘッダーを SKILL.md に追加します
echo "<!-- Generated by ai-dev-kit:recommend-skills on $(date) -->" | \
  cat - ./templates/{template}/SKILL.md > temp && mv temp SKILL.md

# 3. プロジェクト名でカスタマイズします
sed -i "s/{project}/${PROJECT_NAME}/g" SKILL.md

5. 生成されたマニフェストの更新

.claude/skills/_generated.json を作成または更新します。

{
  "generated_by": "ai-dev-kit:recommend-skills",
  "generated_at": "2025-12-24T10:00:00Z",
  "plugin_version": "1.0.0",
  "skills_created": [
    {
      "path": ".claude/skills/book-vetting-research/",
      "template": "project-research",
      "created_at": "2025-12-24T10:00:00Z"
    }
  ],
  "docs_created": [
    "ai-docs/libraries/baml/"
  ],
  "cleanup_instructions": "これらのファイルは ai-dev-kit によって生成されました。プラグインをアンインストールした後、削除してもかまいません。"
}

スキルの推奨ルール

汎用スキル (アクティブ化)

スキル 検出条件
baml-integration baml_src/**/*.baml が存在するか、baml-py/baml の依存関係がある
supabase-patterns supabase の依存関係があるか、supabase/migrations/ が存在する
schema-alignment sqlalchemy/prisma/django/alembic が検出された
treesitter-patterns tree-sitter/tree_sitter の依存関係がある
security-audit 常に本番コードベースに推奨されます

プロジェクト固有のスキル (スキャフォールド)

テンプレート 検出条件
project-research .claude/commands/**/research/** または subagent.*research パターン
project-domain src/models/** または services/domain/** が存在する
project-testing 標準フレームワークを超えるカスタムテストパターン

テンプレート

project-research

リサーチ指向のサブエージェントを持つプロジェクトの場合:

templates/project-research/
├── SKILL.md          # カスタマイズされたリサーチパターン
├── cookbook/
│   └── research-workflow.md
└── reference/
    └── source-types.md

project-domain

豊富なドメインモデルを持つプロジェクトの場合:


templates/project-domain/
├── SKILL.md          # ドメインの語彙とパターン
├── cookbook/
│   └── entity-relationships.md
└── reference/
    └── dom

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Stack Analyzer Skill

A meta-skill that analyzes a project's technology stack and recommends or scaffolds appropriate skills for AI-assisted development. This skill runs automatically during /ai-dev-kit:setup but can also be invoked manually.

Design Principles

Plugin Isolation

Leave No Trace: The ai-dev-kit plugin must be completely removable without leaving artifacts. This skill enforces:

Component Location On Uninstall
Generic skills plugins/ai-dev-kit/skills/ Removed with plugin
Project-specific skills Target repo .claude/skills/ User's choice
Generated manifest .claude/skills/_generated.json User's choice

Generality

All ai-dev-kit skills are framework-generic, not tailored to any specific codebase:

Pattern Correct Wrong
BAML skill Universal BAML patterns CodeGraph-DE-specific DTOs
Supabase skill General best practices Book-Vetting-specific queries
Schema alignment Works with any ORM Assumes specific models

Variables

Variable Default Description
AUTO_ACTIVATE false Automatically activate recommended generic skills
SCAFFOLD_SKILLS false Scaffold project-specific skills in target repo
OUTPUT_REPORT true Generate recommendation report
MANIFEST_PATH .claude/skills/_generated.json Path for generated manifest

Instructions

MANDATORY - Follow the Workflow steps below in order.

  1. Run library-detection skill to get project stack
  2. Match detected stack against skill recommendations
  3. Report recommended generic skills
  4. Optionally scaffold project-specific skills
  5. Update generated manifest if skills were created

Red Flags - STOP and Reconsider

If you're about to:

  • Create a skill tailored to a specific codebase (vs generic pattern)
  • Put project-specific skills in the plugin directory
  • Skip the generated manifest update
  • Recommend skills for undetected technologies

STOP -> Verify the detection results -> Use generic patterns -> Then proceed

Workflow

1. Detect Project Stack

Invoke the library-detection skill first:

Read and execute plugins/ai-dev-kit/skills/library-detection/SKILL.md

This returns:
- languages (typescript, python, etc.)
- frameworks (react, fastapi, etc.)
- test_frameworks (vitest, pytest, etc.)
- databases (postgresql, sqlite, etc.)
- build_tools (vite, uv, etc.)

2. Match Against Skill Recommendations

Load recommendations from ./config/recommendations.yaml and match:

For each detected technology:
  IF matches skill activation rule:
    Add to recommended_skills list
  IF matches scaffold template rule:
    Add to scaffold_candidates list

3. Generate Report

Create a recommendation report:

# Stack Analysis Report

## Detected Stack
- **Languages**: TypeScript, Python
- **Frameworks**: Next.js, FastAPI
- **Database**: PostgreSQL (via Supabase)
- **Test**: Vitest, Pytest
- **AI/ML**: BAML

## Recommended Generic Skills (in plugin)

| Skill | Reason | Status |
|-------|--------|--------|
| baml-integration | BAML detected in baml_src/ | Active |
| supabase-patterns | Supabase dependency found | Active |
| schema-alignment | SQLAlchemy detected | Active |

## Project-Specific Skills (scaffoldable)

| Template | Trigger | Output |
|----------|---------|--------|
| project-research | 3 research subagents found | .claude/skills/{project}-research/ |
| project-domain | Models in src/models/ | .claude/skills/{project}-domain/ |

4. Scaffold Project-Specific Skills (if enabled)

For each scaffold candidate:

# 1. Copy template to target repo
cp -r ./templates/{template}/ ${TARGET_REPO}/.claude/skills/{project}-{template}/

# 2. Add generation header to SKILL.md
echo "<!-- Generated by ai-dev-kit:recommend-skills on $(date) -->" | \
  cat - ./templates/{template}/SKILL.md > temp && mv temp SKILL.md

# 3. Customize with project name
sed -i "s/{project}/${PROJECT_NAME}/g" SKILL.md

5. Update Generated Manifest

Create or update .claude/skills/_generated.json:

{
  "generated_by": "ai-dev-kit:recommend-skills",
  "generated_at": "2025-12-24T10:00:00Z",
  "plugin_version": "1.0.0",
  "skills_created": [
    {
      "path": ".claude/skills/book-vetting-research/",
      "template": "project-research",
      "created_at": "2025-12-24T10:00:00Z"
    }
  ],
  "docs_created": [
    "ai-docs/libraries/baml/"
  ],
  "cleanup_instructions": "These files were generated by ai-dev-kit. You may delete them after uninstalling the plugin."
}

Skill Recommendation Rules

Generic Skills (Activate)

Skill Detection Criteria
baml-integration baml_src/**/*.baml exists OR baml-py/baml dependency
supabase-patterns supabase dependency OR supabase/migrations/ exists
schema-alignment sqlalchemy/prisma/django/alembic detected
treesitter-patterns tree-sitter/tree_sitter dependency
security-audit Always recommended for production codebases

Project-Specific Skills (Scaffold)

Template Detection Criteria
project-research .claude/commands/**/research/** OR subagent.*research pattern
project-domain src/models/** OR services/domain/** exists
project-testing Custom test patterns beyond standard frameworks

Templates

project-research

For projects with research-oriented subagents:

templates/project-research/
├── SKILL.md          # Customized research patterns
├── cookbook/
│   └── research-workflow.md
└── reference/
    └── source-types.md

project-domain

For projects with rich domain models:

templates/project-domain/
├── SKILL.md          # Domain vocabulary and patterns
├── cookbook/
│   └── entity-relationships.md
└── reference/
    └── domain-glossary.md

project-testing

For projects with custom testing requirements:

templates/project-testing/
├── SKILL.md          # Custom test patterns
├── cookbook/
│   └── test-fixtures.md
└── reference/
    └── coverage-requirements.md

Integration

With /ai-dev-kit:setup

Automatically runs during brownfield setup:

1. User runs: /ai-dev-kit:setup
2. Setup invokes: stack-analyzer skill
3. Stack analyzer:
   - Detects stack
   - Displays recommendations
   - Prompts: "Activate recommended skills? [y/N]"
   - If yes: marks skills as active
   - Prompts: "Scaffold project-specific skills? [y/N]"
   - If yes: creates skills in target repo
4. Setup continues with remaining steps

With /ai-dev-kit:recommend-skills

Direct invocation:

# Report only (no changes)
/ai-dev-kit:recommend-skills

# Auto-activate generic skills
/ai-dev-kit:recommend-skills --auto-activate

# Scaffold project-specific skills
/ai-dev-kit:recommend-skills --scaffold

# All options
/ai-dev-kit:recommend-skills --auto-activate --scaffold --output=report.md

Output Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "detected_stack": {
      "type": "object",
      "description": "Output from library-detection skill"
    },
    "recommended_skills": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "skill": {"type": "string"},
          "reason": {"type": "string"},
          "status": {"enum": ["recommended", "active", "not_applicable"]}
        }
      }
    },
    "scaffold_candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "template": {"type": "string"},
          "trigger": {"type": "string"},
          "output_path": {"type": "string"},
          "created": {"type": "boolean"}
        }
      }
    },
    "manifest_updated": {"type": "boolean"},
    "manifest_path": {"type": "string"}
  }
}

Cleanup on Uninstall

When ai-dev-kit plugin is removed, inform user:

## ai-dev-kit Uninstall Notice

The following files were generated by ai-dev-kit and persist after uninstall:

**Project-specific skills:**
- .claude/skills/book-vetting-research/
- .claude/skills/book-vetting-domain/

**Documentation:**
- ai-docs/libraries/baml/
- ai-docs/libraries/supabase/

See .claude/skills/_generated.json for full list.

These files are safe to delete if no longer needed.