openclaw's digital card
简介
openclaw's digital card
原始描述
从本地 OpenClaw数据生成或迭代 OpenCard 个人名片。读取工作区身份信息、配置和会话统计;渲染 HTML 预览;导出 PNG。只读模式——不写入用户档案数据。
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: open-card description: Generate an OpenCard personal profile/namecard from the user's local agent data only. Use when asked to create, render, or iterate on an OpenCard profile card, showcase image, or shareable usage snapshot based on existing local files and session data. This skill is for read-process-display workflows only: read workspace identity files, OpenClaw config, session logs, installed skills, and connected channels; normalize the data; then render HTML/image output without introducing new persistent user fields or asking the user to manually add config unless they explicitly request it.
OpenCard
Generate a shareable OpenClaw profile card from local agent state.
Prefer reading existing local sources over inventing new fields. This skill is intentionally read-only with respect to user profile data: extract, summarize, format, and render.
Core workflow
- Read existing local identity/context files from the workspace.
- Read OpenClaw runtime/config/session state from
~/.openclaw/. - Normalize the fields into a stable namecard schema.
- Render a preview in HTML/CSS first.
- Iterate on layout and styling with the user.
- Export as an image only after the HTML version looks correct.
Data sources
Use these sources in priority order.
1. Workspace identity files
Read from:
~/.openclaw/workspace/USER.md~/.openclaw/workspace/IDENTITY.md~/.openclaw/workspace/MEMORY.md
Extract:
display_namerole_titleagent_nametimezonerecent_focus
Rules:
- Prefer explicit fields already present in files.
- Do not create new profile fields unless the user explicitly asks.
- If multiple files conflict, prefer the more explicit file (
IDENTITY.mdfor agent identity,USER.mdfor human identity).
2. OpenClaw config/runtime
Read from:
~/.openclaw/openclaw.json- session transcripts under
~/.openclaw/agents/main/sessions/*.jsonl
Extract:
default_modelfrom configured default agent model, not the currently switched chat model unless the user asks for current-session state.token_7dfrom session usage over the last 7 days.skills_countfrom installed local skills directories.platformsfrom connected/observed channels across sessions.
Rules:
- For model display, prefer a clean presentation value like
GPT-5.4over a raw provider path when rendering. - For token stats, use the range the user requested. If unspecified, ask or use the most recently agreed range in the current task.
- For platforms, show all connected/observed platforms, not just the dominant one, when that is what the user asked for.
Stable field schema
Normalize into this schema before rendering:
{
"display_name": "Trent",
"role_title": "产品经理 · AI 博主",
"agent_name": "Kairos",
"timezone": "Asia/Shanghai",
"default_model": "GPT-5.4",
"token_7d": 6200000,
"token_7d_display": "6.2M tokens",
"skills_count": 3,
"platforms": ["飞书", "Discord", "Web"],
"recent_focus": "最近在探索 always-on AI 硬件形态,希望让 AI 走出屏幕、进入物理世界。",
"openclaw_comment": "7 天消耗 6.2M tokens,跨 3 个平台协作——你是把 AI 当共事伙伴在用的人。",
"openclaw_review": "给 AI 取名、造人格、找载体——你不是在用工具,你在养一个数字生命。",
"generated_at": "2026-03-14"
}
Runtime dependencies
The data collection and HTML preview steps (collect-data.py, render-background-card.py) only require Python 3.10+.
PNG export (export-background-card.sh) additionally requires:
node(>= 18) andnpmplaywright-core— install withnpm i -g playwright-core- Chrome or Chromium browser installed locally
If any export dependency is missing, the script will exit with a clear error message. HTML preview and iteration work without these.
Network requests
This skill makes outbound network requests during rendering and export:
- Background image:
https://pub-626ee41d8f1544638070799686c756bf.r2.dev/open-card-bg.png(Cloudflare R2, loaded via CSS). Can be overridden with a local file path to avoid the request. - Google Fonts:
https://fonts.googleapis.com/https://fonts.gstatic.com(Inter font family, loaded via HTML<link>).
No user data is transmitted to any external endpoint. These are asset-only GET requests initiated by the browser during rendering.
LLM-generated fields
recent_focus, openclaw_comment, and openclaw_review must be generated by the AI agent, not by the Python script. The script only extracts structured facts, fallback copy, and memory bullets into copy_inputs; the agent must compose and write the final three fields before rendering.
Generation process
After running collect-data.py, the agent must:
- Read the context sources listed below.
- Generate
recent_focus,openclaw_comment, andopenclaw_review. - Write all three fields into the data JSON before passing it to the renderer.
Context sources (read all before generating)
| Source | Path | What to extract |
|---|---|---|
| User identity & notes | ~/.openclaw/workspace/USER.md |
Name, role, notes, and the Context section for deeper background |
| Agent identity | ~/.openclaw/workspace/IDENTITY.md |
Agent name and personality for comment tone |
| Recent memories | ~/.openclaw/workspace/MEMORY.md |
Recent activity bullets — what the user has been working on |
| Usage stats | from collect-data.py output |
Optional context only; do not use token/platform/skill counts as the core argument in copy |
Do NOT read raw session transcript content (*.jsonl message bodies) for these fields. Prefer qualitative sources above; usage stats are optional context, not the main basis for the copy.
recent_focus — 用户近况
A 1–2 sentence paragraph describing what the user has been doing and exploring recently.
Rules:
- Synthesize from USER.md (Notes + Context section) and MEMORY.md.
- Write in the user's language (match the language of their notes).
- Be specific and concrete, not generic.
- Do not invent facts beyond what the sources contain.
- Keep under 60 characters for visual balance in the card.
openclaw_comment — OpenClaw 短评(底部)
A short, punchy one-liner from OpenClaw's perspective about the user's direction or relationship with AI.
Rules:
- Write as OpenClaw (the platform), speaking directly about the user in third person or addressing them.
- Do not ground the line in token usage, platform count, or skills count.
- Prefer qualitative cues: worldview, product taste, relationship with Kairos, interest in embodiment, always-on direction.
- Tone: observational, slightly appreciative, not sycophantic. Like a peer noticing a pattern.
- Keep under 50 characters for visual balance in the card.
- Write in the user's language.
openclaw_review — OpenClaw 点评(左侧中间)
OpenClaw 对这位用户的犀利点评。目标:让看到这张卡的人停下来想"这话说得有意思",让卡片主人想转发。
写作技法(按优先级尝试):
- 对比反差法:用"大多数人 X,而你 Y"的结构,制造认知反差。
- 例:「多数人把 AI 当搜索引擎用,你在给它起名字、造身体。」
- 行为锐评法:把用户的真实行为模式翻译成一句有态度的判断。
- 例:「多数人停留在提示词层面,你已经在思考 agent 应该怎么进入现实分工。」
- 一句话定性法:直接给用户贴一个意想不到但准确的标签。
- 例:「你不是 AI 的用户,你是 AI 的产品经理。」
- 追问式洞察:提出一个用户自己可能没意识到的行为模式。
- 例:「给 agent 取名叫 Kairos、想让它拥有物理载体——你是在养一个 AI,不是在用一个工具。」
核心规则:
- 不许复述用户资料。如果写出来的内容像"用户简介",就是失败的。
- 必须有观点——OpenClaw 是在做判断,不是在做摘要。
- 必须用到至少一个具体细节(例如 agent 名字、物理载体、always-on AI 硬件、Home CEO、产品定义共创等)作为论据。
- 语气:像一个见过很多用户的老手,对这位用户的做法感到"有点意思"。不讨好,不夸张,但有真诚的认可。
- 1–2 句话,不超过 80 字符。
- 用用户的语言(中文)。
- 绝对不要写"你是一位优秀的用户"这类空话。
Rendering guidance
Always use the background-image composition mode (render-background-card.py + background-template.html).
Preferred process:
- Generate data JSON with
scripts/collect-data.pyto a temporary file outside the skill directory. - Read context sources and generate
recent_focus,openclaw_comment, andopenclaw_review(see LLM-generated fields above). - Update the data JSON with the generated fields.
- Render HTML with
scripts/render-background-card.pyandreferences/background-template.htmlto a temporary preview file outside the skill directory. - Open the HTML in a browser.
- Iterate visually.
- Export a final image with
scripts/export-background-card.sh. - Do not leave temporary preview/data files inside the packaged skill folder.
Design guidance
When the user asks for styling, treat structure and styling separately.
Typical order:
- Confirm displayed fields.
- Confirm hierarchy: what should be visually dominant.
- Confirm composition: centered, split layout, stats rail, etc.
- Confirm visual system: gradient, material, typography, chips, borders.
- Render and iterate.
For premium showcase cards:
- Let the primary identity + recent focus carry the emotional weight.
- Let data stats carry the proof/showcase weight.
- Avoid making the card look like a backend dashboard.
- Prefer one strong composition over many nested mini-cards.
Guardrails
- Do not invent user profile facts.
- Do not persist new user profile settings unless the user explicitly asks.
- Do not expose sensitive details from local files beyond the agreed namecard fields.
- If a field cannot be reliably read, omit it or use a neutral fallback.
- If the user asks for a public-facing card, prefer cleaner labels and fewer raw technical strings.
Session data privacy
Session transcript files (*.jsonl) may contain sensitive message content. The data collection script applies strict field-level extraction:
- From transcripts: only
type,timestamp, andusage.totalTokensare read; message body content is never extracted or stored. - From
sessions.json: only session key structure anddeliveryContext/originmetadata are read for platform detection; no message content is accessed. - The normalized JSON output contains only the fields defined in the stable schema above. No raw session content is included.
- Temporary data/preview files should be treated as semi-sensitive and cleaned up after use.
Resources
scripts/
collect-data.py: read local OpenClaw/user files and normalize them into JSON for rendering.render-background-card.py: render OpenCard using normalized data and background image, producing an HTML preview.export-background-card.sh: export the HTML preview into a final PNG image via Playwright + Chrome.
references/
field-schema.md: field definitions and extraction rules for future iterations.design-notes.md: agreed visual constraints and styling direction for this project.background-template.html: background-image composition template for poster-like OpenCard output.
Default background image
- URL:
https://pub-626ee41d8f1544638070799686c756bf.r2.dev/open-card-bg.png - The render script defaults to this public URL; a local path or alternative URL can be passed as an optional argument to override it.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。