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

ts-abbr-skill

v1.2.1

Published

Agent skill (Claude Code, Codex, and more) that applies a configurable abbreviation dictionary (business→biz, context→ctx, ...) to TypeScript variable/parameter naming.

Readme

ts-abbr-skill

一个 Agent Skill,让生成/重构的 TypeScript 代码命名遵循统一的缩写词典(businessbizcontextctxconfigurationcfg 等),而不是冗长的全称。支持 Claude CodeCodex,以及 skills CLI 支持的所有 agent

安装

方式 A — 通用安装器(推荐)

通过 skills 支持 Claude Code、Codex 及 70+ 其他 agent:

npx skills add aShu-guo/ts-abbr-skill

方式 B — 专属安装器

npx ts-abbr-skill

会依次询问要为哪些 agent 安装(Claude Code、Codex,可多选)以及装到哪里:

| Agent | 项目级路径 | 全局路径 | |-------|-----------|---------| | Claude Code | ./.claude/skills/ts-abbr-skill/ | ~/.claude/skills/ts-abbr-skill/ | | Codex | ./.agents/skills/ts-abbr-skill/ | ~/.codex/skills/ts-abbr-skill/ |

项目级推荐团队共享,提交到仓库;全局适用于你所有的项目。

重复运行安装器是安全的:目标路径下已存在的 config/default.config.jsondictionary/default.json 不会被覆盖。

效果

  • 生成新代码时:agent 在命名局部变量/参数之前查缩写词典,有匹配则使用缩写形式。
  • 重构已有代码时:批量改名强制走基于 AST 的重命名脚本(ts-morph),不允许纯文本替换,避免误改字符串字面量和跨作用域同名变量。改名后必须跑 tsc --noEmit 校验,不通过不算完成。

完整规则见 skills/ts-abbr-skill/SKILL.md

内置词典摘录

| 全称 | 缩写 | |------|------| | business | biz | | context | ctx | | configuration / config | cfg | | parameter / parameters | param / params | | response | res | | request | req | | temporary | tmp | | reference | ref | | element | el | | repository | repo | | database | db | | application | app | | ... | ... |

完整词典见 skills/ts-abbr-skill/dictionary/default.json

自定义

调整生效范围 — 修改安装目录里的 config/default.config.json

{ "scope": ["variable", "parameter"], "exported": false }

scope 可选值:variableparameterlocalFunctionclassexported 控制是否对导出/公共符号生效(默认 false)。

添加项目专属缩写 — 在仓库根目录放 .ts-abbr-skill.local.json,词条会合并覆盖默认词典:

{
  "warehouse": "wh",
  "department": "dept"
}

本地开发

npm install
npm run build        # 构建 src/cli.ts -> dist/cli.js
node dist/cli.js     # 本地测试安装器

迭代调试 Skill 内容时,用 symlink 代替每次重新构建:

ln -sfn /path/to/ts-abbr-skill/skills/ts-abbr-skill \
  your-test-project/.claude/skills/ts-abbr-skill

License

MIT