Agent skill · data analytics · aiskillstore

data-substrate-analysis

Analyze fundamental data primitives, type systems, and state management patterns in a codebase. Use when (1) evaluating typing strategies (Pydantic vs TypedDict vs loose dicts), (2) assessing immutability and mutation patterns, (3) understanding serialization approaches, (4) documenting state shape and lifecycle, or (5) comparing data modeling approaches across frameworks.

Why this skill is useful

Provides domain-specific analysis patterns and templates for evaluating data structures and state management that the AI wouldn't reliably generate on its own.

What it needs

About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Data Substrate Analysis Analyzes the fundamental units of data and state management patterns. Process 1. Locate type files — Find types.py, schema.py, models.py, state.py 2. Classify typing — Strict (Pydantic), structural (TypedDict), loose (dict) 3. Analyze mutation — In-place modification vs. copy-on-write 4. Document serialization — json(), dict(), pickle, custom methods Typing Strategy Classification Detection Patterns Strategy Indicators Files to Check ---------- ----------- ---------------- Pydantic BaseModel, Field(), validator models.py, schema.py Dataclass @dataclass, field() types.py, models.py TypedDict TypedDict, Required[], NotRequired[] types.py NamedTuple NamedTuple, typing.NamedTuple types.py Loose Dict[str, Any], plain dict Throughout Analysis Questions Are boundaries validated (API ingress/egress)? Is nesting depth reasonable (<3 levels)? Are optional fields explicit or implicit None? Version migration path (Pydantic V1 → V2)? Immutability Analysis Mutable Patterns (Risk Indicators) Immutable Patterns (Safer) Serialization Strategy Common Patterns Method Code Pattern Trade-offs -------- ------------- ------------ Pydantic JSON .modeldumpjson() Type-safe, automatic Pydantic Dict .modeldump() For internal use Dataclass asdict(obj) Manual, no validation Custom todict(), fromdict() Full control Pickle pickle.dumps() Fast, fragile, security risk JSON json.dumps(obj, default=...) Requires encoder Questions to Answer Is serialization implicit (automatic) or explicit (manual)? How are nested objects handled? Is deserialization validated? What happens with unknown fields? Output Template Integration Prerequisite: codebase-mapping to identify type files Feeds into: comparative-matrix for typing decisions Related: resilience-analysis for error handling in serialization

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/data-substrate-analysis

View the source on GitHub

Browse the @skills marketplace