← LeaderboardThe Skill Leaderboard

dotlottie-bundle-validation

Audit local dotLottie 2.0 (.lottie) ZIP archives offline for manifest schema, declared animations, image assets, themes, state machines, duplicate entries, and path safety.

Published by sickn33 ↗sickn33/agentic-awesome-skills

Try your first task

A source-grounded starter task has not been verified for this skill yet.

SKILL.md

name: dotlottie-bundle-validationdescription: "Audit local dotLottie 2.0 (.lottie) ZIP archives offline for manifest schema, declared animations, image assets, themes, state machines, duplicate entries, and path safety."category: designrisk: safesource: selfsource_type: selfdate_added: "2026-12-01"author: Koushik-Katkamtags: [dotlottie, lottie, animation, zip-validation, manifest, jsonschema]

dotLottie Bundle Validation

Overview

Audit local dotLottie 2.0 .lottie ZIP containers strictly offline without rendering animations, executing embedded Lottie expressions, extracting files to disk, or fetching external assets. Validates bounded ZIP archive integrity (duplicate central-directory entries, path traversal, symlinks, member size caps), enforces the dotLottie 2.0 vs. 1.0 boundary, schema-validates manifest.json (jsonschema==4.26.0), verifies declared animation paths (a/<id>.json), external image asset references (i/...), themes (t/<id>.json), and state machines (s/<id>.json).

Distinction from existing Lottie/video skills:

  • hyperframes: embeds @lottiefiles/dotlottie-web into HTML video compositions (window.__hfLottie.push(player)) and drives frame-seek timelines rather than validating .lottie ZIP bundle integrity and manifest.json references.
  • remotion-to-hyperframes and remotion-best-practices: translate @remotion/lottie and Lottie components into Remotion/HyperFrames compositions rather than auditing dotLottie 2.0 package structure offline.

When to Use

  • Validating .lottie 2.0 asset bundles in CI or design-asset pipelines before shipping mobile/web builds.
  • Catching missing animation JSON files (a/<id>.json), missing image assets referenced inside Lottie assets[], dangling theme/state-machine references, duplicate ZIP members, or dotLottie 1.0 (animations/) vs. 2.0 (a/) structure mismatches.
  • Do not use this skill to execute animation expressions, render frames, or extract untrusted .lottie archives to disk.

Prerequisites

  • Python 3.10+ with jsonschema and pytest (tested with Python 3.12.10, jsonschema==4.26.0, pytest==9.1.1).
  • Local or synthetic .lottie ZIP files.
  • No browser/WASM dotLottie player runtime, network asset fetch, or filesystem extraction required.

How It Works

1. Enforce pre-central-directory archive bounds & reject dotLottie 1.0 cleanly

  1. Enforce an archive-input byte bound (<= 64 MiB regular non-symlink file read into bounded memory) before calling zipfile.ZipFile so oversized inputs cannot trigger central-directory allocation.
  2. Inspect each original info.orig_filename string before normalization (PurePosixPath/posixpath.normpath): reject empty names, leading /, \, Windows drive prefixes (C:), NUL bytes, empty // segments, . or .. path components, symlink attributes (S_ISLNK), duplicate raw or normalized entry names (DUPLICATE_ARCHIVE_ENTRY), member count (> 500), and uncompressed size caps (16 MiB member / 64 MiB total). Use the normalized info.filename for lookups only after the original decoded name passes.
  3. Require root manifest.json and parse JSON cleanly (INVALID_INPUT on corrupt ZIP/JSON). Explicitly reject dotLottie "1" / "1.0" packages as UNSUPPORTED (UNSUPPORTED_DOTLOTTIE_V1) because v1.0 uses animations/ + images/ rather than the v2.0 a/, i/, t/, s/, f/ layout. Strict dotLottie 2.0 validation requires version == "2"; "2.0" is rejected unless explicit compat_extensions=True compatibility mode is requested.

2. Validate strict dotLottie 2.0 manifest, animations, assets, themes, and state machines

Run the local verification suite in dotLottie 2.0 bundle harness:

  1. Schema-validate manifest.json against strict dotLottie 2.0 rules (version == "2", unique non-empty animations[].id with optional string initialTheme, unique themes[].id, unique stateMachines[].id, and initial object {"animation": ..., "stateMachine": ...}). Legacy/compatibility forms (manifest version: "2.0", root states alias, animation themes arrays, dict-shaped state-machine states) fail strict validation and are accepted only under explicit compat_extensions=True with explicit WARN findings.
  2. Enforce canonical dotLottie 2.0 archive paths strictly (a/<id>.json for animations, rejecting non-canonical "file" overrides or traversal IDs), verify every animations[].initialTheme references a declared themes[].id (MISSING_INITIAL_THEME_REF), and verify every animation parses as a JSON object containing v, fr, ip, op, layers, and a valid list of dict items for assets[] (INVALID_LOTTIE_ASSETS otherwise).
  3. Inspect each animation's assets[]: skip embedded data: base64 assets (e == 1 or p.startswith("data:")), reject external http:///https:// remote URLs as EXTERNAL_ASSET_DISALLOWED, and confirm local image references resolve canonically inside i/ to existing archive members (MISSING_ASSET_FILE).
  4. Confirm every declared theme (t/<id>.json) and state machine (s/<id>.json) exists at its canonical path, parses as a structured JSON object, satisfies declared initial / initialTheme cross-references, and in strict mode requires state-machine states to be a non-empty array of state objects (name non-empty string) with initial as a string naming an existing state in states.

Examples

Run the self-contained verification suite in dotLottie 2.0 bundle harness:

User request: "Validate hero-banner.lottie against the dotLottie 2.0 packaging spec before release."
Inputs: Synthetic or local .lottie ZIP archive inspected read-only in memory.
Expected result: Valid v2.0 bundle with a/hero.json, i/badge.png, t/dark.json, and s/interactive.json passes;
  missing animation file, missing image asset, missing theme/state-machine, or duplicate ZIP entry fails loudly;
  v1.0 returns UNSUPPORTED; traversal member returns UNSAFE_ARCHIVE.

Limitations

  • Targets dotLottie 2.0 (version: "2", initialTheme, array states, string initial) in default strict mode; compatibility aliases (version: "2.0", manifest states, animation themes, dict-shaped state-machine states) require explicit compat_extensions=True, while dotLottie 1.0 bundles (animations/*.json) return UNSUPPORTED.
  • Verifies JSON presence and structural keys (v, fr, ip, op, layers), not full Lottie expression AST validity, pixel rendering parity, or @lottiefiles/dotlottie-web WASM player compatibility.

Safety and Side Effects

  • Strictly offline, read-only, and non-executing: inspects ZIP members in memory with bounded member counts and uncompressed byte limits (16 MiB member, 64 MiB total).
  • Never runs JavaScript/Lottie expression evaluators, renders WebGL/WASM frames, or fetches external URLs.

Sources and related skills

dotlottie-bundle-validation by sickn33 · The Skill Leaderboard