run-audit

Run mypy and ruff audits on modules and produce P0–P3 markdown reports.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/michaelayoade/dotmac_crm --skill run-audit-michaelayoade
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-audit
Source: https://github.com/michaelayoade/dotmac_crm/tree/main/.claude/skills/run-audit
Command: npx skills add https://github.com/michaelayoade/dotmac_crm --skill run-audit-michaelayoade

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you proactively detect code quality issues and common security vulnerabilities in DotMac Omni CRM modules before they reach production.

Core Features & Use Cases

  • Type safety auditing with mypy: Identifies type errors and provides per-error fixes to improve reliability and maintainability.
  • Lint and quality auditing with ruff: Surfaces rule violations and patterns using ruff check statistics to standardize code health.
  • Security-focused static checks: Flags risks such as path traversal, SQL injection patterns, CSRF gaps, auth bypass, secrets in code, and unsafe file upload handling.
  • Architecture enforcement: Detects service-layer violations (e.g., business logic in routes or DB queries in tasks) to keep concerns separated.
  • Performance and correctness signals: Looks for N+1 query patterns and template accessibility issues, plus test coverage gaps.

Quick Start

Run the audit for module "all" to perform mypy, ruff, security checks, service-layer validation, N+1 detection, template review, and test coverage measurement.

Frequently Asked Questions about run-audit

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

FAQPage Schema
How do I run a static analysis security audit for SQL injection and CSRF vulnerabilities?

A static analysis security audit flags SQL injection patterns, CSRF gaps, and auth bypass risks in your services and web admin code paths. This skill executes these security-focused static checks and outputs a structured P0–P3 markdown report with counts.

What is the best way to combine mypy and ruff for comprehensive code quality auditing?

Comprehensive code quality auditing with mypy and ruff identifies type errors and lint rule violations. This skill executes both tools across your targeted module scope to evaluate reliability, maintainability, and standard code health.

How do I detect service-layer architectural violations and N+1 query patterns in my Python code?

Detecting service-layer architectural violations and N+1 query patterns involves evaluating heuristics for misplaced business logic. This skill flags DB queries in tasks and business logic in routes to keep concerns separated and identify performance signals.

Does this code audit tool work on specific module directories or does it require scanning the entire app surface?

This code audit tool works on specific module directories and the entire app surface. You can perform targeted audits for module names that map to files or directories, or use an "all" mode to audit the broader app surface with type checking and linting.

What happens if the code audit encounters missing file paths during a targeted module scan?

If the code audit encounters missing file paths during a targeted module scan, it will not fail. The skill requires resolving existing paths without failing on missing ones, allowing the audit to complete successfully on available modules.