5-acs-report-generate

$npx mdskill add microsoft/acs-resource-explorer/5-acs-report-generate

Use this skill to export the complete ACS impact assessment to shareable formats.

SKILL.md

.github/skills/5-acs-report-generateView on GitHub ↗
---
name: 5-acs-report-generate
description: Generate ACS deprecation impact reports in CSV, Markdown, or JSON format. Pre-configured with ACS channel columns, migration guide links, and ACS-specific report sections.
---

## When to use this skill
Use this skill to export the complete ACS impact assessment to shareable formats.

Examples:
  - "Export the ACS assessment to CSV"
  - "Generate an ACS deprecation report"
  - "Create a summary of ACS migration impact for my team"
  - "Save the ACS scan results"

## Preconditions
- ACS impact analysis complete (use **4-acs-impact-analyze** — recommended)
- OR at minimum: ACS resources scanned + channel detection complete
- Session state contains ACS resource inventory with analysis data

## Default File Naming
```
ACS_ResourceExplorer_{Fast|Full}_v{ToolVersion}_{UtcTimestamp}.{extension}

Examples:
  ACS_ResourceExplorer_Fast_v{ToolVersion}_20260923065155.csv
  ACS_ResourceExplorer_Full_v{ToolVersion}_20260923065155.md
  ACS_ResourceExplorer_Full_v{ToolVersion}_20260923065155.json
```

Filename components:
- `Fast` — resource-based channel detection was used
- `Full` — Azure Monitor metrics-based detection was used
- `v` — literal version prefix
- `ToolVersion` — semantic version read from the repository-root `VERSION` file
- `UtcTimestamp` — report generation start time in UTC using `yyyyMMddHHmmss`

Capture the UTC timestamp once at the start of report generation and reuse the same
base filename for every selected output format.

Default output location: `./exports/`

## ACS CSV Columns
Pre-configured CSV structure:
```
SubscriptionName, SubscriptionId,
ResourceGroup, ResourceName, Location,
LookbackPeriodDays,
EmailDetected, EmailUsageCount,
SMSDetected, SMSUsageCount,
ChatDetected, ChatUsageCount,
CallAutomationDetected, CallAutomationUsageCount,
JobRouterDetected, JobRouterUsageCount,
AdvanceMessagingDetected, AdvanceMessagingUsageCount,
RoomsDetected, RoomsUsageCount,
PhoneNumbersDetected, PhoneNumbersUsageCount,
TotalChannelsImpacted
```

## Workflow

### 0) **Load Knowledge References**
   Read the repository-root `VERSION` file before generating the report:
   - Trim surrounding whitespace and use the resulting value as `ToolVersion`
   - Require a semantic version in `MAJOR.MINOR.PATCH` format, optionally with a
     prerelease or build suffix
   - Stop and report an explicit error if the file is missing, unreadable, empty,
     or contains an invalid version

   Read the following knowledge files before generating the report:
   - Read `docs/knowledge/acs-retirement-dates.md` — channel status types and effective dates for report headers
   - Read `docs/knowledge/acs-migration-paths.md` — migration paths and guide links for per-resource recommendations

### 1) **Load ACS Resource Inventory**
   - Retrieve complete inventory from session state
   - Display data availability check:
     ```
     📊 Report Data Summary:
     ACS Resources: [N]
     Subscriptions Scanned: [N]
     Detection Method: [Resource-based / Metrics-based]
     Impact Analysis: [Complete / Not run]
     Lookback Period: [N] days (if metrics used)
     ```
   - If impact analysis not run: Warn user, continue with available data

### 2) **Configure Report Options**
   - Ask user: "What report format(s) would you like?"
     ```
     1. CSV (Excel-compatible)
     2. Markdown (Human-readable, suitable for sharing)
     3. JSON (Machine-readable, for integration)
     4. All formats
     ```
   - Prompt for output directory (default: `./exports/`)
   - Determine the scan type from the completed detection method:
     - Resource-based detection: `Fast`
     - Azure Monitor metrics-based detection: `Full`
   - Generate the filename using:
     `ACS_ResourceExplorer_{Fast|Full}_v{ToolVersion}_{UtcTimestamp}.{extension}`
   - Capture `UtcTimestamp` once in UTC using `yyyyMMddHHmmss` and reuse it for
     CSV, Markdown, and JSON outputs generated in the same run

