Borrowing it
Nothing to install: this file belongs to timothywarner/copilot-dev. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/timothywarner/copilot-dev/main/.github/prompts/generate-react-component.prompt.mdgit clone --depth 1 https://github.com/timothywarner/copilot-devWrote 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.
[](https://agentmods.dev/commands/timothywarner/copilot-dev/generate-react-component)<a href="https://agentmods.dev/commands/timothywarner/copilot-dev/generate-react-component"><img src="https://agentmods.dev/badge/commands/timothywarner/copilot-dev/generate-react-component/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/timothywarner/copilot-dev/generate-react-component"><img src="https://agentmods.dev/badge/commands/timothywarner/copilot-dev/generate-react-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.01902 |
| Opus 5.5 | $0.00008 | $0.00761 |
| Sonnet 5.5 | $0.00004 | $0.00380 |
| Haiku 4.5 | $0.00002 | $0.00190 |
Grade A, and why
generate-react-component 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Your goal is to scaffold a complete, production-ready React functional component based on the information provided.
What I need from you
If the component name and purpose are not already specified, ask for:
- Component name — PascalCase, descriptive (e.g.,
UserProfileCard,SearchResultsList) - Component purpose — one sentence describing what it renders and what it does
- Key props — what data does it accept? What callbacks does it expose?
- State needed? — does it manage any local state (loading, open/closed, selected item)?
Component name: ${input:componentName:MyComponent}
Component purpose: ${input:componentPurpose:Describe what this component does}
What I'll generate
1. The component file: ${input:componentName:MyComponent}.tsx
import { useState, useEffect, useCallback } from 'react'
// --- Types ---
/**
* Props for the ${input:componentName:MyComponent} component.
*/
export interface ${input:componentName:MyComponent}Props {
/** Primary data to display */
data: SomeDataType
/** Called when the user performs the primary action */
onAction?: (item: SomeDataType) => void
/** Optional CSS class for the root element */
className?: string
/** When true, renders in a loading/skeleton state */
isLoading?: boolean
}
// --- Component ---
/**
* ${input:componentName:MyComponent} — ${input:componentPurpose:describe what this renders}
*
* @example
* ```tsx
* <${input:componentName:MyComponent}
* data={myData}
* onAction={(item) => console.log('Action on', item)}
* />
* ```
*/
export function ${input:componentName:MyComponent}({
data,
onAction,
className = '',
isLoading = false,
}: ${input:componentName:MyComponent}Props) {
// Local state
const [isExpanded, setIsExpanded] = useState(false)
// Side effects
useEffect(() => {
// Example: reset expanded state when data changes
setIsExpanded(false)
}, [data])
// Stable callbacks
const handleAction = useCallback(() => {
onAction?.(data)
}, [data, onAction])
// Loading state guard
if (isLoading) {
return (
<div
className={`animate-pulse rounded-lg bg-gray-100 h-24 ${className}`}
aria-busy="true"
aria-label="Loading..."
/>
)
}
return (
<article
className={`rounded-lg border p-4 ${className}`}
aria-label={`${input:componentName:MyComponent} for ${data.name ?? 'item'}`}
>
{/* Header */}
<header className="flex items-center justify-between">
<h2 className="text-lg font-semibold">{data.name}</h2>
<button
type="button"
onClick={() => setIsExpanded((prev) => !prev)}
aria-expanded={isExpanded}
aria-controls="component-details"
className="text-sm text-blue-600 hover:underline focus-visible:outline-2"
>
{isExpanded ? 'Collapse' : 'Expand'}
</button>
</header>
{/* Expandable details */}
{isExpanded && (
<section id="component-details" className="mt-2 text-sm text-gray-600">
{data.description}
</section>
)}
{/* Primary action */}
{onAction && (
<footer className="mt-4">
<button
type="button"
onClick={handleAction}
className="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus-visible:outline-2"
>
Take Action
</button>
</footer>
)}
</article>
)
}
export default ${input:componentName:MyComponent}
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.
- 1mo ago First seen · 237 lines · 21 tokens per session scan A 13571305e751
generate-react-component is a command published in the GitHub repository timothywarner/copilot-dev (46 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 1,902 once invoked, about $0.0001 per session on Opus 5.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-09-20.
Other commands, from other repositories
implement-feature
Implement an approved feature plan with benefit-based placement, TDD, revision-bound evidence, and PR-ready output.
verify-bug
Post-merge UAT verification workflow. Walks JIRA reproduce steps, performs comparative audits (Before/After), attaches evidence to JIRA, and transitions status on PASS.
verify-work
Verify feature, bug, UI, API, mobile, security, or deployment work against acceptance criteria.
cyber-purple-validation
Controlled purple validation using paired action-observation evidence, explicit defensive outcomes, and optional isolated lab routing.
zephyr-coverage-analysis
Analyze Zephyr test case coverage for a Jira user story and produce a QE management report with metrics, risk scoring, and prioritized recommendations.
component-scaffold
Scaffold a typed, accessible React or React Native component with tests and styles.