7-azure-report-generate

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

Use this skill to export impact assessment results to shareable formats after completing analysis.

SKILL.md

.github/skills/7-azure-report-generateView on GitHub ↗
---
name: 7-azure-report-generate
description: Generate comprehensive reports (CSV, Markdown, JSON) for Azure resource impact assessments. Export detailed findings, statistics, and recommendations. Works with any Azure product deprecation analysis.
---

## When to use this skill
Use this skill to export impact assessment results to shareable formats after completing analysis.

Examples:
  - "Export the results to CSV"
  - "Generate a report of my analysis"
  - "Create a summary document for my team"
  - "Save the impact assessment results"

## Preconditions
- Azure authentication completed (use **1-azure-auth-check** skill)
- Resources scanned (use **3-azure-resource-scan** skill)
- Features detected (use **4-azure-channel-detect** or **5-azure-metrics-collect** skill)
- Impact analyzed (use **6-azure-impact-analyze** skill - optional but recommended)
- Session state contains complete resource inventory with analysis data

## Workflow

### 1) **Load Complete Resource Inventory**
   - Retrieve resource inventory from session state
   - Verify data completeness:
     - ✅ Resource details (name, ID, subscription, location)
     - ✅ Feature detection results
     - ✅ Usage metrics (if collected)
     - ✅ Impact analysis (severity, effort, priority)
   - Display data summary:
     ```
     📊 Report Data Summary:
     Resources: 5
     Subscriptions: 2
     Features Detected: 12
     Impact Analysis: Complete
     ```

### 2) **Configure Report Options**

   **Interactive Mode:**
   - Ask user: "What type of report would you like to generate?"
   - Present options:
     ```
     Report Formats:
     1. CSV (Excel-compatible, detailed data)
     2. Markdown (Human-readable, documentation)
     3. JSON (Machine-readable, API integration)
     4. All formats
     ```
   - Prompt for output directory (default: `./exports/`)
   - Prompt for custom filename prefix (default: timestamp-based)

### 3) **Create Output Directory**
   - Check if output directory exists
   - If not exists:
     - Create directory structure
     - Display: "📁 Created output directory: [Path]"
   - Verify write permissions

### 4) **Generate CSV Report (if selected)**

   **CSV Structure:**
   ```csv
   SubscriptionName,SubscriptionId,ResourceGroup,ResourceName,ResourceType,Location,
   Feature1Detected,Feature1Usage,Feature2Detected,Feature2Usage,...,
   TotalFeaturesImpacted,HighestSeverity,SeverityReason,MigrationEffortEstimate,
   EffortReason,RecommendedPriority,LookbackPeriodDays,AnalysisDate
   ```

   **CSV Generation Steps:**
   - For each resource in inventory:
     - Extract all fields
     - Flatten nested objects (features, usage counts)
     - Format dates (ISO 8601)
     - Escape special characters in text fields
     - Add row to CSV

   - 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 report saved: [Path]"
   - Display row count: "[N] resources exported"

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

   **Markdown Structure:**
   ```markdown
   # Azure Impact Assessment Report

   **Analysis Date:** [Date]
   **Analysis Type:** [Product Name] Deprecation Impact

   ## Executive Summary
   - Total Resources Scanned: N
   - Resources with Impacted Features: M
   - Subscriptions Analyzed: X
   - Lookback Period: Y days

   ## Severity Breakdown
   - 🔴 Critical: N resources
   - 🟡 Warning: M resources
   - ℹ️ Info: X resources

   ## Migration Effort
   - High: N resources (3-4 weeks each)
   - Medium: M resources (1-2 weeks each)
   - Low: X resources (<1 week each)

   ## Detailed Findings

   ### Priority 1: [Resource Name]
   - **Subscription:** [Name]
   - **Resource Group:** [Name]
   - **Severity:** Critical
   - **Features Impacted:** Feature1, Feature2, Feature3
   - **Usage Summary:**
     - Feature1: [Usage] operations
     - Feature2: [Usage] operations
   - **Migration Effort:** High
   - **Recommended Next Steps:**
     1. [Action 1]
     2. [Action 2]

   [Repeat for each resource...]

   ## Migration Timeline Recommendations

   | Priority | Resource | Target Completion | Effort |
   |----------|----------|-------------------|--------|
   | 1 | Resource1 | [Date] | High |
   | 2 | Resource2 | [Date] | Medium |

   ## Migration Guides

   - [Feature1 Migration Guide](link)
   - [Feature2 Migration Guide](link)

   ## Appendix: Methodology

   ### Data Collection
   - Detection Method: [Resource-based / Metrics-based]
   - Metrics Lookback: [N] days
   - Scan Date: [Date]

   ### Severity Calculation
   [Details of severity thresholds used]

   ### Effort Estimation
   [Details of effort calculation methodology]
   ```

   **Markdown Generation Steps:**
   - Build report sections programmatically
   - Include summary statistics
   - Add detailed resource breakdowns (sorted by priority)
   - Include charts/tables using Markdown syntax
   - Add links to migration guides
   - Include methodology appendix

   - Write the assembled Markdown content directly to the output file using the Write tool

   - Display: "✅ Markdown report saved: [Path]"

