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

@yottameta/yotta-learn

v0.2.1

Published

Yuanxi — a cross-agent learning-loop skill: captures mistakes, corrections and insights as reusable .learnings/ entries for later sessions and skill improvement. Triggers on command failure / user correction / a better approach / a missing capability / an

Readme

这是什么

AI 智能体最常见的浪费,是同一个错误在不同会话里反复犯。元习把「这次学到的」变成「下次可复用的」:把错误、纠正与洞见沉淀为项目内的 .learnings/ 条目,供后续会话回看、统计与复用。

它不是某个平台的专属功能,而是一份与智能体无关的 CLI 工具包:装进任何支持 Agent Skills 的智能体即可按需调用,只写你指定的 .learnings/ 目录,也不需要在 package.json 写依赖。

核心价值

  • 沉淀:log 命令把条目写入 .learnings/(LEARNINGS / ERRORS / FEATURE_REQUESTS),自动编号 + 时间戳。
  • 复用:list / review / stats 回看与统计;promote 把重要条目提升到 AGENTS.md / CLAUDE.md。
  • 改进:extract 由高价值条目生成新技能骨架;Pattern-Key 追踪复发模式。
  • 可联动:log --remember 可选同步到 yotta-memory(元忆),未安装/失败自动降级,绝不阻断本地记录。
  • 不覆盖:初始化绝不改动已有 .learnings/ 数据,旧格式条目可读。

核心优势

| 优势 | 说明 | |---|---| | 跨智能体 | .learnings/ 是项目内文件,Claude Code / Codex / Cursor 等共享同一份 | | Pattern-Key 复发追踪 | 同一模式多次出现即提示,把偶发错误升级为系统性改进点 | | 可联动可选 | 与元忆打通,但未安装/未初始化/失败自动降级 A/B/C,绝不阻断本地记录 | | 幂等初始化 | init 可重复执行,不覆盖已有条目 | | 自动去重 | promote / extract 自动去重,避免同一经验重复提升 | | 零依赖 | Python 3.8+ 标准库,无 daemon / 无数据库;Windows + Linux 通用 | | 生态分发 | GitHub + npm 双源同步发布;npx / git clone / Download ZIP / install.sh 四种安装方式 |

功能体系

| 命令 | 作用 | |---|---| | init | 初始化 .learnings/(幂等,不覆盖已有文件) | | log | 记录一条学习/错误/功能请求(自动生成 ID 如 LRN-20260826-001) | | list / review / stats | 回看、复审与统计条目 | | promote | 把重要条目提升到 AGENTS.md / CLAUDE.md(自动去重) | | extract | 由高价值条目生成新技能骨架(--dry-run 预览) | | log --remember | 可选同步到元忆(yotta-memory),未安装自动降级 |

数据协议

  • 目录:项目根 .learnings/(可用 --dir 指定)。
  • 文件:LEARNINGS.md(LRN-)、ERRORS.md(ERR-)、FEATURE_REQUESTS.md(FEAT-)。
  • ID:LRN/ERR/FEAT-YYYYMMDD-XXX(同一天自增)。
  • 字段:Logged / Priority / Status / Area / Pattern-Key;正文分 Summary 与 Details。
  • 兼容:已有用户数据保留,初始化绝不覆盖;旧格式条目可读。

使用示例

# 初始化 .learnings/(幂等,不覆盖已有文件)
python3 scripts/yotta_learn.py init

# 记录一条学习(自动生成 ID 如 LRN-20260826-001)
python3 scripts/yotta_learn.py log --type learning --category correction \
  --priority high --area git --pattern-key push-gate \
  --message "推送前必须先跑测试并核对输出"

# 记录一条错误(第二行起进入 Details)
python3 scripts/yotta_learn.py log --type error --priority critical \
  --message "第一行是摘要"$'\n'"第二行是详情"

# 列出 / 回看 / 统计
python3 scripts/yotta_learn.py list --status pending
python3 scripts/yotta_learn.py review
python3 scripts/yotta_learn.py stats

