code-sweep

Audit Go codebases for architectural drift, pattern violations, and test gaps.

Updated Feb 14, 2026
One-click install
npx skills add https://github.com/rnwolfe/mine --skill code-sweep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-sweep
Source: https://github.com/rnwolfe/mine/tree/main/.claude/skills/code-sweep
Command: npx skills add https://github.com/rnwolfe/mine --skill code-sweep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the silent degradation of code quality that occurs over time due to continuous development, ensuring the codebase remains healthy and maintainable.

Core Features & Use Cases

  • Architectural Drift Detection: Identifies deviations from established patterns and standards.
  • Complexity Analysis: Flags overly large files or functions and deeply nested code.
  • Dead Code Identification: Pinpoints unused exports, stale helpers, and TODOs.
  • Test Gap Analysis: Highlights areas lacking sufficient test coverage.
  • Use Case: Run a comprehensive audit on your project to identify and fix architectural inconsistencies, reduce technical debt, and improve overall code maintainability before it becomes a significant issue.

Quick Start

Run a full audit of the codebase for architectural drift, pattern violations, complexity, dead code, and test gaps.

Frequently Asked Questions about code-sweep

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

FAQPage Schema
What is architectural drift in a Go codebase and how do I detect it?

Architectural drift occurs when a Go codebase deviates from established patterns, such as using raw fmt or direct SQL outside the store layer. An audit detects this by checking for cross-package imports and hardcoded XDG paths to flag violations.

How do I audit my Go project for technical debt and dead code?

To audit a Go project for technical debt and dead code, run a comprehensive analysis that pinpoints unused exports, stale helpers, and stale TODOs. The audit assesses file size, function size, and nesting depth to identify complexity creep.

Can I use this audit to find test coverage gaps and missing error wrapping in my code?

Yes, you can use this audit to find test coverage gaps and missing error wrapping in your code. The analysis highlights areas lacking sufficient test coverage and checks for missing error wrapping against defined project conventions.

What is the best way to check for complexity creep and overly large functions?

The best way to check for complexity creep and overly large functions is to run an audit that assesses file and function size alongside nesting depth. This identifies deviations from standards and flags code that needs refactoring for maintainability.

Does this code quality audit work for identifying os.Exit usage in non-main contexts?

Yes, this code quality audit works for identifying os.Exit usage in non-main contexts. It analyzes Go projects to detect pattern violations like direct SQL outside store, raw fmt usage, and cross-package imports to ensure codebase health.

When should I run a codebase health audit to reduce maintainability issues?

You should run a codebase health audit to reduce maintainability issues when continuous development causes silent quality degradation. It identifies architectural inconsistencies, dead code, and test gaps before they become significant problems.