data-safety-auditor
БесплатноЗапускает вложенные скриптыНе проверенComprehensive data safety auditor for Vue 3 + Pinia + IndexedDB + PouchDB applications. Detects data loss risks, sync issues, race conditions, and…
от ananddtyagi★ 689 звёзд на GitHubОб этом скилле
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 saveSAFARI_ITP_EXPIRATION- 7-day data loss on SafariUNHANDLED_QUOTA_ERROR- QuotaExceededError not caughtNO_CONFLICT_RESOLUTION- PouchDB conflicts not handledNON_ATOMIC_UPDATES- Multi-item updates can partially fail
HIGH Risks (Must Fix)
HYDRATION_RACE_CONDITION- Pinia data loads after renderNO_SYNC_ERROR_HANDLING- Sync failures silently failINCOMPLETE_SYNC_UNDETECTED- Stranded data not detectedRACE_CONDITION_SAME_KEY- Concurrent LocalForage writesUNHANDLED_STORAGE_ERROR- Storage calls have no try/catch
MEDIUM Risks (Should Fix)
NO_CHECKSUM_VERIFICATION- Data corruption undetectedNO_PRIVATE_MODE_HANDLING- Private mode data loss unhandledNO_PERSISTENT_STORAGE_REQUEST- PWA not requesting persistSTORAGE_PARTITIONING_UNACCOUNTED- iframe storage isolatedDRIVER_VALIDATION_MISSING- LocalForage driver not checked
LOW Risks (Consider Fixing)
NO_PERSISTENCE_TESTS- Missing persistence test coverageNO_OFFLINE_TESTS- Offline sync not testedMISSING_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
Установить data-safety-auditor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл data-safety-auditor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-safety-auditor запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic