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

kade-selfie

v2.0.1

Published

Add selfie superpowers to your OpenClaw agent using biaogeai API and Cloudflare R2

Readme

Kade Selfie 技能

English | 简体中文

说明:本项目基于 SumeLabs/clawra 二次开发,将图片生成从 fal.ai 迁移到 biaogeai API,并使用 Cloudflare R2 进行图片托管。

快速开始

npx kade-selfie@latest

这将自动完成:

  1. 检查 OpenClaw 是否已安装
  2. 引导你获取 biaogeai API 密钥
  3. 引导你设置 Cloudflare R2 用于图片托管
  4. 安装技能到 ~/.openclaw/skills/kade-selfie/
  5. 配置 OpenClaw 使用该技能
  6. 为你的代理添加自拍能力到 SOUL.md

功能介绍

Kade Selfie 让你的 OpenClaw 代理能够:

  • 生成自拍 - 使用固定的参考图保持形象一致
  • 发送照片 - 跨所有消息平台(Discord、Telegram、WhatsApp 等)
  • 视觉响应 - 回应"你在做什么"和"发张照片"等请求

自拍模式

| 模式 | 适用场景 | 关键词 | |------|---------|--------| | 镜像模式 | 全身照、穿搭 | wearing, outfit, fashion, 穿着 | | 直拍模式 | 近照、场景 | cafe, beach, portrait, smile, 咖啡馆 |

前置要求

手动安装

如果你更喜欢手动设置:

1. 获取 API 密钥

biaogeai API 密钥:从 biaogeai 获取你的 API 密钥。

Cloudflare R2 设置

  1. 登录 Cloudflare Dashboard
  2. 进入 R2 Objects → 创建存储桶(例如 kade-selfie
  3. 进入 R2 设置管理 R2 API 令牌 → 创建具有编辑权限的令牌
  4. 保存:访问密钥 ID、秘密访问密钥、账户 ID
  5. 配置公开访问(自定义域名或 r2.dev 子域名)

2. 克隆技能

git clone https://github.com/BiaogeAI002/kade-selfie ~/.openclaw/skills/kade-selfie

3. 安装依赖

cd ~/.openclaw/skills/kade-selfie
npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner

4. 配置 OpenClaw

添加到 ~/.openclaw/openclaw.json

{
  "skills": {
    "entries": {
      "kade-selfie": {
        "enabled": true,
        "env": {
          "IMAGE_GEN_API_KEY": "你的biaogeai_api密钥",
          "R2_ACCOUNT_ID": "你的cloudflare账户id",
          "R2_ACCESS_KEY_ID": "你的r2访问密钥id",
          "R2_SECRET_ACCESS_KEY": "你的r2秘密访问密钥",
          "R2_BUCKET": "kade-selfie",
          "R2_PUBLIC_BASE": "https://你的cdn域名.com"
        }
      }
    }
  }
}

5. 更新 SOUL.md

将自拍角色添加到 ~/.openclaw/workspace/SOUL.md

## Kade Selfie 能力

你有具体的外貌形象,可以拍自拍!
当用户要求看照片时,使用 kade-selfie 技能。

使用示例

安装完成后,你的代理可以响应:

"发张自拍"
"发一张戴着牛仔帽的照片"
"你现在在做什么?"
"给我看你在咖啡馆的样子"

参考图片

技能使用托管在 CDN 上的固定参考图片:

https://clash-verge.topvps.store/kade.png

这确保所有生成的图片保持一致的外观。

技术详情

  • 图片生成:biaogeai API(gemini-3-pro-image-preview)支持视觉参考
  • 图片托管:Cloudflare R2(S3 兼容对象存储,免费出站流量)
  • 消息发送:OpenClaw Gateway API
  • 支持平台:Discord、Telegram、WhatsApp、Slack、Signal、MS Teams

工作流程

用户输入 → biaogeai API(带参考图)→ base64 图片
                              ↓
                        上传到 Cloudflare R2
                              ↓
                          公开 URL
                              ↓
                    通过 OpenClaw 发送到消息平台

项目结构

kade-selfie/
├── bin/
│   └── cli.js              # npx 安装程序
├── skill/
│   ├── SKILL.md            # 技能定义
│   ├── scripts/            # 生成脚本
│   │   ├── clawra-selfie.ts
│   │   └── clawra-selfie.sh
│   └── assets/             # 参考图片
├── templates/
│   └── soul-injection.md   # 角色模板
├── scripts/                # 开发脚本
├── SKILL.md
└── package.json

环境变量

| 变量 | 必需 | 说明 | |-----|------|------| | IMAGE_GEN_API_KEY | 是 | biaogeai API 密钥 | | R2_ACCOUNT_ID | 是 | Cloudflare R2 账户 ID | | R2_ACCESS_KEY_ID | 是 | R2 API 访问密钥 ID | | R2_SECRET_ACCESS_KEY | 是 | R2 API 秘密访问密钥 | | R2_BUCKET | 是 | R2 存储桶名称 | | R2_PUBLIC_BASE | 是 | R2 存储桶公开访问基础 URL | | OPENCLAW_GATEWAY_URL | 否 | Gateway URL(默认:http://localhost:18789) | | OPENCLAW_GATEWAY_TOKEN | 否 | Gateway 认证令牌 |

常见问题

为什么需要 npm install?

安装程序使用 Node.js 编写,用户运行 npx kade-selfie@latest 时已经具备 npm 环境。AWS SDK 依赖会自动安装到技能目录,不影响系统其他部分。

能不用 R2 吗?

R2 用于托管生成的图片。 biaogeai API 返回的是 base64 格式,需要上传到对象存储才能获得可公开访问的 URL。

图片存储在哪里?

所有生成的图片存储在你自己的 Cloudflare R2 存储桶中,完全受你控制。

许可证

MIT