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

jev-prompt-enhancer

v0.1.0

Published

Automatic Prompt Enhancer for any AI agent: Jev decides IF refinement is needed, Mercury rewrites, Jev fidelity-checks, you approve.

Readme

jev-prompt-enhancer

npm version license powered by Jev + Mercury

Automatic Prompt Enhancer for any AI agent / IDE. You type the request however it comes out (typos, vague, missing context) — one cheap Jev decision decides whether it even needs refinement; if yes, Mercury (diffusion LLM) rewrites it precisely, a second Jev call checks that the meaning was NOT changed, and you approve / reject / rework.

Full cycle: ~2 s, ~$0.001. Clear prompts pass untouched (that is the point — most prompts don't need help). Fail-open: no key / API error → the original prompt goes through.

Pipeline

raw query → Jev: needs refinement? (noul ~0.5 s, ~$0.00002)
             └─ <0.6 → {"enhance": false}  — untouched, zero extra cost
             └─ ≥0.6 → Mercury rewrite (~1 s)
                       → Jev fidelity check: did meaning change?
                          └─ HIGH → reject the rewrite, warn
                          └─ LOW/MED → improved prompt + your [approve / reject / rework]

Verified (live runs)

| Input | Jev verdict | Result | |---|---|---| | а памаги мне зделать чтоб бот торгавал биткоин но штоб не терял деньгу | needs=0.84, typos | ✏️ → «Помоги мне создать бота, который будет торговать биткоином, но не будет терять деньги и не будет слишком рисковать.» (1.9 s, meaning LOW) | | зделай что-нить для сайта штоб быстрее работал | needs=0.89, ambiguous | ✏️ refined | | Fix the failing test in tests/auth.spec.ts | needs=0.54 | ✅ untouched | | обнови зависимости в package.json и запусти тесты | needs=0.32 | ✅ untouched | | ls | needs=0.25 | ✅ untouched |

Install

npm i -g jev-prompt-enhancer
export OPENROUTER_API_KEY=sk-or-v1-...   # env only, never hardcoded

Use

jev-enhance "<raw query>"              # JSON: original/enhanced/verdicts/latency
jev-enhance "<raw query>" -i           # interactive: approve / keep / rework
jev-enhance --init claude              # wire into Claude Code (real hook)
jev-enhance --init opencode            # wire into OpenCode (plugin)
jev-enhance --init generic             # prints AGENTS.md / CLAUDE.md rule

Hooks: how it works per agent

Claude Code — real hook (HARD-ish mode). --init claude writes to ~/.claude/settings.json:

{"hooks": {"UserPromptSubmit": [{"hooks": [{"type": "command", "command": "jev-enhance --hook-claude"}]}]}}

The hook reads {"prompt": "..."} from stdin, and per the official UserPromptSubmit schema a hook cannot replace the prompt — it can block it or inject additionalContext. So the tool injects: with --auto in the command → Treat the user's request as (technically refined, same intent): "..."; without → an FYI note the model may surface. Either way the decision stays yours — reject in chat and the original is used.

OpenCode — plugin (SOFT mode). --init opencode writes ~/.config/opencode/plugin/jev-enhance.js, which listens to chat.message and appends a [Prompt refinement note] part when Jev says the prompt needs help.

Anything else (Codex, Cursor, Hermes…) — --init generic prints the rule: before answering a non-trivial request, run jev-enhance "<request>", show the improved version, let the user choose. Same pattern as jev-skill-router.

Anti-hallucination gate

The rewriter is instructed: keep exactly the same intent, fix grammar, make vague wording precise, do NOT add requirements — and a second Jev call scores meaning_changed (LOW/MEDIUM/HIGH). HIGH → the rewrite is rejected outright, you get the original back.

Honest limits

  • Refinement = clarity, not mind-reading: it can't recover requirements you never wrote (it can only make vagueness explicit).
  • The threshold (0.6) is calibrated on tests above; it will occasionally refine a prompt you considered fine — reject and it remembers nothing.
  • ~2 s latency per refined prompt (two Jev calls + one Mercury call). Untouched prompts: ~0.5 s.

MIT