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

prompt-to-asset

v0.5.1

Published

Prompt enhancer + asset pipeline for developers. One brief → a validated bundle (iOS AppIconSet, Android adaptive, PWA, favicon, OG, visionOS) via routed image models. Three modes: inline_svg (zero-key), external_prompt_only (paste into your subscription)

Downloads

939

Readme

prompt-to-asset

One brief → a validated, multi-platform asset bundle. Prompt enhancer + asset pipeline for developers. Works in Claude Code, Cursor, Windsurf, Codex, Gemini CLI, Cline, VS Code, and standalone.

# Zero-key, one-liner
npx prompt-to-asset init

# Or install globally
npm i -g prompt-to-asset
p2a doctor

What you get

One brief + optional brand.json → every asset a modern app needs:

  • iOSAppIcon.appiconset (14 sizes + 1024 marketing, opaque), iOS 18 dark / tinted variants.
  • Android — adaptive foreground + background + Android 13 monochrome, every mipmap-*dpi.
  • PWA192, 512, 512-maskable (80 % safe zone) + manifest.webmanifest + <head> snippet.
  • Favicon — multi-res .ico, icon.svg with prefers-color-scheme: dark, apple-touch-icon.png.
  • OG / Twitter — 1200 × 630 with real typography via Satori (not rendered inside a diffusion sampler).
  • Flutterflutter_launcher_icons.yaml + 1024 master.
  • visionOS — 3-layer parallax scaffold (README + master PNG; layer separation is manual).
  • Splash screens — iOS LaunchScreen-2732.png, Android mipmap-*dpi/splash.png, PWA splash-1200.png.

Plus: logos, illustrations, hero banners, sticker / transparent marks, icon packs. Sprite sheets and 9-slice via the CLI for game devs.

Three ways to run it — pick one per call

| Mode | Keys required | Best for | How | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | inline_svg | none | logos, favicons, icons, simple app icons | Server returns a tight SVG-authoring brief; your MCP host (Claude / Cursor) writes the <svg> inline, then asset_save_inline_svg writes it to disk and runs the platform fan-out. | | external_prompt_only | none | you already pay for ChatGPT / Midjourney / Ideogram / Google AI Studio / Recraft | Server returns the dialect-correct prompt + paste-target URLs. You generate in your subscription, save the file, then call asset_ingest_external to run matte → vectorize → validate. | | api (free) | none | automation, no paid key | Routes to Pollinations (zero signup), Hugging Face Inference (free HF_TOKEN), Cloudflare Workers AI (free 10k neurons/day), or Stable Horde (anonymous queue). | | api (paid) | one of OPENAI_API_KEY, IDEOGRAM_API_KEY, RECRAFT_API_KEY, BFL_API_KEY, GEMINI_API_KEY, STABILITY_API_KEY, LEONARDO_API_KEY, FAL_API_KEY | full-fidelity, rate-limit-free | Server calls the routed provider → matte → vectorize → export → tier-0 validate → content-addressed AssetBundle. |

p2a doctor tells you which modes are live in your current environment.

Why this exists

Devs ship apps. Apps need brand assets. Two obstacles:

  1. You're not a designer. Asking Gemini "iOS app icon for a weather app called Halcyon" returns a mediocre square PNG because you don't know each model's dialect, safe zones, text ceilings, or when transparency is actually supported vs. rendered as a grey-and-white checkerboard.
  2. One PNG is not an asset. A real app icon is a 1024² master + the 14-size AppIconSet + Android adaptive layers + PWA maskable + visionOS + Flutter pubspec. Doing that fan-out by hand in Figma or Photoshop after every regeneration is hours of grunt work.

This tool does for dev assets what paid prompt-enhancer tools do for designer prompts — free, scoped to dev-asset surfaces, routed across every model.

Install

# Per project (keeps your toolchain reproducible)
npm i -D prompt-to-asset

# Global (recommended for CLI use)
npm i -g prompt-to-asset

# Zero install (every command works)
npx prompt-to-asset <cmd>

Register as an MCP server

# Claude Code
claude mcp add prompt-to-asset -- p2a

# Cursor / VS Code / Windsurf — edit .cursor/mcp.json / .vscode/mcp.json
#   "prompt-to-asset": { "command": "p2a" }

# Codex / Gemini CLI
#   Already generated in .codex/config.toml / gemini-extension.json

p2a init scaffolds a brand.json tuned to your framework (Next.js, Expo, Flutter, Xcode, Android, Astro, …) and prints the exact registration command for your IDE.

60-second quickstart (zero key)

npx prompt-to-asset doctor      # what's on, what's missing, ranked best → worst
npx prompt-to-asset init        # scaffold brand.json + register MCP server
npx prompt-to-asset pick        # interactive model picker: asset type + constraints → ranked route

Then, in Claude Code / Cursor / Windsurf:

Generate a favicon bundle for my app called Forge. Use brand.json. inline_svg mode.

Or standalone, from a master PNG you already have:

npx prompt-to-asset export path/to/master.png --platforms all --app-name "Forge"
# → writes iOS AppIconSet, Android adaptive, PWA, favicon.ico, OG, visionOS scaffold, Flutter yaml

Security

  • API keys live in env vars only. Never written to disk, never logged, never echoed in MCP responses. Provider error bodies are passed through a redact() filter that scrubs common key patterns (OpenAI sk-…, Google AIza…, Anthropic sk-ant-…, Bearer …, ?key=…, Replicate r8_…, Hugging Face hf_…).
  • Path access is allow-listed. image_path / output_dir inputs are resolved through symlinks and rejected if they escape the project cwd + output dir + cache dir. Widen with P2A_ALLOWED_PATHS=/path1:/path2 if your pipeline writes elsewhere.
  • SVG is XSS-sanitized before any write. <script>, <foreignObject>, on*= handlers, javascript: URIs, external <image href> / <use href>, CSS @import over the network — all rejected unconditionally. The check runs even without SVGO installed.
  • Cost guardrail. Set P2A_MAX_SPEND_USD_PER_RUN=5.00 to cap any single tool call. Pre-flight cost estimate (best-effort from published pricing) refuses to call if over. Free-tier routes are always $0.
  • No telemetry. No remote calls unless the routed provider explicitly requires one.

Docs

  • Full README + architecture: https://github.com/MohamedAbdallah-14/prompt-to-asset#readme
  • Troubleshooting: https://github.com/MohamedAbdallah-14/prompt-to-asset/blob/main/TROUBLESHOOTING.md
  • Security policy: https://github.com/MohamedAbdallah-14/prompt-to-asset/blob/main/SECURITY.md

License

MIT.