ag-pq-auditor

Audit Power Query M code from Excel workbooks or .m files for performance, security, and data quality issues.

1|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/Sampi314/Sam-Plugin-Marketplace --skill ag-pq-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ag-pq-auditor
Source: https://github.com/Sampi314/Sam-Plugin-Marketplace/tree/main/Audit%20General/skills/ag-pq-auditor
Command: npx skills add https://github.com/Sampi314/Sam-Plugin-Marketplace --skill ag-pq-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pywin32, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Un-audited Power Query pipelines in Excel workbooks often hide performance bottlenecks, data quality errors, security vulnerabilities like embedded credentials, and hard-to-debug architecture issues that slow down refresh times and produce unreliable analytics.

Core Features & Use Cases

  • Comprehensive Rule-Based Auditing: Checks for query folding breaks, hardcoded file paths, missing error handling, circular dependencies, auto-generated step names, and 15+ other common Power Query issues.
  • Multiple Input Support: Audits M code directly from Excel workbooks (via Windows COM automation) or loose .m files, with a built-in demo mode for testing.
  • Actionable Findings: Returns severity-rated issues with clear remediation guidance, aligned with standard Power Query best practices.
  • Use Case: A data analyst struggling with a 10-minute Power Query refresh can use this skill to identify the root cause (e.g., mid-query Table.Buffer calls, unfiltered wide sources) and fix it in minutes.

Quick Start

Use the ag-pq-auditor skill to audit the Power Query M code in your Excel workbook or folder of .m files for performance, security, and data quality issues.

Frequently Asked Questions about ag-pq-auditor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Power Query M code for performance bottlenecks and security issues?

You can audit Power Query M code by running deterministic rule-based checks on Excel workbooks or loose .m files to identify query folding breaks, hardcoded file paths, and missing error handling with severity-rated findings.

What causes slow Power Query refresh times in Excel workbooks?

Slow Power Query refresh times are often caused by performance bottlenecks like mid-query Table.Buffer calls, unfiltered wide sources, or broken query folding. Auditing the M code can identify these specific issues and provide recommendations to fix them in minutes.

How do I check my Excel data pipeline for embedded credentials and hardcoded paths?

To check Excel data pipelines for security vulnerabilities, you can scan the extracted M code for embedded credentials and hardcoded file paths. The audit returns severity-rated security compliance findings with clear remediation guidance to secure your analytics workflow.

Can I audit loose .m files instead of extracting Power Query code from Excel workbooks?

Yes, you can audit loose .m files directly instead of extracting Power Query code from Excel workbooks. The skill supports multiple input formats, including Windows COM automation for workbooks, loose .m files, and a built-in demo mode for testing without live data.

Does the Power Query auditor require pywin32 to extract M code from Excel workbooks?

Yes, extracting Power Query M code from Excel workbooks requires the pywin32 dependency for Windows COM automation. However, you can still audit loose .m files or use the built-in demo mode if you do not need to extract queries directly from workbook files.

What are the limitations of using a rule-based audit for Power Query data quality?

A rule-based audit for Power Query data quality is limited to deterministic checks for known patterns like coding standards violations and circular dependencies. It does not use dynamic runtime analysis, so it identifies architecture flaws and security risks statically without executing the actual queries.