2-azure-subscription-select

$npx mdskill add microsoft/acs-resource-explorer/2-azure-subscription-select

Use this skill after authentication to select which Azure subscription(s) to scan for resources.

SKILL.md

.github/skills/2-azure-subscription-selectView on GitHub ↗
---
name: 2-azure-subscription-select
description: Interactive subscription selection workflow. Choose specific subscription(s) or scan all accessible subscriptions. Works with any Azure product or service.
---

## When to use this skill
Use this skill after authentication to select which Azure subscription(s) to scan for resources.

Examples:
  - "Select subscriptions to scan"
  - "Choose which subscription to analyze"
  - "I want to scan all my subscriptions"
  - "Let me pick a specific subscription"

## Preconditions
- Azure authentication completed (use **1-azure-auth-check** skill first)
- User has read access to at least one Azure subscription

## Workflow

### 1) **Check for Specific Subscription Request**
   - Ask user: "Do you have a specific subscription ID to scan?"
   - If YES:
     - Prompt for subscription ID
     - Validate subscription exists and is accessible:
       ```bash
       az account show --subscription <subscription-id>
       ```
     - If invalid: Show list of available subscriptions
     - If valid: Use that subscription only
   - If NO: Continue to step 2

### 2) **Detect Default Subscription**
   - Get current Azure context:
     ```bash
     az account show
     ```
   - If default subscription exists:
     - Display default subscription name and ID
     - Show count of all accessible subscriptions:
       ```bash
       az account list --query "length(@)"
       ```
   - If no default: Continue to step 3

### 3) **Present Selection Options**
   - Display interactive menu:
     ```
     Options:
     1. Scan only the default subscription: [Name] (recommended)
     2. Scan all accessible subscriptions ([N] subscriptions)
     3. Enter a specific subscription ID
     ```
   - Prompt user for choice (default: Option 1)

### 4) **Process User Selection**
   - **Option 1 (Default subscription):**
     - Use default subscription from context
     - Display: ✅ "Scanning: [Subscription Name]"

   - **Option 2 (All subscriptions):**
     - Get all accessible subscriptions:
       ```bash
       az account list --output json
       ```
     - Display count
     - Confirm: "This will scan [N] subscriptions. Continue? (Y/N)"
     - If confirmed: Use all subscriptions

   - **Option 3 (Specific ID):**
     - Prompt for subscription ID
     - Validate with `az account show --subscription <id>`
     - If valid: Use that subscription
     - If invalid: Return to step 3

### 5) **Display Subscription List**
   - If ≤5 subscriptions selected:
     - Show full list with names and IDs
   - If >5 subscriptions selected:
     - Show first 5 subscriptions
     - Display: "... and [N] more subscriptions"

### 6) **Save Selection for Subsequent Skills**
   - Store selected subscription(s) in session state:
     - Subscription IDs (array)
     - Subscription names (array)
     - Selection mode (single/multiple)
   - This allows downstream skills to iterate over selections

## Output
- Count of subscriptions selected
- List of subscription names and IDs (displayed and saved)
- Session state updated with selection

## Interactive Behavior
- **Non-interactive mode:** If subscription ID provided directly, skip prompts
- **Interactive mode:** Guide user through selection process with clear options
- **Validation:** Always verify subscription access before proceeding

## Related Skills
- Use **1-azure-auth-check** before this skill
- Use **3-azure-resource-scan** after this skill to scan selected subscriptions

## Example Invocation
```
User: "Let me select which subscriptions to scan"
Agent: [Runs 2-azure-subscription-select skill]
Output:
  Default subscription detected: Production (abc-123...)
  Options:
    1. Scan only default subscription (recommended)
    2. Scan all accessible subscriptions (5 subscriptions)

  User selects: 1

  ✅ Selected: Production (abc-123...)
```

More from microsoft/acs-resource-explorer

SkillDescription
0-acs-full-scanFull ACS deprecation impact assessment orchestrator. Runs the complete workflow — auth check, subscription selection, ACS resource scan, channel detection (fast or full), impact analysis, and report generation. ACS-specific, no PowerShell script required.
1-acs-resource-scanScan Azure subscriptions for Azure Communication Services (ACS) resources (Microsoft.Communication/CommunicationServices). ACS-specific version of azure/3-azure-resource-scan with resource type pre-filled.
1-azure-auth-checkVerify Azure authentication status and display connection information (tenant, account, subscription context). Works with any Azure product or service.
2-acs-channel-detectFast, resource-based detection of ACS channels (Email, Phone Numbers). Detects Email via EmailServices/Domains child resources and Phone Numbers via purchased phone Numbers under each ACS resource. Note: SMS, Chat, Call Automation, Job Router, Advance Messaging, and Rooms require metrics — use 3-acs-metrics-collect for complete detection.
3-acs-metrics-collectComprehensive ACS usage detection via Azure Monitor metrics. All configured ACS channels are pre-mapped (Email, SMS, Chat, Call Automation, Job Router, Advance Messaging, Rooms). Configurable lookback period of 1-93 days.
3-azure-resource-scanScan Azure subscriptions for specific resource types. Interactive prompts allow scanning any Azure product (ACS, Storage, Compute, Databases, etc). Returns resource inventory across selected subscriptions.
4-acs-impact-analyzeMap detected ACS channel usage to the appropriate Retirement Guide or Breaking Change Guide. Links each impacted resource to Microsoft migration resources per channel.
4-azure-channel-detectFast, resource-based feature detection for Azure resources. Detects features/channels by examining related child resources (domains, endpoints, configurations). Works with any Azure product where features are exposed as sub-resources.
5-acs-report-generateGenerate ACS deprecation impact reports in CSV, Markdown, or JSON format. Pre-configured with ACS channel columns, migration guide links, and ACS-specific report sections.
5-azure-metrics-collectComprehensive feature/usage detection via Azure Monitor metrics. Collects usage data over configurable lookback period (1-93 days). Works with any Azure product that emits metrics to Azure Monitor.