Use when you need to find the 2-3 most popular and well-maintained npm packages relevant to a frontend checklist rule, validate they meet quality thresholds, an
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-find-npm-packages-cc38a1f94a68 ,按照其中的说明把「find-npm-packages」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Identify, validate, and add npm package references to a Front-End Checklist rule.
Given a rule file or rule slug, this skill will:
npmPackages frontmatter fieldBefore selecting any package, check it against these criteria using the npm registry:
| Criterion | Minimum |
|---|---|
| Weekly downloads | >10,000/week |
| Last publish | Within 18 months |
| npm registry | Must be listed (registry.npmjs.org/{name}) |
Packages that fail any threshold must be excluded, regardless of how relevant they are.
Read the rule file: packages/content/rules/en/{category}/{slug}.mdx
Focus on:
tools: field?Search for packages that:
Use https://www.npmjs.com/search?q={keywords} and knowledge of the ecosystem to find candidates.
Prefer packages that are:
eslint, stylelint, official plugins)For each candidate package, fetch and verify:
# Metadata
curl https://registry.npmjs.org/{package}/latest | jq '{name, version, description}'
# Weekly downloads
curl https://api.npmjs.org/downloads/point/last-week/{package} | jq '.downloads'
Record the weekly download count and last publish date. Reject any below threshold.
Add a npmPackages array to the frontmatter with the package names only (metadata is fetched at build time):
npmPackages:
- eslint
- eslint-plugin-jsx-a11y
- axe-core
Place it after tools: and before resources:.
Run the validation script to confirm all packages pass thresholds:
pnpm validate:packages packages/content/rules/en/{category}/{slug}.mdx
If any package fails, either remove it or replace it with a better alternative.
For the rule accessibility/form-labels:
npmPackages:
- eslint-plugin-jsx-a11y
- axe-core
- @testing-library/jest-dom
All three have >100k weekly downloads and were published within the last 6 months.