bicep-what-if-analysis
azd up/azd provisionの影響分析、Bicep what-if実行とノイズフィルタリング。インフラ変更・デプロイ前の影響確認時に使用。
Best use case
bicep-what-if-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
azd up/azd provisionの影響分析、Bicep what-if実行とノイズフィルタリング。インフラ変更・デプロイ前の影響確認時に使用。
Teams using bicep-what-if-analysis should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bicep-what-if-analysis/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bicep-what-if-analysis Compares
| Feature / Agent | bicep-what-if-analysis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
azd up/azd provisionの影響分析、Bicep what-if実行とノイズフィルタリング。インフラ変更・デプロイ前の影響確認時に使用。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Bicep What-If 分析
インフラ変更前の影響範囲確認とノイズフィルタリングを支援します。
## ⚠️ このスキルを使うべき状況
以下のいずれかに該当する場合、**必ずこのスキルを呼び出してください**:
| ユーザーの質問・依頼 | 理由 |
|---------------------|------|
| 「azd up の影響は?」「azd provision で何が変わる?」 | 実際のAzure環境との差分が必要 |
| 「このBicep変更の影響を教えて」 | 静的分析では不十分、what-ifが必要 |
| 「デプロイしても大丈夫?」「破壊的変更はある?」 | リスク評価にwhat-if結果が必須 |
| 「インフラの変更点を確認したい」 | 現在の状態との比較が必要 |
**静的コード分析(Bicepファイルを読むだけ)では不十分です。**
What-if は Azure Resource Manager API を呼び出し、**現在デプロイ済みの状態との実際の差分**を取得します。
## クイックスタート
```bash
# フィルタ済みwhat-if分析(推奨)
./.github/skills/bicep-what-if-analysis/scripts/whatif-analyze.sh
# 生出力が必要な場合
./.github/skills/bicep-what-if-analysis/scripts/whatif-analyze.sh --raw
# 破壊的変更のみ抽出
./.github/skills/bicep-what-if-analysis/scripts/whatif-analyze.sh | jq 'select(.changeType == "Delete")'
```
## 前提条件
- `azd env`が初期化済み(`AZURE_LOCATION`等が設定済み)
- Azure CLIでログイン済み
## ノイズ判定基準
### 無視して良い変更
| リソース | プロパティ | 理由 |
|---------|-----------|------|
| 全リソース | `provisioningState` | 読み取り専用 |
| 全リソース | `etag` | 常に変化 |
| 全リソース | `resourceGuid`, `uniqueId` | 動的生成 |
| AKS | `currentOrchestratorVersion` | 読み取り専用 |
| AKS | `nodeImageVersion` | 読み取り専用 |
| AKS | `fqdn`, `azurePortalFQDN` | 動的生成 |
| AKS | `powerState.code` | 読み取り専用 |
| AKS | `identityProfile.*` | 動的生成 |
| Managed Identity | `principalId`, `clientId`, `tenantId` | 読み取り専用 |
### 要注意の変更(破壊的変更の可能性)
以下が `Modify` で表示された場合は**リソース再作成**の可能性があります:
| リソース | プロパティ | 影響 |
|---------|-----------|------|
| AKS | `networkProfile.networkPlugin` | クラスター再作成 |
| AKS | `networkProfile.networkPluginMode` | クラスター再作成 |
| AKS | `apiServerAccessProfile.subnetId` | クラスター再作成 |
| AKS | `agentPoolProfiles[*].vnetSubnetID` | ノードプール再作成 |
| Redis | `sku.name`, `sku.capacity` | データロスの可能性 |
| VNet | `addressSpace.addressPrefixes` | 依存リソースへ影響 |
## 分析フロー
```
1. what-if実行
↓
2. 変更タイプで分類
- NoChange / NoEffect / Ignore → 無視
- Create / Delete / Modify → 詳細確認
↓
3. Modifyの詳細確認
- ノイズリストに該当 → 無視
- 破壊的変更リストに該当 → 要注意
- それ以外 → 意図した変更か確認
```
## 変更タイプの意味
| タイプ | 説明 | 対応 |
|--------|------|------|
| **Create** | 新規作成 | 設定内容を確認 |
| **Delete** | 削除 | 意図した削除か確認 |
| **Modify** | 変更あり | 破壊的変更か確認 |
| **NoChange** | 変更なし | 無視 |
| **NoEffect** | 影響なし(読み取り専用等) | 無視 |
| **Ignore** | 評価対象外 | 通常は無視 |
## トラブルシューティング
### "AZURE_LOCATION is not set" エラー
```bash
# azd環境を初期化
azd env refresh
```
### what-ifが大量の変更を報告する
- APIバージョン更新後は多くの「変更」が報告されることがあります
- `--raw`オプションで生出力を確認し、実際の差分を確認してください
### 特定リソースの詳細を確認したい
```bash
# リソースIDでフィルタ
./.github/skills/bicep-what-if-analysis/scripts/whatif-analyze.sh | \
jq 'select(.resourceId | contains("managedClusters"))'
```
## このスキルを使わない場合
以下の場合は静的分析で十分です:
- 「Bicepファイルの構文を確認して」(リンター実行)
- 「このモジュールは何を作成する?」(コードリーディング)
- 「パラメータのデフォルト値は?」(ファイル参照)Related Skills
arxiv-analysis
Analyze arXiv research papers and explain them in accessible terms. Use when the user mentions arXiv, research paper, academic paper, scientific paper, preprint, or provides an arxiv.org URL.
analysis-spec-builder
Build and iteratively refine physics analysis specifications using analysis-specification-template.md. Use when the user asks to create or update an analysis spec, requests plots/histograms for a dataset, or describes a quick analysis task that should be formalized into a specification document.
abaqus-fatigue-analysis
Workflow for fatigue and durability analysis - cycle counting, damage accumulation, and fatigue life prediction.
security-analysis
Security audit patterns including OWASP Top 10, secret scanning, and language-specific vulnerabilities.
A/B Test Analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and experiment validation
what-did-i-do
Passive screen activity tracker. Use this skill when the user asks what they did today, wants to track their screen activity, or needs to analyze their productivity patterns.
architecture-analysis
Comprehensive frontend architecture analyzer that identifies technology stacks, build tools, and architectural patterns. Use when you need to quickly understand a project's structure, dependencies, and technical configuration. Provides analysis for Vue/React/Angular frameworks, Node.js environments, package managers, TypeScript usage, linters, and architecture patterns with multiple output formats including executive summaries and visualizations.
Wireshark Network Traffic Analysis
This skill should be used when the user asks to "analyze network traffic with Wireshark", "capture packets for troubleshooting", "filter PCAP files", "follow TCP/UDP streams", "detect network anomalies", "investigate suspicious traffic", or "perform protocol analysis". It provides comprehensive techniques for network packet capture, filtering, and analysis using Wireshark.
whatisxlistening-to
Query Last.fm listening data, show now playing, sync scrobble history to local DB, and deploy a personal "now playing" web dashboard. Use when user asks about current music, listening stats, scrobble history, or wants to set up a Last.fm dashboard.
Cost Analysis
Analyze infrastructure and operational costs with optimization recommendations
codebase-architecture-analysis
Analyze a GitHub codebase to create comprehensive architecture documentation including ASCII diagrams, component relationships, data flow, hosting infrastructure, and file structure assessment.
bicep
Expert assistance for Azure Bicep infrastructure-as-code. Provides best practices for authoring Bicep templates, Azure resource type discovery with API versions, resource schema retrieval, and Azure Verified Modules (AVM) guidance. Use when writing Bicep files, deploying Azure resources, looking up resource types/schemas, or working with AVM modules.