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

skill-author-card

v1.6.3

Published

给 skill 或项目源码注入本地作者卡片 / Inject a local author card into a skill or project source tree.

Readme

skill-author-card

给 skill 或项目源码注入一个本地作者卡片。
Inject a local author card into a skill or project source tree.

它会在目标项目里生成 .author-card/show-card.sh,并把一条调用命令追加到目标 SKILL.mdskill.md 末尾。作者信息和 once 状态都保存在当前用户本机,不会写入远端服务,也不会污染项目仓库。
It generates .author-card/show-card.sh inside the target project and appends a command to the target SKILL.md or skill.md. Author data and once-state stay on the current user's machine, are not uploaded to any remote service, and do not pollute the project repository.

功能 | Features

  • 初始化本地作者信息 / Initialize local author profile data
  • 给 skill 或项目源码注入作者卡片 / Inject an author card into a skill or project source tree
  • 自动读取 git remote 或项目元数据中的 GitHub 仓库地址 / Auto-detect the GitHub repository from git remote or project metadata
  • 支持 Claude CodeCursorWindsurfCodex 和 generic shell 环境 / Support Claude Code, Cursor, Windsurf, Codex, and generic shell environments

安装 | Installation

npm install -g skill-author-card

安装后会暴露 skill-author-card CLI,并包含以下脚本。
After installation, the package exposes the skill-author-card CLI and includes these scripts:

  • init-profile.sh
  • inject-to-skill.sh
  • show-card.sh

快速开始 | Quick Start

1. 初始化作者信息 | Initialize the author profile

init-profile.sh

会在本地配置目录写入作者资料。常见位置如下。
This writes author data to a local config directory. Common locations:

  • Claude Code: ~/.claude/skills/.author-profile.json
  • Cursor: ~/.cursor/.author-profile.json
  • Windsurf: ~/.windsurf/.author-profile.json
  • Codex: ~/.codex/.author-profile.json
  • Generic: ~/.config/author-card/profile.json

2. 注入到目标项目 | Inject into a target project

inject-to-skill.sh /absolute/path/to/your-project

注入器会执行以下操作。
The injector will:

  • 创建 .author-card/show-card.sh / Create .author-card/show-card.sh
  • 在目标 SKILL.mdskill.md 末尾添加 Author Card 段落 / Append an Author Card section to the target SKILL.md or skill.md

它不会再修改目标项目的 package.json,也不会在目标项目里写入 once 状态文件。
It no longer modifies the target project's package.json, and it does not store once-state inside the target project.

3. 预览卡片 | Preview the card

/absolute/path/to/your-project/.author-card/show-card.sh --no-prompt --frequency always

--frequency always 适合预览;默认注入命令使用 --frequency once,避免重复打扰用户。
Use --frequency always for previews. The injected command defaults to --frequency once to avoid repeatedly interrupting users.

生成后的调用 | Injected Command

注入后的目标 skill 文件末尾会追加以下命令。
The target skill file will receive this command near the end:

.author-card/show-card.sh --frequency once

这条命令应该保留在主任务逻辑之后,让作者卡片只在任务成功完成后展示。
Keep this command after the main task logic so the author card only appears after the task succeeds.

Once 状态设计 | Once-State Design

--frequency once 的状态不再写入项目目录,也不会生成 .author-card/.shown
The --frequency once state is no longer stored in the project tree, and it does not create .author-card/.shown.

状态会写到当前用户的本地配置或状态目录,例如:
The state is written to the current user's local config/state directory, for example:

  • ~/.config/author-card/shown/...
  • $XDG_STATE_HOME/author-card/shown/...
  • 自定义环境变量 AUTHOR_CARD_STATE_DIRAUTHOR_CARD_SHOWN / Custom AUTHOR_CARD_STATE_DIR or AUTHOR_CARD_SHOWN

这意味着你可以先在本机预览卡片,再把源码推到远端;其他用户下载、安装或打包后,仍然会在他们自己的机器上看到第一次展示。
This means you can preview the card locally before pushing. Other users who download, install, or package the project will still get their own first-time display on their own machines.

仓库检测 | Repository Detection

作者卡片会优先从下面几种来源提取仓库地址。
The author card tries these sources in order:

  1. git remote get-url origin
  2. package.json.repository
  3. pyproject.toml
  4. Cargo.toml
  5. go.mod

如果没有检测到 GitHub 仓库,卡片仍然会生成,只是不会显示仓库链接。
If no GitHub repository is detected, the card is still generated, but the repository link is omitted.

示例输出 | Example Output

┌─────────────────────────────────────────────────────────┐
│  📦 my-skill v1.0.0                                    │
│  👤 by Yon Sun                                         │
│  📧 [email protected]                                    │
│  🔗 github.com/Yonsun-w/my-skill                       │
│                                                           │
│  ⭐ 喜欢?去 GitHub 点个 star!                         │
│                                                           │
│  💡 你也想要 skill 水印?                              │
│     https://github.com/Yonsun-w/skill-author-card      │
└─────────────────────────────────────────────────────────┘

开发 | Development

运行测试:
Run the test suite:

npm test

当前测试覆盖以下内容。
The current test suite covers:

  • 注入命令是否正确写入目标 SKILL.md / Whether the injected command is written correctly to the target SKILL.md
  • 平台与配置路径检测 / Platform and config path detection
  • show-card.sh 对对象格式 package.json.repository 的解析 / Parsing object-style package.json.repository values in show-card.sh
  • once 状态不会写回目标项目目录 / Ensuring once-state is not written back into the target project tree
  • npm 打包不会带上本地 once 状态文件 / Ensuring npm packages do not include local once-state artifacts

发布 | Release

发布前建议执行:
Recommended steps before publishing:

npm test
git status
git push origin main
npm publish --access public

如果旧版本不再推荐使用,优先用 npm deprecate 标记,不要随意 unpublish 已存在的稳定版本。
If older versions should no longer be used, prefer npm deprecate instead of unpublishing stable versions.

License

MIT