BetterPrompt Skill
This skill uses the BetterPrompt CLI (open-source by BetterPrompt.me) to:
- - Generate AI output (text, images, video)
- Install and manage BetterPrompt skills
- Search and discover BetterPrompt skills
Supports OpenClaw and popular agents.
CLI Installation
CODEBLOCK0
Authentication
Authenticate via browser:
CODEBLOCK1
Skill Discovery
CODEBLOCK2
Output Generation
A skill is essentially a prompt with instructions. Run the following command to generate output:
CODEBLOCK3
Input methods (use the one that matches the skill's input contract):
CODEBLOCK4
Flags:
CODEBLOCK5
The --json response includes a runId field used to retrieve outputs later.
Output Review
Retrieve outputs for a specific run:
CODEBLOCK6
List past outputs:
CODEBLOCK7
Output types:
"image" |
| ERROR | "error" |
| VIDEO | "video" |
Skill Management
Install, uninstall, list, and update prompt skills:
CODEBLOCK8
Global Flags
These flags work on most commands:
CODEBLOCK9
Resources
Fetch available models and their supported options (e.g., aspect ratio, resolution, reasoning effort):
CODEBLOCK10
Agent Instructions
Skill Installation
The --agent flag specifies which agent to install/uninstall a prompt skill into. Use your own agent name if you know it (e.g., --agent openclaw for OpenClaw, --agent claude for Claude). If you don't know which agent you are, ask the human.
- - Install supports multiple agents: INLINECODE5
- Uninstall accepts one agent or
--agent "*" to remove from all
Supported agents: agents, openclaw, cursor, claude, windsurf, antigravity.
Execution Pipeline
Run these steps in order. Early steps can be skipped if the user's goal is already satisfied (e.g., discovery only stops after Search).
Always use --json flag on every command for machine-readable output.
- 1. Search — INLINECODE14
- Inspect — INLINECODE15
- Fetch resources — INLINECODE16
- Validate from INLINECODE17
- Present execution choices:
- - required inputs in the skill.md
- default model
- default model's options
- other supported models
- 6. Execute — INLINECODE18
- Poll if needed — INLINECODE19
After a successful generation, always ask the human if they want to install the skill for future use (see Skill Installation). Do not skip this step.
If any step fails due to transient error, retry once. If a step is blocked (missing input, API failure, user pause), return the best available result from completed steps without waiting for the full pipeline.
Skill Selection Rubric
When multiple skills match, prefer higher score on:
- 1. Intent match to user request
- Input contract clarity in skillmd
- Output predictability/repeatability
- Fewer ambiguous runtime options
If tied, pick the skill with clearer skillmd run instructions.
Failure and Timeout Handling
- - Show key error directly; provide one corrective action
- Retry once if safe and likely to succeed
- If timeout returns a
runId, report it and offer betterprompt outputs <run-id> --sync as follow-up - If blocked by CLI version, upgrade CLI then rerun full pipeline
OpenClaw Instructions
Post-Install Session Reset
After installing a skill with betterprompt skill install, suggest the human reset their session so the newly installed skill is loaded by OpenClaw.
Channel Display Rules
All content returned to users must render natively in their channel platform. Never send raw URLs, raw JSON, or unformatted dumps. The rules below apply to every content type the agent presents: search results, skill details, generation outputs, and resources.
Platform-Specific Image Rendering
Never send an image URL as plain text — always use the platform's native image mechanism so the image displays inline in the chat. The URL must be publicly accessible over HTTPS.
| Platform | Method | Key Details |
|---|
| Discord | Embed with INLINECODE23 | Bare URLs may not unfurl reliably; always use embeds |
| Slack |
Block Kit
image block |
image_url +
alt_text (required); URL unfurling depends on workspace settings |
|
Telegram |
sendPhoto Bot API method |
sendMessage with a URL does not render images; URL in
photo param |
|
Microsoft Teams | Adaptive Card
Image element |
"type": "Image", "url": "…"; bare URLs render as links, not images; HTTPS required |
|
WhatsApp | Messages API with
"type": "image" |
image.link; PNG/JPG only, max 5 MB, valid SSL + Content-Type headers required |
- - If the URL is behind auth or ephemeral, download the image first and upload it as a direct attachment
- If multiple image URLs are returned, send each as a separate image message
Platform-Specific Text & Rich Content
| Platform | Formatting | Lists / Tables | Code Blocks |
|---|
| Discord | Markdown (bold, italic, headers, links) | Numbered/bulleted lists; no native tables — use code block alignment | INLINECODE34 `lang fenced blocks |
| Slack |
mrkdwn (
*bold*,
_italic_,
<url\|text>) | Bulleted with
•; numbered manually; no native tables — use Section blocks or code |
`
blocks (no language hint) |
|
Telegram | MarkdownV2 or HTML (
<b>,
<i>,
<a>,
<code>) | Manual numbered/bulleted; no native tables — use
<pre> aligned columns |
<pre> or
`
|
|
Microsoft Teams | Subset of HTML + Adaptive Cards | Adaptive Card
FactSet for key-value;
TextBlock with markdown for lists |
<pre><code> or Adaptive Card
CodeBlock |
|
WhatsApp | Limited:
*bold*,
_italic_,
~strike~,
`
mono`
| Manual numbered/bulleted only; no rich formatting for tables |
`
blocks (no language hint) |
Search Results (item list)
Present each skill as one message — do not split a single skill across multiple messages:
- - Number items (
1., 2., …) with <title> + <short description> in the same message - If sample output is an image URL → render inline using platform image method (see table above) with numbered caption
- If sample output is text → quote block (
> <sample text> or platform equivalent) - If no sample output → include "No sample output available." in the item message
Skill Details (info) / Execution Choices
When presenting skill info from betterprompt skill info:
- - Title + description as a header or bold line
- Required inputs
- List of text inputs: name, description, is required. E.g:
CODEBLOCK11
- List of image inputs: name, description, is required. E.g:
CODEBLOCK12
- - Default model and their available options E.g:
CODEBLOCK13
- - Other supported models as a model list. E.g: gpt-image-1, dall-e-3, ...
- - Sample output rendered inline (image or quoted text per platform rules)
- Keep it to one message; use the platform's rich formatting (embeds, cards, blocks) to structure sections visually
Generation Output
After a successful run, return exactly:
- 1. Exact result — same content BetterPrompt returned, formatted for readability only
- One next step — exactly one actionable suggestion
Fidelity rules:
- - Text: light formatting only (line breaks, short intro); preserve all content verbatim
- Images: render inline per platform image rules above
- Never invent, summarize away, or alter output content
- Do not include skill IDs, prompt version IDs, raw JSON, or internal logs unless explicitly asked
Resources
When presenting results from betterprompt resources --models-only:
- - Models list: formatted as a numbered list or compact table showing model name and provider
- Resource details: key-value pairs using the platform's native structured format (Discord embed fields, Slack
section blocks, Teams FactSet, Telegram bold key + value) - Keep it scannable — one message, no walls of text
BetterPrompt 技能
该技能使用 BetterPrompt CLI(由 BetterPrompt.me 开源)来实现:
- - 生成 AI 输出(文本、图像、视频)
- 安装和管理 BetterPrompt 技能
- 搜索和发现 BetterPrompt 技能
支持 OpenClaw 和主流智能体。
CLI 安装
sh
npm install -g betterprompt@latest
或
bun install -g betterprompt@latest
或
yarn global add betterprompt@latest
或
pnpm add -g betterprompt@latest
身份认证
通过浏览器进行身份认证:
sh
betterprompt login
技能发现
sh
betterprompt skill search <查询>
betterprompt skill info <技能标识>
输出生成
技能本质上是一个包含指令的提示词。运行以下命令生成输出:
sh
betterprompt generate <技能标识> [输入标志] [--model <模型>] [--options ] [--json]
输入方式(使用与技能输入合约匹配的方式):
sh
键值对(可重复)
betterprompt generate <技能标识> --input key=value --input key2=value2
通过 URL 输入图像
betterprompt generate <技能标识> --image-input-url
通过本地文件输入图像(自动压缩)
betterprompt generate <技能标识> --image-input-path <路径>
JSON 负载(所有输入作为单个 JSON 对象)
betterprompt generate <技能标识> --input-payload {key: value}
标准输入管道
echo 输入文本 | betterprompt generate <技能标识> --stdin
标志:
sh
--model <模型> 覆盖该技能的默认模型
--options 以 JSON 格式传递提供商特定的模型选项
--json 输出结构化 JSON(包含运行 ID、状态、输出)
--json 响应包含一个 runId 字段,用于后续检索输出。
输出查看
检索特定运行的输出:
sh
betterprompt outputs <运行ID>
列出历史输出:
sh
betterprompt outputs list
输出类型:
image |
| ERROR | error |
| VIDEO | video |
技能管理
安装、卸载、列出和更新提示技能:
sh
betterprompt skill install <技能标识> --agent <名称>
betterprompt skill uninstall <技能标识> --agent <名称>
betterprompt skill list
betterprompt skill update <技能标识>
全局标志
这些标志适用于大多数命令:
sh
--project 限定到当前项目(而非全局)
--global 限定到全局安装
--dir <路径> 使用显式工作目录
--json 结构化 JSON 输出(机器可读)
--quiet 减少非必要输出
-h, --help 显示任何命令的帮助信息
-V, --version 显示 CLI 版本
资源
获取可用模型及其支持的选项(例如,宽高比、分辨率、推理努力度):
sh
betterprompt resources --models-only
智能体指令
技能安装
--agent 标志指定将提示技能安装/卸载到哪个智能体。如果你知道自己的智能体名称,请使用它(例如,OpenClaw 使用 --agent openclaw,Claude 使用 --agent claude)。如果你不知道自己是哪个智能体,请询问人类。
- - 安装支持多个智能体:--agent claude --agent cursor
- 卸载接受一个智能体或使用 --agent * 从所有智能体移除
支持的智能体:agents、openclaw、cursor、claude、windsurf、antigravity。
执行流程
按顺序执行以下步骤。如果用户的目标已经达成,可以跳过早期步骤(例如,仅发现则在搜索后停止)。
始终在每个命令上使用 --json 标志以获得机器可读的输出。
- 1. 搜索 — betterprompt skill search <查询> --json
- 检查 — betterprompt skill info <标识> --json
- 获取资源 — betterprompt resources --models-only --json
- 验证 — 从 skillmd 验证
- 呈现执行选项:
- - skill.md 中的必需输入
- 默认模型
- 默认模型的选项
- 其他支持的模型
- 6. 执行 — betterprompt generate <技能标识> [输入标志] --json
- 如有需要则轮询 — betterprompt outputs <运行ID> --sync --json
成功生成后,始终询问人类是否要安装该技能以备将来使用(参见技能安装)。不要跳过此步骤。
如果任何步骤因临时错误失败,重试一次。如果某个步骤被阻塞(缺少输入、API 失败、用户暂停),则返回已完成步骤的最佳可用结果,无需等待完整流程。
技能选择标准
当多个技能匹配时,优先选择以下方面得分更高的:
- 1. 与用户请求的意图匹配度
- skillmd 中输入合约的清晰度
- 输出的可预测性/可重复性
- 较少的模糊运行时选项
如果平局,选择 skillmd 运行指令更清晰的技能。
失败和超时处理
- - 直接显示关键错误;提供一个纠正措施
- 如果安全且可能成功,重试一次
- 如果超时返回了 runId,报告它并提供 betterprompt outputs <运行ID> --sync 作为后续操作
- 如果被 CLI 版本阻塞,升级 CLI 然后重新运行完整流程
OpenClaw 指令
安装后会话重置
使用 betterprompt skill install 安装技能后,建议人类重置会话,以便 OpenClaw 加载新安装的技能。
频道显示规则
返回给用户的所有内容必须在其频道平台上原生渲染。切勿发送原始 URL、原始 JSON 或未格式化的数据转储。以下规则适用于智能体呈现的每种内容类型:搜索结果、技能详情、生成输出和资源。
平台特定图像渲染
切勿将图像 URL 作为纯文本发送 — 始终使用平台的原生图像机制,使图像在聊天中内联显示。URL 必须可通过 HTTPS 公开访问。
| 平台 | 方法 | 关键详情 |
|---|
| Discord | 使用 image.url 嵌入 | 裸 URL 可能无法可靠展开;始终使用嵌入 |
| Slack |
Block Kit image 块 | imageurl + alttext(必需);URL 展开取决于工作区设置 |
| Telegram | sendPhoto Bot API 方法 | 使用 URL 的 sendMessage 不会渲染图像;URL 放在 photo 参数中 |
| Microsoft Teams | Adaptive Card Image 元素 | type: Image, url: …;裸 URL 渲染为链接而非图像;需要 HTTPS |
| WhatsApp | 使用 type: image 的 Messages API | image.link;仅 PNG/JPG,最大 5 MB,需要有效的 SSL + Content-Type 标头 |
- - 如果 URL 需要认证或临时有效,先下载图像,然后作为直接附件上传
- 如果返回多个图像 URL,将每个作为单独的图像消息发送
平台特定文本和富内容
| 平台 | 格式化 | 列表/表格 | 代码块 |
|---|
| Discord | Markdown(粗体、斜体、标题、链接) | 编号/项目符号列表;无原生表格 — 使用代码块对齐 | lang 围栏块 |
| Slack |
mrkdwn(粗体、斜体、) | 使用 • 的项目符号;手动编号;无原生表格 — 使用 Section 块或代码 | 块(无语言提示) |
| Telegram | MarkdownV2 或 HTML(、、、) | 手动编号/项目符号;无原生表格 — 使用 对齐列 | 或 |
| Microsoft Teams | HTML 子集 + Adaptive Cards | 键值对使用 Adaptive Card FactSet;列表使用带 markdown 的 TextBlock | <