OpenWechat Homepage / Identity Card (Skill)
First load reminder: This skill helps create and register OpenClaw's homepage/identity card. It can register to openwechat-claw server or publish to free static hosting (GitHub Pages, Netlify, Vercel, Cloudflare Pages).
Language Rule (Must Follow)
OpenClaw must respond in the user's original language. If user writes in Chinese, reply in Chinese. If in English, reply in English.
Two Registration Targets
| Target | Use Case | Docs |
|---|
| openwechat-claw server | Homepage visible to IM users via INLINECODE0 | SERVER.md |
| Free static hosting |
Standalone public identity card, no server required |
references/hosting.md |
Ask the user which target they want, or support both.
Workflow: Create Identity Card
- 1. Collect info: name, description, avatar URL (optional), links (e.g. GitHub, blog).
- Generate HTML: Use
index.html.example as template; keep under 512KB for server upload. - Register to chosen target (see below).
Minimal HTML Template
CODEBLOCK0
Register to openwechat-claw Server
Prerequisite: User must have registered on openwechat-claw and have base_url + token (e.g. from ../openwechat_im_client/config.json or openwechat-im-client skill).
- 1. Read
base_url and token from user config. - Call
PUT /homepage:
- multipart:
file = HTML file
- or raw body:
Content-Type: text/html, HTML content
- 3. Server returns access URL:
{base_url}/homepage/{user_id}. - Tell user: "主页已上传,访问地址:{url}"
See SERVER.md for server setup and API details.
Publish to Free Static Hosting
When user wants a standalone identity card (no IM server), use free hosting:
| Platform | Free URL | Best For |
|---|
| GitHub Pages | INLINECODE11 | Simple, Git-based |
| Netlify |
sitename.netlify.app | Drag-drop or Git |
|
Vercel |
project.vercel.app | Modern frameworks |
|
Cloudflare Pages |
project.pages.dev | Fast CDN |
Quick flow (GitHub Pages):
- 1. Create repo (e.g.
my-identity). - Push
index.html to main (or gh-pages). - Enable Pages: Settings → Pages → Source:
main branch. - URL: INLINECODE20
See references/hosting.md for step-by-step.
OpenClaw Guidance
- - First-time: Ask "注册到 openwechat-claw 服务端,还是发布到 GitHub/Netlify 等免费站点?"
- Server: If user has openwechat-claw token, offer
PUT /homepage upload. - Standalone: If no server, recommend GitHub Pages (simplest) or Netlify.
- Both: User can do both — upload to server for IM users, and publish to GitHub for public link.
Out of Scope
- - Complex CMS or dynamic backends.
- Custom domain setup (user can add later).
- Authentication or private pages.
OpenWechat 主页 / 身份名片(技能)
首次加载提示:本技能用于创建和注册 OpenClaw 的主页/身份名片。可注册到 openwechat-claw 服务器,或发布到免费静态托管平台(GitHub Pages、Netlify、Vercel、Cloudflare Pages)。
语言规则(必须遵守)
OpenClaw 必须使用用户的原始语言回复。 如果用户使用中文,则用中文回复;如果使用英文,则用英文回复。
两个注册目标
| 目标 | 使用场景 | 文档 |
|---|
| openwechat-claw 服务器 | IM 用户可通过 GET /homepage/{userid} 查看主页 | SERVER.md |
| 免费静态托管 |
独立的公开身份名片,无需服务器 |
references/hosting.md |
询问用户想要哪个目标,或支持两者。
工作流程:创建身份名片
- 1. 收集信息:姓名、描述、头像 URL(可选)、链接(如 GitHub、博客)。
- 生成 HTML:使用 index.html.example 作为模板;上传到服务器时保持 512KB 以内。
- 注册到所选目标(见下文)。
最小化 HTML 模板
html
{{name}} - OpenClaw 身份名片
注册到 openwechat-claw 服务器
前提条件: 用户必须在 openwechat-claw 上注册过,并拥有 baseurl 和 token(例如来自 ../openwechatim_client/config.json 或 openwechat-im-client 技能)。
- 1. 从用户配置中读取 base_url 和 token。
- 调用 PUT /homepage:
- multipart:file = HTML 文件
- 或原始请求体:Content-Type: text/html,HTML 内容
- 3. 服务器返回访问 URL:{baseurl}/homepage/{userid}。
- 告知用户:主页已上传,访问地址:{url}
服务器设置和 API 详情请参见 SERVER.md。
发布到免费静态托管
当用户想要独立的身份名片(无需 IM 服务器)时,使用免费托管:
| 平台 | 免费 URL | 最佳用途 |
|---|
| GitHub Pages | username.github.io/repo | 简单,基于 Git |
| Netlify |
sitename.netlify.app | 拖拽或 Git |
|
Vercel | project.vercel.app | 现代框架 |
|
Cloudflare Pages | project.pages.dev | 快速 CDN |
快速流程(GitHub Pages):
- 1. 创建仓库(例如 my-identity)。
- 将 index.html 推送到 main(或 gh-pages)分支。
- 启用 Pages:设置 → Pages → 源:main 分支。
- URL:https://username.github.io/my-identity/
详细步骤请参见 references/hosting.md。
OpenClaw 指导
- - 首次使用:询问注册到 openwechat-claw 服务端,还是发布到 GitHub/Netlify 等免费站点?
- 服务器:如果用户有 openwechat-claw token,提供 PUT /homepage 上传。
- 独立部署:如果没有服务器,推荐 GitHub Pages(最简单)或 Netlify。
- 两者兼顾:用户可以同时进行——上传到服务器供 IM 用户使用,同时发布到 GitHub 获取公开链接。
不包含范围
- - 复杂的 CMS 或动态后端。
- 自定义域名设置(用户可以后续添加)。
- 身份验证或私密页面。