audit-path-sanitize

Audit folder sanitization and path repair safeguards in the contabilidad workflow.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/ElPoot/contabilidad --skill audit-path-sanitize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-path-sanitize
Source: https://github.com/ElPoot/contabilidad/tree/main/.agents/skills/audit-path-sanitize
Command: npx skills add https://github.com/ElPoot/contabilidad --skill audit-path-sanitize

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It identifies risks and inconsistencies in how the contabilidad system sanitizes folders, repairs orphaned paths, and applies path/rename-related cleanup across the filesystem and classification storage.

Core Features & Use Cases

  • Verifies destination and orphan detection logic in gestor_contable/core/classification_utils.py so broken routes are detected only when the destination no longer exists.
  • Audits Windows-safe folder name sanitization in gestor_contable/core/classifier.py by checking character replacement rules and _sanitize_folder() behavior.
  • Checks destructive folder cleanup safeguards in gestor_contable/core/folder_sanitizer.py by confirming empty-folder checks and structural-folder protections before any rmdir/rmtree-style removal.
  • Use case: Before running folder-curation operations in production, you can request a targeted audit of path healing, empty-folder cleanup, and SQLite-related rename completeness to reduce the chance of deleting valid folders or leaving routes desynchronized.

Quick Start

Ask the AI to run an audit report for this repo that checks _sanitize_folder(), empty-folder deletion guards, and orphan/path-rot detection in the specified Python modules.

Frequently Asked Questions about audit-path-sanitize

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

FAQPage Schema
How do I audit path sanitization logic to prevent unsafe folder deletions?

Auditing path sanitization involves checking character replacement rules and sanitization behavior to ensure Windows-safe folder naming. This validates that sanitization routines correctly replace invalid characters and prevent unsafe folder repairs before executing filesystem operations.

Why does SQLite-stored classification route desynchronization occur during folder renames?

SQLite-stored classification route desynchronization occurs when filesystem paths and client folder naming become inconsistent during repairs. It is detected by verifying destination-existence checks, where broken routes are identified only when the destination folder no longer exists in the filesystem.

How do I validate empty-folder cleanup guards before running rmdir or rmtree?

Validating empty-folder cleanup guards requires confirming structural-folder protections and empty-folder checks are present before destructive rmdir or rmtree removal. The audit reads the current code to verify these safeguards exist and strictly reports findings based on the existing validation logic.

Does this path repair audit work with Windows paths and SQLite classification routes?

The path repair audit works with Windows paths and SQLite classification routes by checking character replacement rules and verifying destination-existence checks. It specifically validates sanitize rules, empty-folder cleanup guards, and orphan detection across the filesystem and classification storage.

What are the limitations of relying on destination-existence checks for orphan detection?

A limitation of destination-existence checks for orphan detection is that broken routes are only detected when the destination no longer exists. The audit strictly reports findings based on reading the current code, meaning undetected inconsistencies may persist if the destination folder remains present but invalid.