Prompt Library Manager
Store, search, version, and reuse prompt templates across OpenClaw sessions and agents.
Quick Start
CODEBLOCK0
Commands
add — Add Prompt Template
Store a new prompt with metadata:
- -
--name NAME — Unique identifier (required) - INLINECODE2 — Category tag (e.g., productivity, coding, writing, analysis)
- INLINECODE3 — The prompt text with
{variable} placeholders - INLINECODE5 — Human-readable description
- INLINECODE6 — Comma-separated tags for search
- INLINECODE7 — Recommended model (optional)
- INLINECODE8 — Load template from file instead of inline
search — Search Prompts
Full-text search across names, descriptions, tags, and template content.
- - Supports keyword matching and tag filtering
- INLINECODE10 — Filter by category
- INLINECODE11 — Filter by tag
list — List All Prompts
Display all stored prompts with metadata.
- -
--category CAT — Filter by category - INLINECODE14 — Output format
- INLINECODE15 — Show names only
use — Fill and Output Prompt
Retrieve a prompt and fill in variable placeholders:
- -
--var KEY=VALUE — Set template variables (repeatable) - INLINECODE18 — Copy filled prompt to clipboard
update — Update Existing Prompt
Modify a stored prompt (creates new version):
- -
--name NAME — Prompt to update - INLINECODE21 — New template text
- INLINECODE22 — Updated tags
delete — Remove Prompt
Delete a prompt from the library.
- -
--name NAME — Prompt to delete - INLINECODE25 — Skip confirmation
export — Export Library
Export all prompts for backup or sharing.
- -
--format json|yaml|markdown — Export format - INLINECODE28 — Write to file
- INLINECODE29 — Export specific category only
import — Import Prompts
Import prompts from file (merge with existing).
- -
--file PATH — Import source file (JSON or YAML) - INLINECODE32 — Replace existing prompts with same name
stats — Library Statistics
Show prompt usage stats, category counts, and most-used templates.
Storage
Prompts are stored in memory/prompt-library.json as a JSON array:
CODEBLOCK1
Built-in Starter Prompts
The library ships with 10 high-quality starter prompts:
- 1. email-summarizer — Summarize email threads
- code-reviewer — Review code for bugs and improvements
- meeting-notes — Structure meeting transcripts into notes
- bug-report — Generate structured bug reports
- content-writer — Write blog posts from outlines
- data-analyst — Analyze datasets and find patterns
- task-breakdown — Break complex tasks into subtasks
- explain-concept — Explain technical concepts simply
- decision-matrix — Compare options with pros/cons
- daily-standup — Generate standup update from git log
提示词库管理器
在OpenClaw会话和代理之间存储、搜索、版本管理和复用提示词模板。
快速开始
bash
添加新的提示词模板
python3 scripts/prompt-library.py add --name 邮件摘要生成器 --category 生产力 \
--template 总结以下邮件线程,突出显示:1) 关键决策 2) 待办事项 3) 截止日期。邮件:{input}
按关键词搜索提示词
python3 scripts/prompt-library.py search 邮件
列出所有提示词
python3 scripts/prompt-library.py list
使用提示词(填充变量)
python3 scripts/prompt-library.py use 邮件摘要生成器 --var input=<在此粘贴邮件>
导出库
python3 scripts/prompt-library.py export --format json
命令
add — 添加提示词模板
存储带有元数据的新提示词:
- - --name NAME — 唯一标识符(必填)
- --category CAT — 分类标签(例如:生产力、编程、写作、分析)
- --template TEXT — 包含{variable}占位符的提示词文本
- --description TEXT — 人类可读的描述
- --tags TAG,TAG — 用于搜索的逗号分隔标签
- --model MODEL — 推荐模型(可选)
- --from-file PATH — 从文件加载模板而非内联输入
search — 搜索提示词
对名称、描述、标签和模板内容进行全文搜索。
- - 支持关键词匹配和标签过滤
- --category CAT — 按分类过滤
- --tag TAG — 按标签过滤
list — 列出所有提示词
显示所有存储的提示词及其元数据。
- - --category CAT — 按分类过滤
- --format text|json|markdown — 输出格式
- --compact — 仅显示名称
use — 填充并输出提示词
检索提示词并填充变量占位符:
- - --var KEY=VALUE — 设置模板变量(可重复)
- --copy — 将填充后的提示词复制到剪贴板
update — 更新现有提示词
修改已存储的提示词(创建新版本):
- - --name NAME — 要更新的提示词
- --template TEXT — 新的模板文本
- --tags TAG,TAG — 更新后的标签
delete — 删除提示词
从库中删除提示词。
- - --name NAME — 要删除的提示词
- --confirm — 跳过确认
export — 导出库
导出所有提示词用于备份或共享。
- - --format json|yaml|markdown — 导出格式
- --output PATH — 写入文件
- --category CAT — 仅导出特定分类
import — 导入提示词
从文件导入提示词(与现有提示词合并)。
- - --file PATH — 导入源文件(JSON或YAML)
- --overwrite — 替换同名的现有提示词
stats — 库统计信息
显示提示词使用统计、分类计数和最常用模板。
存储
提示词以JSON数组形式存储在memory/prompt-library.json中:
json
[{
name: 邮件摘要生成器,
category: 生产力,
description: 总结邮件线程,包含决策和待办事项,
template: 总结以下邮件线程...,
tags: [邮件, 摘要, 生产力],
model: null,
version: 1,
created: 2026-03-29T05:00:00Z,
updated: 2026-03-29T05:00:00Z,
use_count: 0
}]
内置入门提示词
该库附带10个高质量的入门提示词:
- 1. 邮件摘要生成器 — 总结邮件线程
- 代码审查员 — 审查代码中的错误和改进点
- 会议记录 — 将会议转录内容整理成笔记
- 错误报告 — 生成结构化的错误报告
- 内容写手 — 根据大纲撰写博客文章
- 数据分析师 — 分析数据集并发现模式
- 任务分解 — 将复杂任务分解为子任务
- 概念解释 — 简单解释技术概念
- 决策矩阵 — 比较选项的优缺点
- 每日站会 — 从git日志生成站会更新