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

@yjc730/decant

v0.1.0

Published

Give your AI coding agent taste. Extract any website's design language into agent-readable instructions.

Readme

decant

從任何網站抽出「設計語言」,變成機器可讀的 design tokens,餵給 AI coding agent。

AI agent 很會寫 UI,但寫出來的東西沒有品味——因為它沒有品味的參考基準。 你心裡想的是「像 cuberto.com 那種感覺」,但這句話傳不進 agent。 decant 把一個參考網站的 URL,蒸餾成 agent 看得懂的 design tokens: 字級級距、間距節奏、色彩配對、圓角與陰影的質感語言。

我們不是在複製參考網站的畫面,而是在萃取它的設計系統。靈感萃取 ≠ 抄襲。

Before / After

同一個 prompt,差別只在有沒有把 decant 抽出的 tokens 餵給 agent。

| Before — agent 自己猜 | After — 餵入 decant tokens | |---|---| | before | after |

用法

npx tsx src/extract.ts <url>     # 撈原始 computed styles → out/raw/<host>.json
npx tsx src/cluster.ts <host>    # 頻率加權分群 → out/dna/<host>.json
npx tsx src/report.ts <host>     # 轉成 agent 指令 → out/md/<host>.md

out/md/<host>.md 是給 agent 讀的片段,寫成指令式而非報告式——直接貼進你的 CLAUDE.md。

抽什麼

| 類別 | 內容 | |---|---| | typography | font-size 級距、建議基準單位 | | spacing | 帶容差的基準單位 + 級距,並標記 art-directed / modular-rhythm / mixed | | color | (background, foreground) 配對,標出 dominant surface 與 accent | | surface | border-radius 級距 |

收斂不足時明確標記 no clear system detected,不硬生一組系統。