data-sanity

Featured

Use when running spectra Design Review, before /spectra-archive, or ad-hoc on changes touching paginated queries. Detects client-server schema mismatch (e.g. perPage: 200 vs max(100)).

Data & Documents 45 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
55
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

<!-- 🔒 LOCKED — managed by clade · auto-generated by sync-to-codex; edit source in .claude/ then re-run sync --> `/data-sanity` — Layer C static data-shape audit. Born from perno `app-status-badge-extraction`(2026-05-24): `attendance/amendments.vue` 用 `useEmployeeListQuery({ perPage: 200 })`,但 server schema 是 `perPage: z....max(100)` → API 400 → `employeeNameMap` empty → 員工 column 整列「-」。typecheck / lint / design review / verify:ui 全沒抓到,因為它是**資料形狀**問題,不是型別或視覺問題。 這是 clade 自有 skill(**不是** `/impeccable` 的 sub-command — impeccable 是第三方 npx-managed skill,clade 不擁有)。 ## 何時跑 - **`/spectra-apply` Section 7 Design Review 期間**:對本 change 觸及的 paginated query + lookup-resolved column 跑一次。 - **`/spectra-archive` Step 0 之前**:archive gate 的 data-shape 防線。 - **Ad-hoc**:任何改到 `useXxxQuery({ <param>: <literal> })` 或 lookup map 的工作。 ## 怎麼跑 從 clade central 呼叫(`<clade-vendor>` = `~/offline/clade/vendor`,與其他 vendor script 同慣例): ```bash node <clade-vendor>/scripts/audit-data-sanity.ts \ --consumer-path . \ [--files <comma-separated-touched-files>] \ --json ``` - 不給 `--files` → walk 整個 consumer(skip node_modules/.nuxt/dist)。 - 給 `--files` → 只掃指定檔(spectra-apply 時傳本 phase touched files 較快)。 ## 偵測項 1. **PARAM_BOUNDARY(Critical — blocks archive)**:client 端 pagination-ish param literal(`perPage` / `per_page` / `pageSize` / `limit` / `take` / `first` / `count` / `top` / `size`)超過(max)或低於(min)同名 server zod bound(`.max(N)` / `.min(N)` / `.length(N)`)。對應 UI-INV-2(lookup-resolved column 解析率 100...

Details

Author
YuDefine
Repository
YuDefine/nuxt-supabase-starter
Created
7 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category