Skip to content
data-safety-auditor logo

Data Safety Auditor

data-safety-auditor

Comprehensive data safety auditor for Vue 3 + Pinia + IndexedDB + PouchDB applications. Detects data loss risks, sync issues, race conditions, and browser-specific vulnerabilities with actionable remediation guidance.

SKILL.md

Full skill instructions

Data Safety Auditor

Purpose: Comprehensive audit tool that identifies data loss risks in Vue 3 + Pinia + IndexedDB + PouchDB applications with actionable remediation guidance.

Philosophy

This skill provides rigorous data safety analysis with:

  • Zero tolerance for data loss - Identifies every potential failure point
  • Complete coverage - Storage, sync, hydration, integrity, testing
  • Evidence-based findings - Code locations, patterns, severity
  • Actionable fixes - Specific remediation with code examples
  • Test generation - Creates missing safety tests

What It Detects

CRITICAL Risks (Deployment Blockers)

  • QUOTA_EXCEEDED - Storage full, data can't save
  • SAFARI_ITP_EXPIRATION - 7-day data loss on Safari
  • UNHANDLED_QUOTA_ERROR - QuotaExceededError not caught
  • NO_CONFLICT_RESOLUTION - PouchDB conflicts not handled
  • NON_ATOMIC_UPDATES - Multi-item updates can partially fail

HIGH Risks (Must Fix)

  • HYDRATION_RACE_CONDITION - Pinia data loads after render
  • NO_SYNC_ERROR_HANDLING - Sync failures silently fail
  • INCOMPLETE_SYNC_UNDETECTED - Stranded data not detected
  • RACE_CONDITION_SAME_KEY - Concurrent LocalForage writes
  • UNHANDLED_STORAGE_ERROR - Storage calls have no try/​catch

MEDIUM Risks (Should Fix)

  • NO_CHECKSUM_VERIFICATION - Data corruption undetected
  • NO_PRIVATE_MODE_HANDLING - Private mode data loss unhandled
  • NO_PERSISTENT_STORAGE_REQUEST - PWA not requesting persist
  • STORAGE_PARTITIONING_UNACCOUNTED - iframe storage isolated
  • DRIVER_VALIDATION_MISSING - LocalForage driver not checked

LOW Risks (Consider Fixing)

  • NO_PERSISTENCE_TESTS - Missing persistence test coverage
  • NO_OFFLINE_TESTS - Offline sync not tested
  • MISSING_SAFARI_TESTS - Safari-specific tests missing

Detection Categories

A. Browser-Specific Data Loss Vectors

  • Storage quota limits and eviction policies per browser
  • Safari ITP 7-day storage limitations
  • Private/​incognito mode behavior
  • Storage partitioning impacts

B. Storage-Specific Patterns

  • LocalForage race conditions
  • Concurrent write conflicts
  • Driver fallback behavior
  • Configuration issues

C. Sync Patterns

  • PouchDB/​CouchDB conflict detection
  • Network failure handling
  • Incomplete sync detection
  • Sync integrity verification

D. Vue/​Pinia Risks

  • Hydration race conditions
  • beforeRestore/​afterRestore hooks
  • Object reference breakage
  • Multiple persistence sources

E. Data Integrity Checks

  • Schema validation on load
  • Checksum verification
  • Corruption detection
  • Backup/​recovery validation

F. Testing & Compliance

  • Persistence test coverage
  • Quota failure tests
  • OWASP compliance
  • GDPR data integrity

Usage

const auditor = new DataSafetyAuditor();

// Full project audit
const report = await auditor.auditVueApp('./​src');
console.log(report.toConsole());

// Targeted audits
const quotaFindings = await auditor.checkQuotaRisks(codeAST);
const itpFindings = await auditor.checkSafariCompat(codeAST);
const piniaFindings = await auditor.checkPiniaPersistence(piniaStore);
const syncFindings = await auditor.checkSyncIntegrity(pouchdbCode);

// Generate missing tests
const tests = await auditor.generateTestSuite();

// Get detailed remediation
const fixes = await auditor.suggestRemediations(findings);

Report Formats

  • Console - Colored, readable CLI output with severity indicators
  • JSON - Machine-readable for CI/​CD integration
  • Markdown - Documentation and reports
  • HTML - Interactive dashboard view

Deployment Gate

The auditor enforces deployment gates:

  • CRITICAL findings = Deployment blocked
  • HIGH findings = Warning, recommend fixing
  • MEDIUM/​LOW = Information only

When to Use

Use this skill when:

  • Before deploying to production
  • After adding new persistence features
  • When debugging data loss issues
  • During code review of storage code
  • Setting up CI/​CD quality gates
  • Auditing third-party storage libraries

Integration

CI/​CD Pipeline

const report = await auditor.auditVueApp('./​src');
if (report.hasBlockers()) {
  console.error('DEPLOYMENT BLOCKED: Critical data safety issues found');
  process.exit(1);
}

Custom Rules

auditor.rules.addRule('MUST_USE_ENCRYPTION', (code) => {
  if (code.includes('sensitive_data') && !code.includes('crypto.subtle')) {
    return { severity: 'CRITICAL', msg: 'Sensitive data must be encrypted' };
  }
});

MANDATORY USER VERIFICATION REQUIREMENT

Policy: No Safety Claims Without User Confirmation

CRITICAL: Before claiming ANY data safety issue is "fixed", "resolved", or "safe", the following verification protocol is MANDATORY:

Step 1: Technical Verification
  • Run full audit with all detectors
  • Verify no CRITICAL or HIGH findings
  • Take screenshots/​evidence of clean audit
Step 2: User Verification Request

REQUIRED: Use the AskUserQuestion tool to explicitly ask the user to verify:

"I've completed the data safety audit. Before confirming your app is safe, please verify:
1. [Specific storage operations to test]
2. [Sync scenarios to test]
3. [Browser-specific tests to run]

Please confirm the data persists correctly, or let me know what's failing."
Step 3: Wait for User Confirmation
  • DO NOT claim app is "data safe" until user confirms
  • DO NOT approve deployment without user verification
  • DO NOT skip any CRITICAL finding verification

Remember: The user is the final authority on data safety. No exceptions.

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View