Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill covers patterns for managing generation streams in a React application. Trigger: Load when using `useGenerationStream` for state management.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -49% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -54% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -53% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -66% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -34% | 0% |
<!-- L1:START -->
This skill covers patterns for managing generation streams in a React application.
Trigger: Load when using useGenerationStream for state management. <!-- L1:END -->
<!-- L2:START -->
| Task | Pattern | |------|---------| | Manage stream status | StreamStatus | | Handle step items | StepItem |
StreamStatus to track the state of the generation stream.StepItem to represent individual steps in the generation process.<!-- L2:END -->
<!-- L3:START -->
Utilize StreamStatus to track the state of the generation stream, allowing for responsive UI updates.
typescriptimport { StreamStatus } from '@/hooks/useGenerationStream'; const status: StreamStatus = StreamStatus.RUNNING; // Example usage
Use StepItem to represent individual steps in the generation process, enabling detailed tracking of progress.
typescriptimport { StepItem } from '@/hooks/useGenerationStream'; const step: StepItem = { id: 1, description: 'Initializing...' }; // Example usage
bashdocker-compose up python repoforge/cli.py
Ignoring StreamState can lead to unresponsive UI and poor user experience.
typescript// BAD const state = {}; // Missing StreamState management
<!-- L3:END -->
Other measured skills in the registry, with their headline benchmark lift.