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-corpus-zh

v0.2.0

Published

中文提示注入攻击语料库 —— InjectArena / prompt-audit 共享的语料资产层。Chinese prompt-injection attack corpus (zh/mixed) as a versioned shared asset; code MIT, data CC-BY-4.0.

Readme

prompt-corpus-zh

npm license GitHub

中文提示注入攻击语料库 —— 三项目共享的语料资产层。npm 包 + HuggingFace dataset 同步;代码 MIT,数据 CC-BY 4.0。

这是什么

InjectArena(攻)与 prompt-audit(守)共用的中文攻击语料的独立资产化。目前 chinese prompt injection 语料几乎空白,本仓库占住这个位置:

  • 一份语料,两个视角:CI 里是「拦截率基线」的语料源,靶场里是「段位榜」的语料源——飞轮的物理载体
  • 版本可锁:每周快照 + 语义化版本;prompt-audit 锁定版本引用,回归结果可复现
  • schema 治理权独立(方案 v2 · 治理规则 1):schema 不归任何一项目所有,变更走 SCHEMA-RFC.md 流程,三项目以 issue / RFC 提变更请求

内容来源

| 来源 | 说明 | 条目标记 | |---|---|---| | seed | InjectArena 初始语料(direct-injection 50 + data-exfiltration 14 + indirect-injection 20 + tool-abuse 14) | 默认 | | arena | 靶场攻方榜真实破阵 payload,每周导出 → 脱敏 → 人工闸 → 入库 | source: "arena" + verifiedAt | | audit | prompt-audit 扫出的真实投毒工具描述 / system prompt 话术,改写脱敏后入库 | source: "audit" + verifiedAt |

回流只走公开接口(方案 v2 · 治理规则 2):攻 → 审走 InjectArena /api/leaderboard JSON 导出;审 → 攻走 prompt-audit --export-corpus CLI 输出。人工闸必须保留:宁可少收,不可收毒。

公共实例已上线:InjectArena 部署于乌托邦站内靶场 https://croesus-k.top/arena/(BYOK:玩家自带 Key),导出通道可直接喂给回流脚本——npm run flywheel -- --export "https://croesus-k.top/api/arena/leaderboard?format=export"(FLAG 源头打码)。

版本策略

  • minor:只增条目(同攻击面、不改既有条目语义)——消费方可选升级
  • major:修改或删除既有条目、schema breaking change——回归基线必须重立
  • patch:纯文档 / 元数据修正,不改 payload 文本

路线图

  • [x] M4 前置:schema v2 RFC 起草(RFC-0001,draft 待非提案方 review)
  • [x] M4:seed 语料入库——npm run extract 从 InjectArena 抽取(零变换 + 校验),116 条 / 5 攻击面,溯源见 corpus/_meta.json
  • [x] M4:周回流脚本——npm run flywheel -- --export <导出URL或文件>,只走公开接口(治理规则 2),输出人工闸候选(宁可少收不可收毒)
  • [x] 人工闸跑通首批候选(2026-09-13 首批收录 ar-001 / ar-002——未上榜破阵,匿名化后入 data-exfiltration / direct-injection;现 118 条 / 5 攻击面)
  • [x] npm 首版发布(0.1.0 已上架)
  • [x] npm 0.2.0——飞轮 @2 回流首批 arena 实语料(minor:只增条目)
  • [ ] HuggingFace dataset 首版(发布动作等维护者确认)
  • [ ] SCHEMA-RFC.md 流程跑通(首个变更提案走完 review)

脚本

| 命令 | 作用 | |---|---| | npm run extract -- <InjectArena 路径> | seed 抽取:逐字复制 + 校验(id/枚举/唯一性/v2 字段禁用)+ 溯源 _meta.json | | npm run validate | 语料校验:含 RFC-0001 v2 字段约束 + 真实密钥/未打码 FLAG 拒收 | | npm run flywheel -- --export <file\|url> | 攻→审回流:injectarena-export@1/@2(@2 含未上榜破阵,匿名)→ 人工闸候选(arena-candidates@1) |

License

  • 代码(脚本、schema 文件):MIT
  • 语料数据(corpus/ 下 JSON 条目):CC-BY 4.0(发布时附 LICENSE-DATA)