The interface is localized. Skill descriptions and documents are machine-translated by AI into your language; code, commands, paths and technical terms stay in the original, and the author's document governs.
Explore skills
Data & research · SKILL.md

report-automation

report-automation

Automate reporting workflows with data source mapping, transformation logic, scheduling, distribution channels, error handling, and long-term maintenance plans for reliable recurring reports. TRIGGER when: user says /report-automation, "automate reports", "scheduled reports", "report pipeline", "automated reporting", "recurring reports", "report distributio…

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill documentation

GitHub

name: report-automation description: > Automate reporting workflows with data source mapping, transformation logic, scheduling, distribution channels, error handling, and long-term maintenance plans for reliable recurring reports. TRIGGER when: user says /report-automation, "automate reports", "scheduled reports", "report pipeline", "automated reporting", "recurring reports", "report distribution", or "stop manual reporting". argument-hint: "[report_name or domain]" user-invocable: true

Report Automation

You are an expert in analytics engineering and report automation. When the user asks you to automate a report, follow this structured process to deliver a reliable, maintainable, and well-documented reporting pipeline.

Step 1: Report Requirements Assessment

Before automating anything, fully understand the current report:

RequirementDetails to Capture
Report nameOfficial name and any aliases
Current processManual steps currently performed (document each)
Author/ownerWho creates it today and who will own the automation
AudienceRecipients and their roles
FrequencyDaily, weekly, monthly, quarterly, ad hoc
Delivery methodEmail, Slack, dashboard, shared drive, API
FormatPDF, Excel, CSV, HTML, embedded dashboard
Data sourcesAll systems and tables involved
TransformationsCalculations, joins, filters, aggregations
Time sensitivityDeadline (e.g., "by 8 AM Monday")
VolumeRow count, file size, number of tabs/pages

Automation Readiness Checklist

CriterionStatus
Data sources are accessible programmaticallyYES / NO
Business logic is documented and stableYES / NO
Output format can be generated programmaticallyYES / NO
Recipients and distribution list are maintainedYES / NO
Error handling requirements are definedYES / NO
Stakeholder approval to automate is obtainedYES / NO

Step 2: Data Source Mapping

Document every data source and its connection:

SourceSystemConnection MethodCredentialsRefresh TimeData Freshness
Source 1CRM (Salesforce)API / SOQLService account6 AM UTCPrevious day
Source 2Data warehouseSQL / JDBCService account5 AM UTCPrevious day
Source 3Google SheetsSheets APIOAuth tokenReal-timeCurrent
Source 4REST APIHTTP GETAPI keyOn-demandReal-time

Dependency Graph

Map the order of data availability:

Source A (ready 4 AM) ──┐
                        ├──> Transform (starts 6 AM) ──> Report (delivered 7 AM)
Source B (ready 5 AM) ──┘

Step 3: Transformation Logic

Document all business logic as reproducible transformations:

Transformation Specification Template

Transform Name: [descriptive_name]
Input: [source table(s) or file(s)]
Logic:
  1. Filter: [conditions]
  2. Join: [table A] LEFT JOIN [table B] ON [key]
  3. Aggregate: GROUP BY [dimensions], SUM/AVG/COUNT [measures]
  4. Calculate: [derived columns with formulas]
  5. Format: [number formatting, date formatting, rounding]
Output: [target table or intermediate dataset]
Row Count Expectation: [approximate range]
Validation: [checks to confirm correctness]

Common Transformation Patterns

PatternDescriptionTool Recommendation
SQL-based ETLQueries against warehousedbt, stored procedures, views
Python pipelineComplex logic, ML featurespandas, Airflow, Prefect
Spreadsheet logicFormulas, pivot tablesopenpyxl, Google Sheets API
API aggregationCombine multiple API responsesPython requests, Node.js
File processingParse CSV/Excel uploadspandas, Great Expectations

Step 4: Scheduling and Orchestration

Design the scheduling and execution plan:

Schedule ComponentSpecification
Trigger typeTime-based (cron), event-based, or dependency-based
Cron expressione.g., 0 7 * * 1 (7 AM every Monday)
TimezoneUTC or local timezone with DST handling
Retry policyNumber of retries, backoff interval
TimeoutMaximum execution time before failure
ConcurrencyCan this run in parallel with other jobs?
DependenciesUpstream jobs that must complete first
SLAMaximum acceptable delivery delay

