audit-cache

Audit cache invalidation and corruption handling for JSON and SQLite artifacts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

audit-cache helps you prevent your accounting system from operating on outdated or inconsistent cached metadata that can silently skew results.

Core Features & Use Cases

  • Cache invalidation strategy review: Checks whether caches for PDFs and XML are invalidated correctly using mtime/size or hashes, rather than relying on fragile assumptions.
  • Cache corruption handling assessment: Verifies how JSON cache read failures (e.g., JSON decoding issues) are handled and whether corrupted cache files are cleaned up.
  • Hacienda cache coherence check: Audits access patterns around hacienda_cache usage to confirm whether it is treated consistently and read-only where intended.

Quick Start

Ask the auditor AI to run an audit of the current cache coherence for pdf_cache, xml_cache, and hacienda_cache.db and report any stale-data or corruption-handling issues it finds in the relevant source files.

Frequently Asked Questions about audit-cache

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

FAQPage Schema
How do I detect stale cache data in JSON and SQLite artifacts?

To detect stale cache data, you audit invalidation signals like mtime, size, and hashes across JSON and SQLite artifacts to verify coherence and prevent silent data corruption. This requires inspecting actual code paths for invalidation logic.

What causes JSON cache corruption and how is it handled during read failures?

JSON cache corruption occurs when decoding exceptions happen during read operations. Proper corruption handling assesses whether the system catches JSON decode exceptions and automatically cleans up corrupted cache files to prevent stale data persistence.

How do I validate SQLite cache coherence for external fiscal status queries?

Validating SQLite cache coherence involves auditing hacienda_cache read and write behavior constraints. You check access patterns to confirm the database is treated consistently and read-only where intended for external fiscal status data.

Does relying on file mtime provide reliable cache invalidation for parsed PDFs?

Relying solely on file mtime for cache invalidation of parsed PDFs can be fragile. A thorough cache invalidation strategy review checks whether mtime, file size, or hashes are used correctly rather than relying on assumptions.

What is the best way to audit cache invalidation logic in source files?

The best way to audit cache invalidation logic is to inspect actual current code paths for invalidation signals and corruption-handling logic. This verifies that pdf_cache and xml_cache are invalidated correctly using mtime, size, or hashes.

Why does my hacienda_cache return inconsistent fiscal status data?

Hacienda_cache returns inconsistent fiscal status data when write and read behavior constraints are not treated consistently. A coherence check audits access patterns to confirm the SQLite database is treated read-only where intended.