{"id":113256,"plugin_id":"plugin_asdk_app_6afac4102aa08191ad672ce9a52d2e4d","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-24T12:13:46.297Z","digest":"4e534f9ff04923233e188ac4bc5cdbc2e9e136e4a49d21ede47cff4ee61ba3f3","against":null,"payload":{"description":"Health check of a SubscriptionFlow account's billing data — records stuck in the wrong state, missing details, and reports that cannot be trusted — with counts, examples and how to fix each. Use when the user asks to \"check my data\", \"is anything broken in billing\", \"data health\", \"audit my account\", \"clean up\", or wants to know why numbers look wrong. Requires the SubscriptionFlow connector (staff_* tools). Read-only.","included_files":[{"relative_path":"assets/data-hygiene.html","size_in_bytes":9269},{"relative_path":"references/checks.md","size_in_bytes":2723}],"name":"data-hygiene","skill_md_contents":"---\nname: data-hygiene\ndescription: Health check of a SubscriptionFlow account's billing data — records stuck in the wrong state, missing details, and reports that cannot be trusted — with counts, examples and how to fix each. Use when the user asks to \"check my data\", \"is anything broken in billing\", \"data health\", \"audit my account\", \"clean up\", or wants to know why numbers look wrong. Requires the SubscriptionFlow connector (staff_* tools). Read-only.\n---\n\n# Data hygiene check\n\nRun every check in `references/checks.md` against live data, then show one interactive report: each problem with how many records it affects, a few examples, why it matters and how to fix it.\n\nThis skill only reads. Fixes are suggestions the user can ask for afterwards; anything that changes data then goes through the normal tools and their preview and confirmation.\n\n## 1. Run the checks\n\n- Use today's date (YYYY-MM-DD) wherever a check says `TODAY`.\n- Run the checks in parallel. Each is one `staff_list_records` call (or the report named) with `limit: 5`: the response's `total` is the count, and its `records` are the examples. Do not page through everything.\n- If a call fails, mark that check `unavailable` with the reason; never report it as clear.\n- A check with `total: 0` is `clear`.\n- Never show a field key to the user; use plain words.\n\n## 2. Make examples readable\n\nExamples carry customer ids. Look up names once for all of them: `staff_list_records` on `customers`, `id` `$in` [the ids], select `id`, `name`, `company`. Show \"Company (Name)\" where a company exists.\n\n## 3. Build the report\n\n1. Read `assets/data-hygiene.html`.\n2. Build one JSON object matching the contract below, checks ordered high → medium → low, then clear, then unavailable.\n3. Replace the line `const DATA = window.__SF_DATA__ || SAMPLE;` with `const DATA = <your JSON>;` and change nothing else.\n4. Show it as an interactive HTML view where the client supports it (for example an artifact or canvas), titled \"Data health – <today's date>\".\n\n```json\n{\n  \"generated_at\": \"2026-10-20\",\n  \"account\": \"Account or tenant name\",\n  \"checks\": [{\n    \"id\": \"stale_due\",\n    \"title\": \"Invoices past due still marked \\\"Due\\\"\",\n    \"severity\": \"high | medium | low\",\n    \"status\": \"found | clear | unavailable\",\n    \"count\": 43,\n    \"detail\": \"One or two sentences on what was found, with the most useful number.\",\n    \"why\": \"Why it matters, in one sentence.\",\n    \"fix\": \"How to fix it, in one sentence.\",\n    \"examples\": [{ \"label\": \"PERF-IN-000087\", \"sub\": \"Customer · due 12 Feb 2025 · $17,643.23\" }],\n    \"ask\": \"List the 43 invoices that are past due but still marked Due\"\n  }],\n  \"notes\": []\n}\n```\n\n## 4. Text fallback\n\nA table: check, count, severity, one-line fix. Then the top three examples for each high-severity finding.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}