new-context

Community

Generate React Context with tests

Authorsolrac97gr
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates the creation of React Context, Provider, and useReducer components, along with their corresponding tests, ensuring robust state management setup.

Core Features & Use Cases

  • Context Generation: Creates TypeScript files for Context, Provider, and a custom hook.
  • Reducer Implementation: Generates a reducer function with a switch statement for actions.
  • Test Suite Creation: Automatically generates unit tests for reducer, provider, and hook using Vitest and React Testing Library.
  • Use Case: Quickly set up state management for a "User" feature, defining its state, actions, and ensuring comprehensive test coverage from the start.

Quick Start

Use the new-context skill to create a 'Cart' context for the 'shared' feature, managing 'items: CartItem[]' and 'total: number', with actions 'ADD_ITEM' and 'REMOVE_ITEM'.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: new-context
Download link: https://github.com/solrac97gr/marketplace-plugins/archive/main.zip#new-context

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.