AGENT SKILL

2-azure-subscription-select

Interactive subscription selection workflow. Choose specific subscription(s) or scan all accessible subscriptions. Works with any Azure product or service.

License 许可
MIT
最近更新
2026-10-08
Stars
★ 0
Forks
0

01 前言 Front Matter

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.

03 SKILL.md 正文

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:
      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:
    az account show
    
  • If default subscription exists:
    • Display default subscription name and ID
    • Show count of all accessible subscriptions:
      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:
      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...)

04 同仓库更多 Skills

microsoft
microsoft/acs-resource-explorer

7-azure-report-generate

Generate comprehensive reports (CSV, Markdown, JSON) for Azure resource impact assessments. Export detailed findings, statistics, and recommendations. Works with any Azure product deprecation analysis.

行政与办公人员文档处理
★ 0
microsoft
microsoft/acs-resource-explorer

6-azure-impact-analyze

Calculate severity and migration effort for Azure resources with detected features. Configurable severity thresholds based on usage patterns and business impact. Works with any Azure product deprecation scenario.

★ 0
microsoft
microsoft/acs-resource-explorer

5-azure-metrics-collect

Comprehensive 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.

★ 0
microsoft
microsoft/acs-resource-explorer

4-azure-channel-detect

Fast, 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.

★ 0
microsoft
microsoft/acs-resource-explorer

3-azure-resource-scan

Scan Azure subscriptions for specific resource types. Interactive prompts allow scanning any Azure product (ACS, Storage, Compute, Databases, etc). Returns resource inventory across selected subscriptions.

★ 0
microsoft
microsoft/acs-resource-explorer

1-azure-auth-check

Verify Azure authentication status and display connection information (tenant, account, subscription context). Works with any Azure product or service.

★ 0