### 3) **Create Output Directory**
   - Check if `./exports/` exists; create if needed
   - Verify write permissions

### 4) **Generate CSV Report (if selected)**
   - Include ALL scanned resources (even those with zero usage — for complete inventory)
  - Use the pre-configured channel column structure
   - Build CSV content by constructing a header row followed by one data row per resource,
     with all values comma-separated and quoted where necessary
   - Write the CSV content directly to the output file using the Write tool
   - Display: "✅ CSV saved: [Path] ([N] resources)"

### 5) **Generate Markdown Report (if selected)**

   **ACS-Specific Markdown Structure:**
   ```markdown
   # ACS Deprecation Impact Assessment Report

   **Analysis Date:** [Date]
   **Detection Method:** [Resource-based / Azure Monitor Metrics]
   **Lookback Period:** [N] days (if metrics used)

   ## Executive Summary
   - Total ACS Resources Scanned: [N]
   - Resources Using Retiring Services: [M]
   - Subscriptions Analyzed: [X]

   ## ACS Channel Detection Results

   | Channel | Resources Impacted | Usage (last [N] days) | Status Type |
   |---------|--------------------|-----------------------|-------------|
   | Email   | [N] | [Usage count] messages | 🔴 Retirement |
   | SMS     | [N] | [Usage count] messages | 🔴 Retirement |
   | Chat    | [N] | [Usage count] messages | 🔴 Retirement |
  | Call Automation | [N] | [Usage count] operations | 🟡 Breaking Change |
  | Job Router | [N] | [Usage count] operations | 🟡 Breaking Change |
  | Advance Messaging | [N] | [Usage count] operations | 🟡 Breaking Change |
    | Rooms | [N] | [Usage count] operations | 🟡 Breaking Change |
   | Phone Numbers | [N] | [Usage count] operations | 🔴 Retirement |

   ## Resource Impact Summary

   ### [Resource Name]
   - **Subscription:** [Name]
   - **Resource Group:** [Name]
   - **Channels Detected:** Email, Chat, Phone Numbers
   - **Usage:** Email: 1,250 | Chat: 543 | Phone Numbers: 15
   - **Guides:**
     - 📧 [Email Retirement Guide](https://aka.ms/acs-retirement#acs-email)
     - 💬 [Chat Retirement Guide](https://aka.ms/acs-retirement#acs-chat)
    - 📞 [Calling Breaking Change Guide](https://aka.ms/acs-retirement#acs-voicevideo-calling-sdk) *(if Call Automation detected)*

   [Repeat for each resource...]

   ## ACS Channel Guides
   - 📧 Email — Retirement Guide: https://aka.ms/acs-retirement#acs-email
   - 📱 SMS — Retirement Guide: https://aka.ms/acs-retirement#acs-sms
   - 💬 Chat — Retirement Guide: https://aka.ms/acs-retirement#acs-chat
  - 📞 Call Automation — Breaking Change Guide: https://aka.ms/acs-retirement#acs-voicevideo-calling-sdk
  - 🧭 Job Router — Guide: https://aka.ms/acs-retirement
  - 📨 Advance Messaging — Guide: https://aka.ms/acs-retirement
    - 🏠 Rooms — Guide: https://aka.ms/acs-retirement
   - ☎️ Phone Numbers — Retirement Guide: https://aka.ms/acs-retirement#acs-number-management-direct-offer

   ## Next Steps
   1. Review migration guides for each detected channel
   2. Engage ACS support for complex multi-channel migrations
   3. Track progress using the exported CSV

   ## Confidence & Limitations
   - **High confidence:** Channels detected via Azure Monitor metrics
   - **Limited confidence:** Channels detected via resource existence only (actual usage unknown)
   - **Not assessed:** Channels with zero metrics may still be in use if outside lookback period
   ```

