当前位置: 首页 > Skill >

Skill From Memory

Skill From Memory

0.1.2 2026.11.26 浏览:918
获取Skill文件查看使用说明
作者:周景许可证:
本文目录展开

Skill from Memory

Transform your work into reusable skills. Extract workflows, solutions, and patterns from conversation history or memory files, package them as skills, and publish to GitHub and ClawHub.

Overview

This skill automates the complete workflow:

  1. Extract - Parse conversation history or memory for reusable patterns
  2. Design - Structure as a proper skill with SKILL.md and resources
  3. Create - Generate skill files and scripts
  4. Publish - Push to GitHub and publish to ClawHub

Quick Start

Create Skill from Recent Conversation

# Analyze last conversation and create skill draft
./scripts/extract-from-history.sh /path/to/session.jsonl ./my-new-skill

# Or specify a time range
./scripts/extract-from-history.sh /path/to/session.jsonl ./my-new-skill --since "2026-02-03" --pattern "backup"

Create Skill from Memory File

# Extract from memory markdown
./scripts/extract-from-memory.sh /path/to/memory/2026-02-04.md ./my-new-skill

Full Auto-Create and Publish

# One command: extract, create, and publish
./scripts/create-and-publish.sh 
  --source /path/to/session.jsonl 
  --skill-name "my-automation" 
  --github-repo "user/my-skills" 
  --clawhub-slug "my-automation"

Workflow Steps

Step 1: Extract Requirements

Identify from conversation/memory:

  • Task Pattern: What workflow was solved?
  • Inputs/Outputs: What goes in, what comes out?
  • Scripts/Tools: What code was written?
  • Key Decisions: What choices were made?

Step 2: Design Skill Structure

Decide resource types:

  • scripts/ - For reusable code
  • references/ - For documentation
  • assets/ - For templates/files

Step 3: Create Skill Files

Generate:

  • SKILL.md with frontmatter and instructions
  • Scripts in scripts/
  • Any reference files

Step 4: Publish

Push to GitHub and publish to ClawHub:

./scripts/publish.sh ./my-skill 
  --github "user/repo" 
  --clawhub-slug "my-skill" 
  --version "1.0.0"

Scripts Reference

extract-from-history.sh

Parse conversation JSONL for skill content.

./scripts/extract-from-history.sh <session.jsonl> <output-dir> [options]

Options:
  --since DATE     Only extract from DATE onwards
  --pattern REGEX  Filter messages matching pattern
  --tools-only     Only extract tool usage patterns

extract-from-memory.sh

Parse memory markdown files.

./scripts/extract-from-memory.sh <memory.md> <output-dir>

create-skill.sh

Generate skill structure from extracted content.

./scripts/create-skill.sh <extracted-content-dir> <skill-name>

Options:
  --description "..."  Skill description
  --type workflow    Skill type (workflow|tool|reference)

publish.sh

Complete publish workflow.

./scripts/publish.sh <skill-path> [options]

Options:
  --github REPO      GitHub repo (owner/repo)
  --clawhub-slug     ClawHub slug
  --version VER      Version tag
  --skip-github      Skip GitHub push
  --skip-clawhub     Skip ClawHub publish

Example: Converting a Task to Skill

Original Task (from conversation)

User: "帮我设置每天自动备份OpenClaw配置" → Agent creates backup scripts + cron setup

Skill Creation Process

  1. Extract:

    ./scripts/extract-from-history.sh 
      ~/.openclaw/agents/main/sessions/latest.jsonl 
      ./extracted-backup
    
  2. Design:

    • Type: Workflow skill
    • Scripts: backup.sh, setup-cron.sh, cleanup.sh
    • No assets needed
  3. Create:

    ./scripts/create-skill.sh ./extracted-backup cron-backup 
      --description "Automated backup scheduling with cron" 
      --type workflow
    
  4. Publish:

    ./scripts/publish.sh ./cron-backup 
      --github "zfanmy/openclaw-skills" 
      --clawhub-slug "cron-backup" 
      --version "1.0.0"
    

Best Practices

What Makes a Good Skill