# 提升到 AGENTS.md / CLAUDE.md(自动去重)
python3 scripts/yotta_learn.py promote LRN-20260826-001

# 由条目生成技能骨架
python3 scripts/yotta_learn.py extract LRN-20260826-001 --slug my-skill --dry-run

# 可选:同步到元忆(yotta-memory),未安装自动降级
python3 scripts/yotta_learn.py log --message "..." --remember

exit code 语义:0 = 成功;1 = 未找到/无事可做;4 = 用法错误。 category 可选值correction / insight / knowledge_gap / best_practice / error / other;不确定时用 other

安装

以下四种方式任选,顺序即推荐优先级;技能文件一律从 npm 获取(GitHub 无代理较慢,npm 支持镜像)。

方式一:npm 一行装(推荐)

# 可选国内加速:npm config set registry https://registry.npmmirror.com
npx -y @yottameta/yotta-learn --agent <智能体名称>      # 装到指定智能体默认用户级技能目录
npx -y @yottameta/yotta-learn --dir <智能体的技能目录>  # 指到技能目录本身(如 ~/.codex/skills)
  • --agent <name> 自动装到该智能体默认用户级目录;--list 可查看各智能体默认目录。
  • --dir <路径> 装到指定的技能目录;未收录的智能体用 --dir 指到它的技能目录。
  • npmmirror 未同步新包(404):加 --registry=https://registry.npmjs.org/(国内需代理),或稍等镜像缓存。

方式二:git clone(开发者 / 有 git 环境)

git clone https://github.com/YottaMeta/yotta-learn.git <智能体的技能目录>/yotta-learn

方式三:GitHub 下载压缩包(手动 / 无 git 环境)

在 GitHub 仓库 YottaMeta/yotta-learnCode → Download ZIP,解压后把 yotta-learn 文件夹放进智能体技能目录。

方式四:install.sh(多智能体一键脚本)

bash install.sh --agent <name>   # 装到指定智能体默认用户级目录
bash install.sh --dir <path>     # 装到指定目录
bash install.sh --list           # 列出智能体 -> 默认目录

方式一走 npm 源(npmmirror / npmjs),不依赖 GitHub;方式二 / 三走 GitHub,国内无代理可能失败。

升级 / 卸载

  • 升级:重新安装最新版覆盖即可——重跑你用的安装命令(如 npx -y @yottameta/yotta-learn --agent <name>bash install.sh --agent <name>)。技能目录内旧文件会被替换;不影响项目中其他文件。
  • 卸载:删除目标智能体 skills 目录下的 yotta-learn 文件夹(各智能体目录见上表)即可。卸载后本技能不再生效。

常见问题

  • 会不会覆盖我已有的记录? 不会。init 是幂等的,绝不改动已有的 .learnings/ 数据;旧格式条目也能读。
  • 元忆没装,还能用吗? 能。log --remember 是可选增强;未安装 / 未初始化 / 失败时自动降级(A/B/C),只在本地 .learnings/ 记录,绝不阻断。
  • 会记录敏感信息吗? 默认不记录私密信息(令牌、密钥、环境变量值、完整源码);确有需要时建议用摘要或脱敏片段。
  • 适合哪些团队? 任何想避免「同一个错误反复犯」的智能体工作流,尤其是多智能体 / 多会话 / 多人协作场景。

相关技能

同属 YottaMeta 技能矩阵(学习与工程家族):yotta-memory(元忆,跨会话长期记忆)与元习互补——一个管「项目内 .learnings/ 学习闭环」,一个管「跨会话长期记忆」;anti-shallow(防敷衍)与 workflow-standard(工作流标准)从执行纪律端配合,避免「会沉淀却不严谨」。

开发与校验

本项目内运行:python tools/validate-skill.py yotta-learn

许可证

MIT © YottaMeta —— 详见 LICENSE。品牌声明见 NOTICE。来源说明:协议与设计参考开源社区 self-improving-agent 类技能思路,实现为 YottaMeta 自有。