CLI
check

skeletal-ui check

Asserts that all skeleton files are up to date. Exits with code 1 if any skeleton is stale or missing. Use in CI to prevent skeleton drift.

npx skeletal-ui check [options]

Options

FlagDescription
--jsonOutput results as JSON for tooling integration.

How staleness is detected

Each generated skeleton file contains a hash comment in its header:

// skeletal:hash:a1b2c3d4

The hash is computed from the source component's JSX structure. When the component's JSX changes, the hash changes, and check reports the skeleton as stale.

CI usage

# .github/workflows/ci.yml
- name: Check skeletons
  run: npx skeletal-ui check

JSON output

skeletal-ui check --json
{
  "stale": [
    {
      "name": "UserCard",
      "reason": "hash changed",
      "file": "src/components/UserCard.skeleton.tsx"
    }
  ],
  "upToDate": 4,
  "total": 5
}