← 返回
未分类 中文

BetterPrompt

Discover, install, and run reusable AI prompt skills from the BetterPrompt registry via the CLI (betterprompt / bp). Use when a user needs to find a prompt s...
通过 CLI(betterprompt / bp)发现、安装并运行 BetterPrompt 注册表中的可复用 AI 提示技能,用于用户需要查找提示的场景。
mikeqle mikeqle 来源
未分类 clawhub v1.0.3 2 版本 99788.6 Key: 无需
★ 1
Stars
📥 452
下载
💾 0
安装
2
版本
#latest

概述

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

npm install -g betterprompt@latest
# or
bun install -g betterprompt@latest
# or
yarn global add betterprompt@latest
# or
pnpm add -g betterprompt@latest

Authentication

Authenticate via browser:

betterprompt login

Skill Discovery

betterprompt skill search "<query>"
betterprompt skill info <skill-slug>

Output Generation

A skill is essentially a prompt with instructions. Run the following command to generate output:

betterprompt generate <skill-slug> [input flags] [--model <model>] [--options <json>] [--json]

Input methods (use the one that matches the skill's input contract):

# Key-value pairs (repeatable)
betterprompt generate <skill-slug> --input key=value --input key2=value2

# Image via URL
betterprompt generate <skill-slug> --image-input-url <url>

# Image via local file (auto-compressed)
betterprompt generate <skill-slug> --image-input-path <path>

# JSON payload (all inputs as a single JSON object)
betterprompt generate <skill-slug> --input-payload '{"key": "value"}'

# Stdin pipe
echo "input text" | betterprompt generate <skill-slug> --stdin

Flags:

--model <model>       override the default model for this skill
--options <json>      pass provider-specific model options as JSON
--json                output structured JSON (includes run-id, status, outputs)

The --json response includes a runId field used to retrieve outputs later.

Output Review

Retrieve outputs for a specific run:

betterprompt outputs <run-id>

List past outputs:

betterprompt outputs list

Output types:

TypeValue
------------
TEXT"text"
IMAGE"image"
ERROR"error"
VIDEO"video"

Skill Management

Install, uninstall, list, and update prompt skills:

betterprompt skill install <skill-slug> --agent <name>
betterprompt skill uninstall <skill-slug> --agent <name>
betterprompt skill list
betterprompt skill update <skill-slug>

Global Flags

These flags work on most commands:

--project       scope to the current project (vs global)
--global        scope to global install
--dir <path>    use an explicit working directory
--json          structured JSON output (machine-readable)
--quiet         reduce non-essential output
-h, --help      show help for any command
-V, --version   show CLI version

Resources

Fetch available models and their supported options (e.g., aspect ratio, resolution, reasoning effort):

betterprompt resources --models-only

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: --agent claude --agent cursor
  • 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. Searchbetterprompt skill search "" --json
  2. Inspectbetterprompt skill info --json
  3. Fetch resourcesbetterprompt resources --models-only --json
  4. Validate from skillmd
  5. Present execution choices:
  • required inputs in the skill.md
  • default model
  • default model's options
  • other supported models
  1. Executebetterprompt generate [input flags] --json
  2. Poll if neededbetterprompt outputs --sync --json

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
  2. Input contract clarity in skillmd
  3. Output predictability/repeatability
  4. 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 --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.

PlatformMethodKey Details
------------------------------------------------------------------------------------------------------------------------------------------
DiscordEmbed with image.urlBare URLs may not unfurl reliably; always use embeds
SlackBlock Kit image blockimage_url + alt_text (required); URL unfurling depends on workspace settings
TelegramsendPhoto Bot API methodsendMessage with a URL does not render images; URL in photo param
Microsoft TeamsAdaptive Card Image element"type": "Image", "url": "…"; bare URLs render as links, not images; HTTPS required
WhatsAppMessages 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
PlatformFormattingLists / TablesCode Blocks
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DiscordMarkdown (bold, italic, headers, links)Numbered/bulleted lists; no native tables — use code block alignment `lang fenced blocks
Slackmrkdwn (bold, _italic_, `text>`)Bulleted with ; numbered manually; no native tables — use Section blocks or code ` blocks (no language hint)
TelegramMarkdownV2 or HTML (, , , )Manual numbered/bulleted; no native tables — use
 aligned columns
 or  ` 
Microsoft TeamsSubset of HTML + Adaptive CardsAdaptive Card FactSet for key-value; TextBlock with markdown for lists
 or Adaptive Card CodeBlock
WhatsAppLimited: 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 </code> + <code><short description></code> in the same message</li><li>If sample output is an image URL → render inline using platform image method (see table above) with numbered caption</li><li>If sample output is text → quote block (<code>> <sample text></code> or platform equivalent)</li><li>If no sample output → include "No sample output available." in the item message</li></ul><h5>Skill Details (info) / Execution Choices</h5><p>When presenting skill info from <code>betterprompt skill info</code>:</p><ul><li><strong>Title + description</strong> as a header or bold line</li><li><strong>Required inputs</strong></li><li>List of text inputs: name, description, is required. E.g:</li></ul><p> ```markdown</p><p> Inputs:</p><ul><li>story_theme (required): The story theme</li><li>character_role (required): The character role</li></ul><p> ```</p><ul><li>List of image inputs: name, description, is required. E.g:</li></ul><p> ```markdown</p><p> <strong> Exactly 1 </strong> image(s)</p><ul><li>image 1 (required): The character reference image</li></ul><p> ```</p><ul><li><strong>Default model and their available options</strong> E.g:</li></ul><p> ```markdown</p><ul><li>Default model: gemini-3.1-flash-image-preview (default)</li><li>Available options: aspectRatio: 1:1 (default) / 16:9 / 9:16, resolution: 1024x1024 / 2048x2048</li></ul><p> ```</p><ul><li><strong>Other supported models</strong> as a model list. E.g: gpt-image-1, dall-e-3, ...</li></ul><ul><li><strong>Sample output</strong> rendered inline (image or quoted text per platform rules)</li><li>Keep it to one message; use the platform's rich formatting (embeds, cards, blocks) to structure sections visually</li></ul><h5>Generation Output</h5><p>After a successful run, return exactly:</p><ol><li><strong>Exact result</strong> — same content BetterPrompt returned, formatted for readability only</li><li><strong>One next step</strong> — exactly one actionable suggestion</li></ol><p>Fidelity rules:</p><ul><li>Text: light formatting only (line breaks, short intro); preserve all content verbatim</li><li>Images: render inline per platform image rules above</li><li>Never invent, summarize away, or alter output content</li><li>Do not include skill IDs, prompt version IDs, raw JSON, or internal logs unless explicitly asked</li></ul><h5>Resources</h5><p>When presenting results from <code>betterprompt resources --models-only</code>:</p><ul><li><strong>Models list</strong>: formatted as a numbered list or compact table showing model name and provider</li><li><strong>Resource details</strong>: key-value pairs using the platform's native structured format (Discord embed fields, Slack <code>section</code> blocks, Teams <code>FactSet</code>, Telegram bold key + value)</li><li>Keep it scannable — one message, no walls of text</li></ul></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 2 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.0.3</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-05-03 07:26 安全 安全 </div> </li> <li> <div> <span class="version-tag">v1.0.2</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-31 05:14 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=23f807ea10a775726f24ddc6285e41bd" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/26/419567_498035f8276b43bb317272c2c93d1805.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781943532%3B1813479532&q-key-time=1781943532%3B1813479532&q-header-list=host&q-url-param-list=&q-signature=6c17faef8b11f85b0b0e936d2026997a4b9c694b" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">ai-agent</span> <h3><a href="/s/find-skills">Find Skills</a></h3> <div class="rec-owner">guipi888</div> <div class="rec-desc">场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 1,460</span> <span style="color:#5b6abf;">📥 518,109</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">ai-agent</span> <h3><a href="/s/self-improving-agent">self-improving agent</a></h3> <div class="rec-owner">pskoett</div> <div class="rec-desc">捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 4,099</span> <span style="color:#5b6abf;">📥 825,945</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">ai-agent</span> <h3><a href="/s/agent-browser">Agent Browser</a></h3> <div class="rec-owner">rez0</div> <div class="rec-desc">用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 834</span> <span style="color:#5b6abf;">📥 306,769</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>