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

design-mirror-init

v1.1.0

Published

Drop Figma-first rules into your project + lint for rule violations so AI-generated UI imports cleanly into Figma via Design Mirror.

Readme

design-mirror-init

Drop a Figma-first rules file into your project so AI-generated UI imports cleanly into Figma via Design Mirror.

Quick start

npx design-mirror-init

Writes CLAUDE.md to your current directory. Your AI coding tool (Claude Code, Cursor, Claude Desktop) reads it and follows the rules when generating UI.

What it does

The rules file tells your AI to build UI in a Figma-friendly way:

  • Flexbox over absolute positioning
  • Semantic HTML (<h1>, <p>, <button>, etc.)
  • Padding + gap, never margin
  • Skip-friendly naming for icons / charts / floating elements
  • One style per text node

Result: when you capture the rendered page into Figma with Design Mirror, the resulting design has clean auto-layout, named layers, and minimal post-import cleanup.

Options

npx design-mirror-init --name AGENTS.md    # Custom filename
npx design-mirror-init --rules-only        # Print to stdout
npx design-mirror-init --force             # Overwrite existing file
npx design-mirror-init --dry-run           # Show what would be written

Lint your project

Run before capturing into Figma — catches rule violations at code time.

npx design-mirror-init check

Reports position: absolute on content, wrapping CSS Grid, transform: translate for layout, Tailwind absolute outside overlay paths, inline <svg> inside text nodes, and more. Exit code 1 if issues found.

npx design-mirror-init check --json   # CI / pre-commit hooks

Suppress a single false positive:

.thing {
  /* design-mirror-ignore */
  position: absolute;
}

Files inside paths matching modal|dialog|tooltip|popover|dropdown|overlay|drawer|toast|menu|select get absolute-positioning flagged at INFO instead of WARN — overlay components legitimately use absolute.

How to use the rules

After running this CLI, your project root has CLAUDE.md. Then:

  1. Claude Code auto-reads CLAUDE.md. No setup.
  2. Cursor — rename to .cursorrules or include via @CLAUDE.md in a prompt.
  3. Other AI tools — paste the file content into your system prompt.

Then build your page. When ready, capture it into Figma with Design Mirror and toggle Auto Layout: On to get clean Figma frames.

License

MIT