← 返回 Skills 市场
dainash

ClawForage Prompt Optimizer

作者 InspireHub.ai · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
157
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install clawforage-prompt-optimizer
功能描述
Analyzes your conversation transcripts daily to find patterns, suggest SOUL.md improvements, and recommend skills
使用说明 (SKILL.md)

Prompt & Workflow Optimizer

You are a meta-analysis agent run by ClawForage. Your job: review the user's recent conversation transcripts and produce an actionable daily optimization report.

Step 1: Extract Transcript Data

Run the extraction script on the user's transcripts directory:

bash {baseDir}/scripts/extract-transcripts.sh ~/.openclaw/agents/default/sessions/ 1

This outputs a structured summary of:

  • All user questions from the past day
  • Repeated questions (exact matches)
  • Tool usage frequency
  • Failures and errors
  • Cost summary

Read the output carefully before proceeding.

Step 2: Read Current SOUL.md

cat memory/SOUL.md 2>/dev/null || echo "No SOUL.md found"

Understand the user's current agent configuration so you can suggest meaningful improvements.

Step 3: Analyze and Write Report

Based on the extracted data and current SOUL.md, write a report to memory/optimization/day-{DATE}.md where {DATE} is today's date in YYYY-MM-DD format.

Create the directory first:

mkdir -p memory/optimization

Your report MUST follow this structure (use {baseDir}/templates/weekly-report.md as reference):

Repeated Patterns

Identify questions asked 2+ times. For each:

  • State the pattern and frequency
  • Suggest a concrete action: add info to SOUL.md, create a cron job, or install a skill

SOUL.md Suggestions

Propose specific additions or changes to SOUL.md. Write them as ready-to-copy text blocks. Examples:

  • Adding default preferences ("Default weather location: Hangzhou")
  • Adding workflow shortcuts ("When asked to translate, always use DeepL API first")
  • Removing outdated instructions

Recommended Skills

Based on the user's most common tasks, suggest relevant skills. For each:

  • Skill name and what it does
  • Why it matches the user's usage pattern
  • Install command: openclaw skill install \x3Cname>

Failure Analysis

For each error or multi-attempt task:

  • What went wrong
  • Root cause (missing dependency, unclear prompt, wrong tool)
  • Suggested prevention (add to SOUL.md, install dependency, create pre-check skill)

Usage Stats

Summarize: message count, total cost, average cost, top tools, topic distribution.

Step 4: Validate Report

bash {baseDir}/scripts/validate-report.sh memory/optimization/day-{DATE}.md

If validation fails, fix the missing sections and re-validate.

Constraints

  • Read-only: Never modify transcripts, SOUL.md, or any existing files
  • Suggestions only: Present changes for user approval, never auto-apply
  • Concise: Max 500 words per report
  • Model: Uses your default configured model — no override needed
  • Privacy: Never include full message content in reports — summarize patterns only
安全使用建议
This skill appears internally consistent with its goal of analyzing transcripts and suggesting SOUL.md improvements. Before installing, consider: 1) Do you want a skill reading your local transcripts and SOUL.md? These contain sensitive content; grant only to skills you trust. 2) Ensure jq and bash are installed and that the agent runtime will substitute {baseDir} correctly (or edit the invocation to an absolute path). 3) Verify the report format includes the literal header '# ClawForage Weekly Optimization' (or update validate-report.sh) so validation succeeds. 4) If you have large transcript archives, the extractor may use lots of memory — test on a sample. If these points are acceptable, the skill is coherent and suitable to install.
功能分析
Type: OpenClaw Skill Name: clawforage-prompt-optimizer Version: 0.1.0 The clawforage-prompt-optimizer skill is a local utility designed to analyze an agent's conversation history and suggest configuration improvements. It uses standard shell utilities (bash, jq) to parse JSONL transcripts from the user's local sessions directory (~/.openclaw/agents/default/sessions/) and generates optimization reports in the local memory directory. The code is transparent, strictly follows its stated purpose of pattern and failure analysis, and contains no indicators of data exfiltration, persistence, or malicious execution.
能力评估
Purpose & Capability
The skill claims to analyze conversation transcripts and suggest SOUL.md changes and skills. The included scripts and templates directly implement that: extract-transcripts.sh parses JSONL session files, templates/weekly-report.md defines the report shape, and validate-report.sh checks for required sections. Required binaries (jq, bash) are appropriate and expected.
Instruction Scope
The runtime instructions explicitly read user transcripts (~/.openclaw/agents/default/sessions/) and memory/SOUL.md and write reports to memory/optimization/day-{DATE}.md — this is consistent with the stated purpose but does involve reading sensitive local data (transcripts and agent configuration). Two operational inconsistencies to note: (1) SKILL.md says to create a daily report but validate-report.sh looks for the literal header '# ClawForage Weekly Optimization' (a weekly header) — reports that do not include that exact header will fail validation; (2) SKILL.md uses a {baseDir} placeholder when invoking scripts (bash {baseDir}/scripts/...), so the agent runtime must substitute baseDir correctly or the script call may fail. Also, extract-transcripts.sh concatenates all files into one shell variable (ALL_MESSAGES) which can be memory-heavy on very large archives — operational risk, not malicious.
Install Mechanism
There is no install spec that downloads or executes remote code; the skill is delivered with local scripts and templates. That reduces supply-chain risk. The code files are plain shell scripts and a template; nothing is fetched from external URLs during install.
Credentials
The skill requests no environment variables or credentials. It does require access to local transcript files and memory/SOUL.md which is proportionate to its purpose. No unrelated secrets or config paths are requested.
Persistence & Privilege
always:false (not force-included) and disable-model-invocation:false (normal autonomous invocation allowed). The skill does not request system-wide config changes or the modification of other skills. It writes its own report files under memory/optimization as intended.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawforage-prompt-optimizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawforage-prompt-optimizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of clawforage-prompt-optimizer. - Provides daily meta-analysis of user conversation transcripts to identify usage patterns and optimization opportunities. - Suggests actionable improvements to SOUL.md, workflow, and skill recommendations based on transcript data. - Analyzes repeated questions, tool usage, failures, and cost statistics. - Generates structured daily optimization reports for user review, following a clear template. - Ensures privacy by summarizing patterns without revealing full message content. - Fully read-only and suggestion-based (no automated changes to user data).
元数据
Slug clawforage-prompt-optimizer
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ClawForage Prompt Optimizer 是什么?

Analyzes your conversation transcripts daily to find patterns, suggest SOUL.md improvements, and recommend skills. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 157 次。

如何安装 ClawForage Prompt Optimizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawforage-prompt-optimizer」即可一键安装,无需额外配置。

ClawForage Prompt Optimizer 是免费的吗?

是的,ClawForage Prompt Optimizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ClawForage Prompt Optimizer 支持哪些平台?

ClawForage Prompt Optimizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ClawForage Prompt Optimizer?

由 InspireHub.ai(@dainash)开发并维护,当前版本 v0.1.0。

💬 留言讨论