✅ Do:

  • Single, well-defined purpose
  • Reusable across contexts
  • Includes working scripts
  • Clear usage examples
  • Progressive disclosure design

❌ Don't:

  • Too broad or vague
  • Hardcoded personal paths
  • Missing error handling
  • Undocumented assumptions

Extracting from Memory

Look for these patterns:

  • "帮我写一个脚本..."
  • "设置定时任务..."
  • "以后每次都要..."
  • "这个流程可以复用..."

GitHub Integration

Required setup:

# Configure git
git config --global user.name "Your Name"
git config --global user.email "your@email.com"

# Setup SSH key for GitHub
ssh-keygen -t ed25519 -C "your@email.com"
# Add ~/.ssh/id_ed25519.pub to GitHub Settings → SSH Keys

# Login to ClawHub
clawhub login

Versioning

Follow semantic versioning:

  • 1.0.0 - Initial release
  • 1.0.1 - Bug fix
  • 1.1.0 - New feature
  • 2.0.0 - Breaking change

Troubleshooting

Extraction finds nothing

  • Check session file path
  • Verify date range with --since
  • Try broader pattern matching

GitHub push fails

  • Verify SSH key is added to GitHub
  • Check repo exists and you have access
  • Ensure git config user.name/email set

ClawHub publish fails

  • Run clawhub login first
  • Check skill validation passes
  • Verify slug is unique

Skill doesn't work when used

  • Test scripts manually first
  • Check for hardcoded paths
  • Verify all dependencies listed
  • Run with --examples flag when creating

Related Skills

  • skill-creator - Low-level skill creation utilities
  • cron-backup - Example output skill (backup automation)
  • clawhub - ClawHub CLI operations

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,031
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,029
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,017
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,014
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,011
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,011
Skill 文件
  • SKILL.md
    • Skill from Memory
    • Overview
    • Quick Start
      • Create Skill from Recent Conversation
      • Create Skill from Memory File
      • Full Auto-Create and Publish
    • Workflow Steps
      • Step 1: Extract Requirements
      • Step 2: Design Skill Structure
      • Step 3: Create Skill Files
      • Step 4: Publish
    • Scripts Reference
      • extract-from-history.sh
      • extract-from-memory.sh
      • create-skill.sh
      • publish.sh
    • Example: Converting a Task to Skill
      • Original Task (from conversation)
      • Skill Creation Process
    • Best Practices
      • What Makes a Good Skill
      • Extracting from Memory
      • GitHub Integration
      • Versioning
    • Troubleshooting
      • Extraction finds nothing
      • GitHub push fails
      • ClawHub publish fails
      • Skill doesn't work when used
    • Related Skills
  • 项目或源文件

相关 Skill

更多
lobster-rank lobster-rank Scan locally installed OpenClaw skills, collect evidence data, submit to the lobster ranking server for scoring, and let the user confirm uploading their result to the public leaderboard. Use when the user asks to score, rate, evaluate, rank, or certify their lobster / AI agent capability set, or wants to upload their score to the leaderboard.
skill-list skill-list 列出 OpenClaw Skills:以表格形式展示所有 skills、显示功能介绍、找出功能重复的 skills。Use when: 用户想知道安装了哪些 skills、某个 skill 是做什么的、或者想找出重复功能的 skills。
Best Practice Skill Creator Best Practice Skill Creator Create OpenClaw skills from best practice videos or image sequences. Use when creating skill from video, generating skill from screenshots, converting tutori...
openclaw-skillhub openclaw-skillhub 使用 SkillHub 安装和管理 OpenClaw Skills。用于安装、更新、搜索 SkillHub 技能库中的技能。触发场景:(1) 用户想要安装新的 skill,(2) 用户想要搜索 skill,(3) 用户想要更新已安装的 skill,(4) 用户提到 skillhub。
Skills Creator — Build High-Quality OpenClaw Skills Skills Creator — Build High-Quality OpenClaw Skills 指导用户遵循最佳实践,创建、审查和改进 OpenClaw 技能。当有人要求“创建技能”、“编写 S...”时使用。