usegenerationstream-hook

usegenerationstream-hook is a skill for Claude Code, Codex from JNZader/repoforge. It costs 32 tokens per session (473 once invoked), scanned A, original, MIT.

A React guide for managing the state of a streamed generation process. React is a JavaScript library for building user interfaces, and a stream delivers results over time.

In plain words
What is it for?
Use it with the useGenerationStream hook to manage stream status and represent progress steps with StreamStatus and StepItem.
Why use it?
It helps an interface show whether generation is running and track the individual steps completed so far.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jnzader/repoforge/usegenerationstream
Any agent
npx skills add JNZader/repoforge --skill usegenerationstream
Clone the repo
git clone --depth 1 https://github.com/JNZader/repoforge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for usegenerationstream-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnzader/repoforge/usegenerationstream.svg)](https://agentmods.dev/skills/jnzader/repoforge/usegenerationstream)
Your own site
<a href="https://agentmods.dev/skills/jnzader/repoforge/usegenerationstream"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/usegenerationstream.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 473 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00473
Opus 5 $0.00016 $0.00236
Sonnet 5 $0.00006 $0.00095
Haiku 4.5 $0.00003 $0.00047

Measured 5d ago against content hash fc3a6783b9f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

usegenerationstream-hook scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/frontend/useGenerationStream/SKILL.md · 83 lines

What it actually says

usegenerationstream-hook

This skill covers patterns for managing generation streams in a React application.

Trigger: Load when using useGenerationStream for state management.

Quick Reference

Task Pattern
Manage stream status StreamStatus
Handle step items StepItem

Critical Patterns (Summary)

  • StreamStatus Management: Utilize StreamStatus to track the state of the generation stream.
  • StepItem Handling: Use StepItem to represent individual steps in the generation process.

Critical Patterns (Detailed)

StreamStatus Management

Utilize StreamStatus to track the state of the generation stream, allowing for responsive UI updates.

import { StreamStatus } from '@/hooks/useGenerationStream';

const status: StreamStatus = StreamStatus.RUNNING; // Example usage

StepItem Handling

Use StepItem to represent individual steps in the generation process, enabling detailed tracking of progress.

import { StepItem } from '@/hooks/useGenerationStream';

const step: StepItem = { id: 1, description: 'Initializing...' }; // Example usage

When to Use

  • When managing the state of a generation process in a React component.
  • When displaying progress through individual steps of a generation task.

Commands

docker-compose up
python repoforge/cli.py

Anti-Patterns

Don't: Ignore StreamState

Ignoring StreamState can lead to unresponsive UI and poor user experience.

// BAD
const state = {}; // Missing StreamState management
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 83 lines · 32 tokens per session scan A fc3a6783b9f8

Subscribe to this mod's changes

usegenerationstream-hook is a skill published in the GitHub repository JNZader/repoforge (5 stars, last pushed 10d ago), licensed MIT. It adds 32 tokens to every session and 473 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

frontend-patterns

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.

affaan-m/ECC · 41 tokens

react-patterns

React 18/19 patterns including hooks discipline, server/client component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.

affaan-m/ECC · 49 tokens

react-testing

React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress end-to-end runs. Use when writing or fixing tests for React components, hooks, or pages.

affaan-m/ECC · 59 tokens

reskin

Author a NEW skin for the reskinnable-demo app. A skin is a self-contained domain plugin under src/skins/ / that implements the frozen Skin contract (src/shell/skin-contract.ts) to swap the app's entire experience — brand, theme, layout, pages, tools, data, and agent — as a live sales demo. Use when the user says "add…

CopilotKit/CopilotKit · 154 tokens

setup-slack-channel

Use for the PROVIDER half of getting a locally running CopilotKit Channels agent to answer in Slack, when no Slack app exists yet — setting up a Channels bot in Slack for the first time, creating the Slack app and its tokens, attaching it to a managed Intelligence Channel, or when a Channel reports setuprequired, sits…

CopilotKit/CopilotKit · 206 tokens

copilotkit-channels

Use for the CODE half of a managed Intelligence Channel with Slack or Microsoft Teams: customising the Channel a CLI-scaffolded project already ships, or — for a project the CLI did not generate — writing the Channel declaration, the long-running host, and the awaited activation call. Teams provider setup is in scope…

CopilotKit/CopilotKit · 112 tokens