### 6) **Generate JSON Report (if selected)**
   - ACS-specific JSON structure:
     ```json
     {
       "metadata": {
         "analysisDate": "2026-02-25",
         "analysisType": "ACS Deprecation Impact Assessment",
         "detectionMethod": "Azure Monitor Metrics",
         "lookbackPeriodDays": 90,
         "toolVersion": "{ToolVersion}"
       },
       "summary": {
         "totalACSResources": 2,
         "resourcesWithImpact": 1,
         "subscriptionsScanned": 1,
         "channelBreakdown": {
           "email": { "resourcesDetected": 1, "totalUsage": 1250 },
           "sms": { "resourcesDetected": 0, "totalUsage": 0 },
           "chat": { "resourcesDetected": 1, "totalUsage": 543 },
          "callAutomation": { "resourcesDetected": 0, "totalUsage": 0 },
          "jobRouter": { "resourcesDetected": 0, "totalUsage": 0 },
          "advanceMessaging": { "resourcesDetected": 0, "totalUsage": 0 },
          "rooms": { "resourcesDetected": 0, "totalUsage": 0 },
           "phoneNumbers": { "resourcesDetected": 1, "totalUsage": 15 }
         }
       },
       "resources": [...]
     }
     ```

### 7) **Display Console Summary**
   Always display regardless of file export:
   ```
   === ACS Impact Assessment Report ===
   Analysis Date: [Date]

   📊 Scan Summary:
   Total ACS Resources: [N]
   Resources with Retiring Services in Use: [M]
   Subscriptions Scanned: [N]

   📡 Channel Detection Results:
     📧 Email:         [N] resource(s) — [Total Usage] messages (Retirement)
     📱 SMS:           [N] resource(s) — [Total Usage] messages (Retirement)
     💬 Chat:          [N] resource(s) — [Total Usage] messages (Retirement)
     📞 Call Automation: [N] resource(s) — [Total Usage] operations (Breaking Change)
     🧭 Job Router:    [N] resource(s) — [Total Usage] operations (Breaking Change)
     📨 Advance Msg:   [N] resource(s) — [Total Usage] operations (Breaking Change)
     🏠 Rooms:         [N] resource(s) — [Total Usage] operations (Breaking Change)
     ☎️ Phone Numbers: [N] resource(s) — [Total Usage] operations (Retirement)

   💡 Next Steps:
   1. Review exported reports in: ./exports/
   2. Read the guide for each detected channel
   3. Visit https://aka.ms/acs-retirement for complete migration guidance
   ```

### 8) **Display Report Access Information**
   ```
   📁 Reports Generated:
   ✅ CSV:      ./exports/ACS_ResourceExplorer_Full_v{ToolVersion}_20260923065155.csv
   ✅ Markdown: ./exports/ACS_ResourceExplorer_Full_v{ToolVersion}_20260923065155.md
   ✅ JSON:     ./exports/ACS_ResourceExplorer_Full_v{ToolVersion}_20260923065155.json
   ```

## Output
- CSV file with complete ACS channel data (configured columns)
- Markdown report with ACS migration guide links
- JSON file for automated processing
- Console summary with channel-level statistics

## Knowledge References

> Authoritative reference data for this skill — update these files when retirement dates or migration paths change:
> - **Retirement dates:** [docs/knowledge/acs-retirement-dates.md](../../../../docs/knowledge/acs-retirement-dates.md)
> - **Migration paths & guide links:** [docs/knowledge/acs-migration-paths.md](../../../../docs/knowledge/acs-migration-paths.md)

## ACS Migration Resources
- 📧 Email: https://aka.ms/acs-retirement#acs-email
- 📱 SMS: https://aka.ms/acs-retirement#acs-sms
- 💬 Chat: https://aka.ms/acs-retirement#acs-chat
- 📞 Call Automation: https://aka.ms/acs-retirement#acs-voicevideo-calling-sdk
- 🧭 Job Router: https://aka.ms/acs-retirement
- 📨 Advance Messaging: https://aka.ms/acs-retirement
- 🏠 Rooms: https://aka.ms/acs-retirement
- ☎️ Phone Numbers: https://aka.ms/acs-retirement#acs-number-management-direct-offer
- Retirement & Breaking Changes: https://aka.ms/acs-retirement
- Full migration paths reference: [docs/knowledge/acs-migration-paths.md](../../../../docs/knowledge/acs-migration-paths.md)

## Related Skills
- Use **4-acs-impact-analyze** before this skill for complete reports
- This is the final skill in the ACS workflow

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.
2-azure-subscription-selectInteractive subscription selection workflow. Choose specific subscription(s) or scan all accessible subscriptions. Works with any Azure product or service.
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-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.