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

skusync-webmcp-sdk

v1.0.0

Published

SkuSync WebMCP JS SDK - One line AI readable e-commerce site (6 tools, read-only, no conversion logic)

Downloads

12

Readme

SkuSync WebMCP SDK (v1.0.1)

目标:让任何电商网站用 1 行代码变成「AI 可读的结构化站点」。

SDK 只做两件事

  1. 自动扫描页面商品结构(JSON-LD / Shopify Liquid / microdata / meta / OG)
  2. 自动注册工具,让 AI 代理可直接读取根目录下的标准文件(全部同源实时 fetch、零缓存)

不再内置任何转换逻辑(convertCSV、optimize 等全部移除),转换/优化交给 skusync.app 官网单独处理。

标准 ESM 引入(推荐)

<script type="module">
  import { initSkuSyncWebMCP } from 'https://esm.sh/skusync-webmcp-sdk@1';

  await initSkuSyncWebMCP({
    mode: 'auto',             // 'native' | 'bridge' | 'auto'
    autoRegister: 'readOnly', // 'readOnly' | 'off'(兼容 'on')
    debug: false,
    whitelistForms: ['add-to-cart']
  });
</script>

自动初始化副作用入口(等价于原先 script 直接注入):

<script type="module">
  window.skuSyncWebMCP = {
    mode: 'auto',
    autoRegister: 'readOnly',
    debug: false,
    whitelistForms: ['add-to-cart']
  };

  import 'https://esm.sh/skusync-webmcp-sdk@1/auto';
</script>

新工具列表(精简为 6 个,全部自动注册)

  • skusync_getStructuredProducts —— 返回页面所有结构化商品数据
  • skusync_getSitemap —— 返回 /sitemap.xml 内容
  • skusync_getLLMsTxt —— 返回 /llms.txt 内容
  • skusync_getRobotsTxt —— 返回 /robots.txt 内容
  • skusync_getFeedXml —— 返回 /feed.xml 或 /products.xml(及常见变体)
  • skusync_getSiteFile —— 通用工具(支持 llms-full.md、humans.txt、任意 *.html.md)

关键保证

  • 全部工具:read-only(annotations.readOnlyHint=true)
  • 全部同源文件:fetch 使用 cache: 'no-store' + Cache-Control: no-cache零缓存,始终最新
  • Tool description 均为静态字符串(防 tool poisoning)

发布到 npm(供 esm.sh 分发)

# 1) 安装依赖
bun install

# 2) 质量校验 + 构建
bun run prepublishOnly

# 3) 登录并发布
npm login
npm publish --access public

发布后可通过以下地址使用:

  • https://esm.sh/skusync-webmcp-sdk@<major>
  • https://esm.sh/skusync-webmcp-sdk@<major>/auto