skills/dowwie/data-substrate-analysis/SKILL.md
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.
npx skillsauth add aiskillstore/marketplace data-substrate-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyzes the fundamental units of data and state management 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 |
# In-place list modification
state.messages.append(msg)
state.history.extend(new_items)
# Direct dict mutation
state['key'] = value
state.update(new_data)
# Object attribute mutation
state.status = 'complete'
# Pydantic copy
new_state = state.model_copy(update={'key': value})
# Dataclass replace
new_state = replace(state, messages=[*state.messages, msg])
# Spread operator style
new_state = {**state, 'key': value}
# Frozen dataclass
@dataclass(frozen=True)
class State: ...
| Method | Code Pattern | Trade-offs |
|--------|-------------|------------|
| Pydantic JSON | .model_dump_json() | Type-safe, automatic |
| Pydantic Dict | .model_dump() | For internal use |
| Dataclass | asdict(obj) | Manual, no validation |
| Custom | to_dict(), from_dict() | Full control |
| Pickle | pickle.dumps() | Fast, fragile, security risk |
| JSON | json.dumps(obj, default=...) | Requires encoder |
## Data Substrate Analysis: [Framework Name]
### Typing Strategy
- **Primary Approach**: [Pydantic/Dataclass/TypedDict/Loose]
- **Key Files**: [List of files]
- **Nesting Depth**: [Shallow/Medium/Deep]
- **Validation**: [At boundaries/Everywhere/None]
### Core Primitives
| Type | Location | Purpose | Mutability |
|------|----------|---------|------------|
| Message | schema.py:L15 | Chat message | Immutable |
| State | state.py:L42 | Agent state | Mutable ⚠️ |
| Result | types.py:L78 | Tool output | Immutable |
### Mutation Analysis
- **Pattern**: [In-place/Copy-on-write/Mixed]
- **Risk Areas**: [List of mutable state locations]
- **Concurrency Safe**: [Yes/No/Partial]
### Serialization
- **Method**: [Pydantic/Custom/JSON]
- **Implicit/Explicit**: [Description]
- **Round-trip Tested**: [Yes/No/Unknown]
codebase-mapping to identify type filescomparative-matrix for typing decisionsresilience-analysis for error handling in serializationdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.