# Find Sync Bugs That Can Delete Your Data

> Sync job deleting your data? Find sync code that deletes records because a fetch came back empty, failed or incomplete, and check two exports before deletions apply. File and line for every finding. Reads files only.

Find Sync Bugs That Can Delete Your Data is a paid AI agent skill on Agensi by AGI Tools, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $14.99 (one-time purchase)
- Creator: [AGI Tools](https://www.agensi.io/creators/agi-tools)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/find-sync-bugs-that-can-delete-your-data
- Tags: database, code-review, python, typescript, data-integrity, data-sync, javascript, data-loss

## About this skill

A sync that removes "everything that is not in the latest fetch" is only as safe as that fetch. When the fetch fails quietly (an exception turned into an empty list, an error status answered with no rows, the last pages never fetched, one source down), nothing was deleted at the source, but the sync deletes it anyway. This skill runs a real program over your sync code and over two exports, and reports each problem with the file, the line and the reason.

**Code audit** (Python, JavaScript and TypeScript):

- **Deletes driven by absence:** records removed because they are missing from the latest fetch, full-replace writes, and explicit deletion markers.
- **Failures that look like "no data":** exceptions and failed HTTP statuses turned into empty results, empty defaults, requests without a timeout.
- **Guards, per delete:** which of these were found near it and which were not: empty-fetch check, pagination completeness, deletion cap, confirmation over several runs, soft delete.
- **Safety nets:** transactions and dry-run switches.

**Snapshot audit** (JSON, JSON Lines or CSV): compares the previous and the current export before deletions are applied and answers **apply** or **hold**. It holds on an empty or incomplete export, a drop above your limit, a vanished source, a stale export, a cut-off at a page boundary, or a renamed key field. The exit code lets a pipeline act on the answer.

**What you get:** a Markdown report and a JSON file, each finding with file, line, rule and a concrete fix.

**What it is not:** the findings are static analysis of your files or a comparison of two exports. They are not observed runtime behaviour, and a clean report does not prove that a sync cannot lose data. The skill reads files only: it does not connect to your database, your APIs or the network, and it never changes your files.

## Requires

- Python 3.9+

## Known limitations

- Static analysis and file comparison only: nothing is observed at runtime. Every finding cites the line so you can judge it.
- Python is parsed; JavaScript and TypeScript are matched by structure, so unusual formatting can be missed. Symbolic links and files over 2 MB are skipped and listed.
- SQL files, stored procedures and ETL tool configurations are not read. Snapshots up to 200 MB each, held in memory.
- The snapshot verdict compares two exports you provide; it cannot know whether an export itself is correct.
- Verified on Linux with Python 3.9, 3.10, 3.11, 3.12 and 3.13; Windows and macOS not verified yet.
- A clean report is not a guarantee against data loss.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Find Sync Bugs That Can Delete Your Data skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it connect to my database or my APIs?

No. It reads the code folder and the export files you pass, writes two report files, and makes no network connection. Your files are never modified.

### Does a clean report mean my sync cannot lose data?

No. It means none of the listed patterns was found in the files it read. The findings are static analysis or a comparison of two exports, not observed runtime behaviour. Keep your backups and test restores.

### Which languages and formats does it read?

Python (parsed), JavaScript and TypeScript (pattern-based), including common ORM forms such as Django, SQLAlchemy, Sequelize, Prisma and Mongo calls. Exports as JSON, JSON Lines or CSV.

### How do I use the snapshot check in a pipeline?

Export the records before and after the fetch, run the snapshot audit on the two files, and let your job read the exit code: apply or hold. The skill itself does not run or pause your sync.

### What about false alarms?

Deletes built from wrappers or variables can hide a problem or cause a false alarm. Every finding cites the file and line and names the guard it looked for, so you can judge it quickly.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