### 6) **Generate JSON Report (if selected)**

   **JSON Structure:**
   ```json
   {
     "metadata": {
       "analysisDate": "2026-02-06T10:30:00Z",
       "analysisType": "ACS Deprecation Impact",
       "toolVersion": "1.0",
       "lookbackPeriodDays": 90,
       "detectionMethod": "Metrics-based"
     },
     "summary": {
       "totalResources": 5,
       "resourcesWithImpact": 3,
       "subscriptionsScanned": 2,
       "totalFeaturesDetected": 12,
       "severityCounts": {
         "critical": 1,
         "warning": 1,
         "info": 1
       },
       "effortCounts": {
         "high": 1,
         "medium": 1,
         "low": 1
       }
     },
     "resources": [
       {
         "subscriptionId": "...",
         "subscriptionName": "...",
         "resourceGroup": "...",
         "resourceName": "...",
         "resourceType": "...",
         "location": "...",
         "features": [
           {
             "name": "Email",
             "detected": true,
             "usage": 1250,
             "severity": "critical"
           }
         ],
         "impact": {
           "totalFeaturesImpacted": 3,
           "highestSeverity": "Critical",
           "severityReason": "...",
           "migrationEffort": "High",
           "effortReason": "...",
           "recommendedPriority": 1
         },
         "recommendations": [
           "Action 1",
           "Action 2"
         ]
       }
     ]
   }
   ```

   **JSON Generation Steps:**
   - Build structured object with metadata, summary, and resource details
   - Ensure proper data types (numbers, booleans, strings)
   - Format dates as ISO 8601
   - Serialize the structured object to a JSON string and write it directly to the output file
     using the Write tool

   - Display: "✅ JSON report saved: [Path]"

### 7) **Generate Console Summary Report**

   **Always display regardless of file export options:**
   ```
   === Azure Impact Assessment Report ===
   Analysis Date: 2026-02-06

   📊 Scan Summary:
   Total Resources: 5
   Resources with Impacted Features: 3
   Subscriptions Scanned: 2
   Lookback Period: 90 days

   🎯 Severity Breakdown:
   🔴 Critical: 1 resource(s) - IMMEDIATE ACTION REQUIRED
   🟡 Warning:  1 resource(s) - Plan migration within 30 days
   ℹ️ Info:     1 resource(s) - Low priority

   📋 Migration Effort:
   High:   1 resource(s) - Allocate 3-4 weeks per resource
   Medium: 1 resource(s) - Allocate 1-2 weeks per resource
   Low:    1 resource(s) - Allocate <1 week per resource

   📈 Detailed Results:

   [Formatted table with key columns]

   === Recommendations ===

   Immediate Actions (Critical):
   • 1 resource requires immediate attention
   • Start with: ACSProd (Priority 1)

   Upcoming Actions (Warning):
   • 1 resource should be migrated within 30 days

   💡 Next Steps:
   1. Review exported reports in: [Output Directory]
   2. Read migration guides for impacted features
   3. Schedule planning meetings for Critical resources
   4. Track migration progress using exported CSV
   ```

### 8) **Generate Statistics Summary**
   - Calculate and display additional insights:
     ```
     📊 Additional Statistics:

     By Subscription:
       - Production:   3 resources (2 impacted)
       - Development:  2 resources (1 impacted)

     By Feature:
       - Email:        2 resources detected
       - SMS:          1 resource detected
       - Chat:         1 resource detected
       - Calling:      0 resources detected
       - Phone Numbers: 2 resources detected

     Usage Volume (90 days):
       - Total Email Messages:     1,250
       - Total SMS Messages:       0
       - Total Chat Messages:      543
       - Total Calls:              0
       - Total Phone Operations:   15
     ```

### 9) **Provide Report Access Information**
   - Display file locations:
     ```
     📁 Reports Generated:

     ✅ CSV:      [Full Path] ([File Size])
     ✅ Markdown: [Full Path] ([File Size])
     ✅ JSON:     [Full Path] ([File Size])

     💡 Tips:
     - Open CSV in Excel for filtering and sorting
     - Share Markdown with your team for human-readable summary
     - Use JSON for automated processing or integration
     ```

### 10) **Optional: Send Report via Email**
   - Ask user: "Would you like to email this report? (Y/N)"
   - If YES:
     - Prompt for recipient email(s)
     - Prompt for subject line
     - Attach generated files
     - Send using configured email service
     - Display: "📧 Report sent to [Recipients]"

### 11) **Optional: Upload to Azure Storage**
   - Ask user: "Would you like to upload reports to Azure Storage? (Y/N)"
   - If YES:
     - Prompt for storage account and container
     - Upload reports to blob storage
     - Generate SAS URL for sharing
     - Display: "☁️ Reports uploaded: [Blob URL]"

## Output Files

### Default Naming Convention
```
{Timestamp}_{ProductName}_Impact_Assessment.{extension}

Examples:
- 2026-02-06_ACS_Impact_Assessment.csv
- 2026-02-06_Storage_Impact_Assessment.md
- 2026-02-06_SQL_Impact_Assessment.json
```

### File Locations
- Default: `./exports/`
- Custom: User-specified directory
- Cloud: Azure Blob Storage (optional)

## Report Sections (Markdown/PDF)

1. **Executive Summary** - High-level overview
2. **Severity Breakdown** - Distribution of impact levels
3. **Migration Effort** - Estimated work required
4. **Detailed Findings** - Resource-by-resource analysis
5. **Priority Recommendations** - Ordered migration plan
6. **Migration Timeline** - Suggested schedule
7. **Migration Guides** - Links to documentation
8. **Methodology** - How analysis was performed
9. **Appendix** - Raw data tables

## Customization Options
- Custom report templates
- Company branding/logo
- Additional calculated fields
- Custom sorting/grouping
- Filter by severity, subscription, or resource type

## Related Skills
- Use **6-azure-impact-analyze** before this skill (for complete reports)
- This is typically the FINAL skill in the workflow sequence

## Example Invocation
```
User: "Generate a report with all the analysis results"
Agent: [Runs 7-azure-report-generate skill]
Output:
  📊 Report Data Summary:
  Resources: 2
  Features Detected: 3
  Impact Analysis: Complete

  What format would you like?
  1. CSV
  2. Markdown
  3. JSON
  4. All formats

  User selects: 4

  📁 Created output directory: ./exports/
  ✅ CSV report saved: ./exports/2026-02-06_ACS_Impact_Assessment.csv (2 resources)
  ✅ Markdown report saved: ./exports/2026-02-06_ACS_Impact_Assessment.md
  ✅ JSON report saved: ./exports/2026-02-06_ACS_Impact_Assessment.json

  [Displays console summary...]
```

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