What problem does it solve?
Migrating React legacy context (contextTypes, childContextTypes, getChildContext) to the modern createContext API is a cross-file operation where updating only the provider or only some consumers leaves the app broken at runtime. This Skill provides the complete coordinated migration pattern so no consumer is missed.
Core Features & Use Cases
- Cross-File Migration Workflow: Enforces a strict order - find providers, find all consumers, create the context file, update the provider, then update every consumer.
- Scan Commands: Provides grep commands to locate all childContextTypes, contextTypes, and this.context usages in a codebase.
- Reference Guides: Includes complete before/after examples for single-context migration, multi-context apps with nested providers, and a standard context file template.
- Use Case: When upgrading a React 16/17 class-component codebase to React 18 or preparing for React 19 (where legacy context is removed), use this Skill to migrate a theme or auth context without breaking any consumers.
Quick Start
Use the react18-legacy-context skill to migrate the legacy contextTypes and childContextTypes code in my src/ directory to the modern createContext API.