memory-to-skill-crystallizer

Convert memory lessons into reusable skills automatically. Extract patterns from memory/YYYY-MM-DD.md and create skills/local/ entries.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "memory-to-skill-crystallizer" with this command: npx skills add dalomeve/memory-to-skill-crystallizer

Memory to Skill Crystallizer

Convert memory lessons into reusable skills.

Problem

Lessons learned:

  • Stay in memory files only
  • Aren't reusable across sessions
  • Require manual extraction
  • Get lost in daily logs

Workflow

1. Pattern Detection

# Scan recent memory for repeated patterns
$memoryFiles = Get-ChildItem "memory/" -Filter "*.md" | Sort-Object LastWriteTime -Descending | Select-Object -First 7
$patterns = @{}

foreach ($file in $memoryFiles) {
    $content = Get-Content $file.FullName -Raw
    if ($content -match "Failed|Blocker|Error") {
        # Extract pattern
        $matches = [regex]::Matches($content, "(Failed|Blocker|Error): (.+)")
        foreach ($m in $matches) {
            $key = $m.Groups[2].Value
            $patterns[$key] = $patterns[$key] + 1
        }
    }
}

# Find repeated patterns (2+ occurrences)
$repeated = $patterns.GetEnumerator() | Where-Object { $_.Value -ge 2 }

2. Skill Generation

foreach ($pattern in $repeated) {
    $skillName = $pattern.Key -replace '[^a-z]', '-' -replace '-+', '-'
    $skillPath = "skills/local/$skillName-recovery"
    
    New-Item -ItemType Directory -Path $skillPath -Force | Out-Null
    
    $skillContent = @"
---
name: $skillName-recovery
description: Auto-recovery for: $($pattern.Key)
---

# $($pattern.Key) Recovery

## Trigger
When $($pattern.Key) occurs

## Steps
1. Detect the error pattern
2. Execute recovery steps
3. Verify resolution

## Verification
- [ ] Error resolved
- [ ] Task can continue
"@
    
    $skillContent | Out-File "$skillPath/SKILL.md" -Encoding UTF8
}

3. Registration

# Add to skills index if in bot-output
if (Test-Path "skills/local/") {
    Write-Host "Created skills in skills/local/"
    Get-ChildItem "skills/local/" -Directory | ForEach-Object {
        Write-Host "  - $($_.Name)"
    }
}

Executable Completion Criteria

CriteriaVerification
Pattern detected2+ occurrences in memory
Skill file createdSKILL.md exists in skills/local/
Trigger defined## Trigger section present
Steps documented## Steps section present

Privacy/Safety

  • No sensitive data in extracted patterns
  • Pattern names only, no specific content
  • Local skills only (not published)

Self-Use Trigger

Use when:

  • Same error appears 2+ times
  • Weekly review of memory files
  • Before creating permanent fix

Crystallize lessons. Reuse forever.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Workout Readiness Check In

Create a same-day workout readiness decision card for users who planned to exercise today but feel tired, sore, stressed, underslept, ill, or uncertain. Use...

Registry SourceRecently Updated
General

URL to Markdown

Convert HTML web pages from HTTP/HTTPS URLs to clean, readable Markdown files with optional batch processing and formatting features.

Registry SourceRecently Updated
General

Appliance Manual Command Card

Assist in creating a one-page appliance command card for tracking maintenance, troubleshooting, warranty info, and repair preparation.

Registry SourceRecently Updated
General

Fireseed Writing Expert

全能小说写作专家,支持从零创作、DNA提取与克隆、风格仿写、一键发布到 fireseed.online。用户可以用自然语言描述需求,系统自动调度子技能完成科学、闭环的写作与发布流程。

Registry SourceRecently Updated