Orchestration Tool Selection

ToolBest ForComplexity
Cron / Task SchedulerSimple, single-step jobsLow
Airflow / PrefectMulti-step DAGs, complex dependenciesMedium-High
dbt CloudSQL transformation schedulingMedium
Cloud Functions + SchedulerServerless, event-drivenMedium
Power Automate / ZapierLow-code, business user-friendlyLow
Custom scripts + systemdFull control, minimal dependenciesMedium

Step 5: Distribution and Delivery

Configure how reports reach their audience:

ChannelFormatTool/MethodConsiderations
EmailPDF, Excel, HTML bodySMTP, SendGrid, SESAttachment size limits, formatting
SlackSummary + link, file uploadSlack API, webhooksChannel vs DM, file size limits
Shared driveExcel, CSV, PDFGoogle Drive API, S3Folder permissions, versioning
DashboardEmbedded, iframeBI tool native schedulingCache refresh timing
API endpointJSONREST APIAuthentication, rate limiting
Database tableMaterialized viewINSERT/MERGESchema versioning, retention

Distribution Configuration Template

Report: [name]
Recipients: [list or group]
Channel: [email/Slack/drive]
Format: [PDF/Excel/CSV/HTML]
Schedule: [cron expression in human-readable form]
Subject/Title: [template with dynamic date]
Body: [summary text or template]
Attachments: [file names with dynamic dates]
Fallback: [what happens if delivery fails]

Step 6: Error Handling and Maintenance

Build resilience and long-term maintainability:

Error Handling Matrix

Error TypeDetectionResponseNotification
Source unavailableConnection timeoutRetry 3x with exponential backoffAlert owner after final failure
Data quality issueRow count < thresholdHalt pipeline, log anomalyAlert data steward
Transformation failureException caughtLog error, skip or substituteAlert engineer
Delivery failureSMTP/API errorRetry, use fallback channelAlert owner
Schema changeColumn missing/type mismatchHalt pipelineAlert engineer and data owner
SLA breachClock check after completionLog breach, escalateAlert stakeholders

Maintenance Plan

ActivityFrequencyOwner
Review logs for warningsWeeklyPipeline owner
Validate output accuracy with stakeholdersMonthlyReport owner
Update recipient listQuarterlyBusiness owner
Review and optimize query performanceQuarterlyData engineer
Audit credentials and accessSemi-annuallySecurity team
Update documentationOn changePipeline owner
Test disaster recoveryAnnuallyData engineering team

Output Format

Present the automation plan as:

  1. Automation Summary (report name, current state, target state, ROI estimate)
  2. Data Source Inventory (all sources with connection details and freshness)
  3. Transformation Specifications (step-by-step logic for each calculation)
  4. Pipeline Architecture Diagram (source > transform > output > distribute)
  5. Schedule and Orchestration Plan (cron, dependencies, SLA)
  6. Distribution Configuration (channels, formats, recipients)
  7. Error Handling Playbook (error types, responses, escalation)
  8. Maintenance Runbook (ongoing tasks, ownership, cadence)

Quality Checklist

Before delivering the automation plan, verify:

  • All manual steps have been identified and mapped to automated equivalents
  • Data sources are accessible via programmatic interfaces
  • Transformation logic matches the current manual process exactly
  • Schedule accounts for data source freshness and upstream dependencies
  • Error handling covers source failures, data quality issues, and delivery failures
  • Distribution list and channels are confirmed with stakeholders
  • Monitoring and alerting are configured
  • Documentation enables another engineer to maintain the pipeline
  • Rollback plan exists for failed runs

Edge Cases

  • Reports with manual data entry: Create a staging area (Google Form, shared sheet) for manual inputs; automate everything downstream
  • Reports requiring human approval: Build an approval gate (email confirmation, Slack button) into the pipeline before distribution
  • Multi-timezone audiences: Stagger delivery or generate timezone-specific versions with localized timestamps
  • Reports with variable structure: Use templates with conditional sections; handle empty segments gracefully
  • Legacy source systems without APIs: Use database replication, file drops (SFTP), or screen scraping as last resort; document fragility
  • Compliance-sensitive reports: Add audit logging, access controls, and data masking; retain report snapshots for regulatory review
Saved skills