npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nucleux/prompt-enhancer

v0.12.0

Published

Prompt Enhancer — a magic-wand action that rewrites a short ask into a precise one, shown as a reviewable diff; starts from the wand or the Improve prompt row in Request settings — Nucleux agentic UI for React.

Readme

@nucleux/prompt-enhancer

Prompt Enhancer — a magic-wand action that rewrites a short ask into a precise one, shown as a reviewable diff; starts from the wand or the Improve prompt row in Request settings — Nucleux agentic UI for React.

Part of Nucleux — agentic UI components for React. Install a single component, or the full kit via @nucleux/react.

An Enhance action in the composer expands a terse prompt into a clearer one and shows it beside the original — each addition marked, explained and removable, assumptions labelled. It never silently replaces the prompt: Use puts the result in the composer with Undo and sends nothing; Keep original and Edit are always there, and a failure leaves the original untouched. The component calls no model — the app supplies onEnhance.

Exports

  • PromptEnhancer — the composer, the Enhance action and the review
  • usePromptEnhancer — the shared, non-visual logic (state machine, async enhance with cancel, Use/Undo)
  • Helpers: buildEnhancedPrompt, resolveEnhancedPrompt, getPromptEnhancerSegments, describePromptEnhancerChange, PROMPT_ENHANCER_TEXT
  • Types: PromptEnhancerProps, PromptEnhancerVariant, PromptEnhancerState, PromptEnhancerDiffStyle, PromptEnhancerChange, PromptEnhancerSuggestion, PromptEnhancerSegment, PromptEnhancerController

Variants

| variant | Use | | --- | --- | | preview-diff (default) | Original and enhanced side by side (diffStyle="split") or one sentence with additions marked ("inline") | | wand-button | The enhancement is applied in place; Undo restores the original | | auto-enhance-toggle | A switch: when on, Send enhances the prompt first, then sends it |

States: original, enhancing (cancel), enhanced, editing, accepted (Undo), reverted, failed (Try again / Keep original).

Install

pnpm add @nucleux/prompt-enhancer @nucleux/tokens

react / react-dom are peer dependencies.

Usage

import { PromptEnhancer } from "@nucleux/prompt-enhancer";

<PromptEnhancer
  value={draft}
  onValueChange={setDraft}
  hint="Aria will expand this prompt"
  onEnhance={(prompt, { signal }) => api.enhance(prompt, { signal })}
  // resolves with { changes: [{ id, text: " from the last quarter", reason, assumption? }] }
  // or { text: "the whole enhanced prompt" }
  onSubmit={send}
/>

Requires the theme once in your app: import "@nucleux/tokens/styles.css"; and the Tailwind preset from @nucleux/tokens/preset.

License

MIT © Nucleux