Deleted Files Audit

Audit Git deletions and scan for stale references before committing.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/Baneeishaque/ai-agents --skill deleted-files-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Deleted Files Audit
Source: https://github.com/Baneeishaque/ai-agents/tree/main/.agents/skills/deleted_files_audit
Command: npx skills add https://github.com/Baneeishaque/ai-agents --skill deleted-files-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents accidental commits of deleted files that are still referenced in your codebase, avoiding broken builds and runtime errors.

Core Features & Use Cases

  • Detects Pending Deletions: Identifies all files marked for deletion in Git.
  • Categorizes Deletions: Classifies deleted files by type (e.g., generated output, source code, config).
  • Scans for References: Searches code, IDE configs, and build scripts for any lingering references to deleted files.
  • Provides Safety Verdict: Reports whether deleting each file or group is safe or will cause issues.
  • Checks .gitignore: Recommends additions to prevent future accidental commits of generated files.
  • Use Case: After deleting a large set of generated output files, run this skill to ensure no part of your application or build process still expects those files to exist, preventing a broken build.

Quick Start

Run the deleted files audit skill to check all pending deletions in the current Git repository.

Frequently Asked Questions about Deleted Files Audit

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

FAQPage Schema
How do I check for stale references before committing deleted files in git?

To check for stale references before committing deleted files in git, audit pending deletions by scanning source code and IDE configurations for lingering imports or paths. This process categorizes deletions and provides a structured safety verdict to prevent broken builds.

What happens if I commit a git deletion but the file is still referenced in my build scripts?

Committing a git deletion while the file is still referenced in build scripts causes broken builds and runtime errors. A deleted files audit scans build scripts and source code to detect these lingering references and warns you before the commit is finalized.

Can I automatically categorize pending git deletions by file type?

Yes, you can categorize pending git deletions by file type such as generated output, source code, or config. The audit classifies deleted files to help you assess the impact of removing generated outputs versus critical source code before committing.

How do I prevent accidental commits of generated output files in git?

To prevent accidental commits of generated output files in git, check your .gitignore coverage during a deleted files audit. The audit recommends specific .gitignore additions to ensure generated outputs are ignored and excluded from future commits.

Does a deleted files audit work as a pre-commit hook for code maintenance?

Yes, a deleted files audit works as a pre-commit hook for code maintenance by intercepting staged deletions. It scans the codebase for stale references and provides a safety verdict before the commit is applied, ensuring code hygiene.