# Analyze Data Substrates in Codebases

Data models and state updates can drift without clear review. This skill guides analysis of typing, mutation, and serialization choices.

## Install

```bash
npx skillstore add dowwie/data-substrate-analysis
```

## Metadata

- Status: approved
- Slug: dowwie-data-substrate-analysis
- Skillstore revision: r1
- Version status: missing
- Tree hash: a2e1c78fca0a05311a2cb34e7d9876f79308cdd230099ad710fe46a2a98caa57
- Author: Dowwie
- GitHub username: Dowwie
- License: MIT
- Repository: https://github.com/Dowwie/agent\_framework\_study/tree/main/.claude/skills/data-substrate-analysis
- Ref: 72d5025b022c77f7a51bdf5c1637c689c80e89d1
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/dowwie-data-substrate-analysis
- Manifest: https://skillstore.pages.dev/api/skills/dowwie-data-substrate-analysis/manifest

## Capabilities

- Identify common type modeling approaches such as Pydantic, dataclasses, TypedDict, NamedTuple, and plain dictionaries.
- Compare mutable and immutable state update patterns in selected code paths.
- Review serialization choices including Pydantic dumps, dataclass conversion, custom methods, pickle, and JSON.
- Produce a structured Markdown report covering typing strategy, core primitives, mutation risk, and serialization.
- Connect findings to related architecture analysis workflows named in the skill.

## Use Cases

- Assess State Models: Review how service state is represented, mutated, and serialized before a refactor.
- Review Framework Migration: Compare Pydantic, dataclass, and TypedDict patterns during a framework or version migration.
- Document Data Contracts: Create a concise map of core data primitives, validation boundaries, and lifecycle risks.

## Prompt Templates

### Find Data Models

```
Use data-substrate-analysis on this repository. Identify the main type files and classify each data modeling approach.
```

### Compare Mutation Patterns

```
Analyze the state update paths in these files. Separate in-place mutation from copy-based updates and identify concurrency risks.
```

### Audit Serialization Boundaries

```
Review serialization and deserialization paths. Explain validation coverage, unknown field handling, and risks around nested objects.
```

### Prepare Architecture Decision Input

```
Create a data substrate report for this codebase. Compare modeling options and recommend changes for safer state lifecycle management.
```

## Limitations

- It provides analysis guidance only and does not execute scanners or modify code.
- Results depend on the caller providing relevant source files and repository context.
- It does not prove concurrency safety without tests or runtime evidence.
- It may need companion mapping skills to locate type and state files.

## Best Practices

- Provide the files that define models, state containers, serializers, and API boundaries.
- Ask for line-level evidence when using the result for architecture or refactoring decisions.
- Pair this analysis with tests when changing mutation or serialization behavior.

## Anti Patterns

- Do not treat the report as a complete security audit.
- Do not infer runtime safety from type annotations alone.
- Do not skip context about framework versions or migration goals.

## Security Audit

- Audited at: 2026-07-06T12:08:45.342\+00:00
- Summary: All static findings are false positives caused by Markdown inline code, fenced examples, and template text in SKILL.md. No prompt injection, data exfiltration intent, or executable command guidance was found.

## Stats

- Views: 218
- Downloads: 7
- Favorites: 0
- Popularity score: 0
