How chaillme/prevert works
Prevert is a small Claude Code plugin that adds a prompt-improvement button. The user clicks it; the handler reads the draft, asks Sonnet to rewrite it, then replaces the draft without sending it. A busy flag controls the displayed status. The runtime evidence is concentrated in hooks/register.tsx; the README documents the user-facing behavior, but the excerpts do not show how Claude Code loads the registration.
Main entry points: register.tsx Prompt handler
Components 6
Plugin runtime
- Prompt handler
hooks/register.tsx - Busy flag
hooks/register.tsx
Other components
- User
- Prompt draft
- Sonnet model
- Claude Code UI
Connections 6
- User → Prompt handler: clicks button
hooks/register.tsx - Prompt handler → Prompt draft: reads and replaces
hooks/register.tsx - Prompt handler → Sonnet model: requests rewrite
hooks/register.tsx - Sonnet model → Prompt handler: returns rewrite
hooks/register.tsx - Prompt handler → Busy flag: updates state
hooks/register.tsx - Prompt handler → Claude Code UI: renders UI and toasts
hooks/register.tsx