โ† Back to skills
extension
Category: Development & EngineeringNo API key required

Skill

Install and configure the MoltCare Agent Framework - a four-layer configuration system (SOUL/AGENTS/USER/MEMORY) with three-layer trigger architecture (Exact...

personAuthor: useenshubclawhub

MoltCare-Open Skill

๐Ÿฆž OpenClaw Skill - v3.2.0 | Auto-published via GitHub Actions

Install and configure the MoltCare Agent Framework for OpenClaw.

What is MoltCare?

MoltCare is a four-layer configuration framework that transforms OpenClaw Agent from passive execution to proactive problem-solving:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  SOUL.md        โ† Agent ็ต้ญ‚๏ผˆๅŽŸๅˆ™ใ€ไบบๆ ผ๏ผ‰ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  AGENTS.md      โ† ๆ“ไฝœๆ‰‹ๅ†Œ๏ผˆๆต็จ‹ใ€ๅทฅๅ…ท๏ผ‰   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  USER.md        โ† ็”จๆˆท็”ปๅƒ๏ผˆๅๅฅฝใ€็บฆๆŸ๏ผ‰   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  MEMORY.md      โ† ้•ฟๆœŸ่ฎฐๅฟ†๏ผˆๆ ธๅฟƒไฟกๆฏ๏ผ‰     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Features

1. Three-Layer Trigger Architecture (AGENTS.md v3.2)

| Layer | Trigger | Signal | Priority | |-------|---------|--------|----------| | Layer 1 | Exact triggers | +2 | ๐Ÿ”ด Highest | | Layer 2 | Semantic triggers | +1 | ๐ŸŸก Medium | | Layer 3 | Agent self-evaluation | Auto | ๐ŸŸข Lowest |

Layer 1 - Exact Triggers:

  • ๅคšไธ“ๅฎถ่ฎจ่ฎบ: โ†’ Multi-expert mode [๐Ÿง ]
  • ่ฟ™ๅพˆ้‡่ฆ โ†’ High priority memory [โญ]
  • ่ฎฐไฝ่ฟ™ไธช โ†’ Learning debt [๐Ÿ’พ]
  • ๆˆ‘ๅๅฅฝ โ†’ User preference [๐Ÿ‘ค]

Layer 2 - Semantic Triggers:

  • "ๅ…ณ้”ฎๆ˜ฏ..." / "ๆ ธๅฟƒๅœจไบŽ..." โ†’ Key info [โญ]
  • "ๅˆซๅฟ˜ไบ†..." / "่ฆ่ฎฐไฝ..." โ†’ Learning debt [๐Ÿ’พ]
  • "ๆˆ‘ๅ–œๆฌข..." / "ๆˆ‘่ฎจๅŽŒ..." โ†’ Preference [๐Ÿ‘ค]
  • "่ฟ˜ไธ่กŒ" / "ๅคชๆ…ขไบ†" โ†’ PUA activation [๐Ÿ”ฅ]

Layer 3 - Agent Evaluation: After task completion, self-evaluate 7 questions and auto-record if โ‰ฅ2 criteria met.

2. PUA Problem-Solving Framework

Three Iron Laws:

  1. Exhaust all options - Never say "cannot solve" until all tried
  2. Act first, ask later - Use tools before asking user
  3. Take ownership - End-to-end delivery

Pressure Escalation (L1-L4):

  • L1: "Try again" / "Another approach"
  • L2: "Why still not working" / 2 failures
  • L3: "You can't do it" / 3+ failures + 7-item checklist
  • L4: "Cannot solve" / 5+ failures โ†’ๆ‹ผๅ‘ฝๆจกๅผ

3. Multi-Expert Decision System

Automatically activate for:

  • Architecture design
  • Security/risk assessment
  • Complex trade-offs

Experts: ๐Ÿ” Researcher โ†’ ๐Ÿง  Architect โ†’ ๐Ÿ’ป Engineer โ†’ ๐Ÿ‘‘ Captain

4. Task Layering & Cost Optimization

Intelligent task execution with minimal token consumption:

| Layer | Task Type | Execution | Token Cost | |-------|-----------|-----------|------------| | L0 | Data collection, polling, formatting | Pure script | Zero | | L1 | Query, display, status checks | Pure script | Zero | | L2 | Anomaly detection, threshold checks | Script + conditional trigger | On-demand | | L3 | Analysis, decision-making, summarization | AI invocation | Normal |

Principle: Push computation to scripts; reserve AI for judgment.

Benefits:

  • 90%+ reduction in token consumption for routine tasks
  • Faster response times (no model latency)
  • Predictable operational costs
  • Scalable automation

5. Daily Token Optimization Audit

Automated daily review of tasks and workflows to identify optimization opportunities:

What it checks: | Check Item | Purpose | |------------|---------| | Repetitive AI tasks | Identify tasks that could be scripted | | High-frequency queries | Find patterns for caching/pre-computation | | Threshold-based decisions | Detect rules that could be automated | | Data processing workflows | Spot opportunities for batch/aggregate processing |

Daily Checklist:

โ–ก Review yesterday's token usage patterns
โ–ก Identify tasks with >3 similar executions
โ–ก Check for threshold-based decisions using AI
โ–ก Look for data formatting/processing done by AI
โ–ก Find opportunities for incremental updates

Optimization Report Template:

## [Date] Token Optimization Report

### Findings
| Task | Current | Suggested | Savings |
|------|---------|-----------|---------|
| [Name] | AI every call | Script + cache | ~X% |

### Action Items
- [ ] [Task]: Convert to L0/L1/L2
- [ ] [Task]: Add caching layer
- [ ] [Task]: Implement incremental updates

Auto-trigger: Daily at configured time or manual via "ๆฃ€ๆŸฅtokenไผ˜ๅŒ–"

Installation

Step 1: Copy Templates (โš ๏ธ Important: Copy to ROOT, not subfolders)

OpenClaw automatically loads these files from workspace root at session start:

CORE (required):

~/.openclaw/workspace/
โ”œโ”€โ”€ AGENTS.md      โ† Operation manual (auto-loaded)
โ”œโ”€โ”€ SOUL.md        โ† Agent principles (auto-loaded)
โ”œโ”€โ”€ USER.md        โ† User profile (auto-loaded)
โ””โ”€โ”€ MEMORY.md      โ† Long-term memory (auto-loaded)

OPTIONAL (loaded if exists):

~/.openclaw/workspace/
โ”œโ”€โ”€ IDENTITY.md    โ† Agent identity (auto-loaded)
โ”œโ”€โ”€ TOOLS.md       โ† Environment tools (auto-loaded)
โ””โ”€โ”€ HEARTBEAT.md   โ† Health check system (auto-loaded)

MEMORY templates (read on-demand):

~/.openclaw/workspace/memory/
โ”œโ”€โ”€ learning-debt.md      (read via `read` tool)
โ”œโ”€โ”€ constraints.md        (read via `read` tool)
โ”œโ”€โ”€ preferences.md        (read via `read` tool)
โ””โ”€โ”€ token-audit-template.md  (read via `read` tool)

โŒ WRONG - Do NOT do this:

# Wrong - creates subfolders
mkdir -p ~/.openclaw/workspace/core
mkdir -p ~/.openclaw/workspace/assets
cp assets/* ~/.openclaw/workspace/core/  # โŒ WRONG

โœ… CORRECT (or use install.sh):

# Core templates โ†’ ROOT (auto-loaded by OpenClaw)
cp assets/AGENTS.md ~/.openclaw/workspace/
cp assets/SOUL.md ~/.openclaw/workspace/
cp assets/USER.md ~/.openclaw/workspace/
cp assets/MEMORY.md ~/.openclaw/workspace/

# Optional templates โ†’ ROOT (auto-loaded if exists)
cp assets/IDENTITY.md ~/.openclaw/workspace/
cp assets/TOOLS.md ~/.openclaw/workspace/
cp assets/HEARTBEAT.md ~/.openclaw/workspace/

# Memory templates โ†’ memory/ (read on-demand)
mkdir -p ~/.openclaw/workspace/memory
cp assets/learning-debt.md ~/.openclaw/workspace/memory/
cp assets/constraints.md ~/.openclaw/workspace/memory/
cp assets/preferences.md ~/.openclaw/workspace/memory/
cp assets/token-audit-template.md ~/.openclaw/workspace/memory/

# Note: BEST_PRACTICES.md stays in skill/assets/ (reference only, not auto-loaded)

Step 2: Configure User Profile

Edit ~/.openclaw/workspace/USER.md and fill in:

  • Your name/role
  • Communication preferences
  • Technical level
  • Constraints and boundaries

Step 3: Initialize Memory System

Create today's memory file:

mkdir -p ~/.openclaw/workspace/memory
echo "# $(date +%Y-%m-%d) Memory Flush" > ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md

Step 4: Configure Weekly Token Audit (Auto-configured)

Token optimization audit is automatically configured during installation:

Default Schedule: Every Monday at 03:00 (cron)

0 3 * * 1 cd ~/.openclaw/workspace && echo 'ๆฃ€ๆŸฅtokenไผ˜ๅŒ–' >> ~/.openclaw/workspace/.audit-trigger

Trigger methods:

  1. Automatic - Runs every Monday 03:00 via cron
  2. Manual - Say "ๆฃ€ๆŸฅtokenไผ˜ๅŒ–" anytime
  3. Custom period - Say "ๆฃ€ๆŸฅๆœฌๅ‘จtokenไผ˜ๅŒ–" or "ๆฃ€ๆŸฅๆœฌๆœˆtokenไผ˜ๅŒ–"

To change schedule, edit crontab:

crontab -e
# Change: 0 3 * * 1 (Monday 03:00)
# To daily: 0 3 * * * (daily 03:00)
# To disable: Comment out or remove the line

File Reference

CORE Configuration (Auto-loaded by OpenClaw)

Must be in ~/.openclaw/workspace/ root.

| File | Purpose | Key Content | Required | |------|---------|-------------|----------| | AGENTS.md | Operation manual | 3-layer triggers, multi-expert, PUA levels | โœ… Required | | SOUL.md | Agent soul & principles | 7 principles, PUA framework, safety rules | โœ… Required | | USER.md | User profile | Preferences, constraints, communication style | โœ… Required | | MEMORY.md | Long-term memory | High-signal info (Signal 8-10) | โœ… Required |

OPTIONAL Configuration (Auto-loaded if exists)

Placed in ~/.openclaw/workspace/ root. Loaded only if file exists.

| File | Purpose | Key Content | |------|---------|-------------| | IDENTITY.md | Agent identity | Display name, emoji, role definition | | TOOLS.md | Environment tools | Local tool versions, API keys, commands | | HEARTBEAT.md | Health check system | Quick status checks | | TOKEN_AUDIT.md | Weekly audit config | Token optimization schedule, thresholds | | CONFIG_CHECKLIST.md | Post-install verification | How to use all md files correctly |

MEMORY Templates (Read on-demand)

Placed in ~/.openclaw/workspace/memory/. Read via read tool when needed.

| File | Purpose | |------|---------| | learning-debt.md | Topics to learn (Signal 6+) | | constraints.md | Absolute boundaries | | preferences.md | Preference change log | | token-audit-template.md | Daily token optimization review template |

Reference Documentation (Not auto-loaded)

Stay in skill/assets/. Read manually when needed.

| File | Purpose | |------|---------| | BEST_PRACTICES.md | Efficiency guide - Task layering, token optimization | | README.md | This documentation |

Quick Start

After installation, test the framework:

  1. Test Layer 1 trigger:

    ็”จๆˆท: "่ฟ™ๅพˆ้‡่ฆ๏ผŒๆˆ‘ๅๅฅฝ็ฎ€ๆด็š„ๅ›ž็ญ”"
    Agent: [โญ] ๅทฒ่ฎฐๅฝ•ๆ ธๅฟƒๅๅฅฝ: ็ฎ€ๆดๅ›ž็ญ”
    
  2. Test Layer 2 trigger:

    ็”จๆˆท: "ๅ…ณ้”ฎๆ˜ฏ้…็ฝฎ่ฆๆญฃ็กฎ๏ผŒๅˆซๅฟ˜ไบ†ๅค‡ไปฝ"
    Agent: [โญ] ่ฎฐๅฝ•ๅ…ณ้”ฎไฟกๆฏ: ้…็ฝฎ่ฆๆญฃ็กฎ
           [๐Ÿ’พ] ๆทปๅŠ ๅˆฐๅญฆไน ๅ€บๅŠก: ๅˆซๅฟ˜ไบ†ๅค‡ไปฝ
    
  3. Test Multi-Expert mode:

    ็”จๆˆท: "ๅคšไธ“ๅฎถ่ฎจ่ฎบ: ๅฆ‚ไฝ•่ฎพ่ฎกไธ€ไธช้ซ˜ๅนถๅ‘็ณป็ปŸ"
    Agent: [๐Ÿง  ๅคšไธ“ๅฎถๆจกๅผ]
           ๐Ÿ” ็ ”็ฉถๅ‘˜: ...
           ๐Ÿง  ๆžถๆž„ๅธˆ: ...
           ๐Ÿ’ป ๅทฅ็จ‹ๅธˆ: ...
           ๐Ÿ‘‘ ้˜Ÿ้•ฟ: ...
    

Updating

To update the framework while preserving your configurations:

  1. Backup your USER.md and MEMORY.md
  2. Reinstall the skill
  3. Merge your custom configurations back

Resources

All templates are in assets/ directory:

  • Core templates: SOUL.md, AGENTS.md, USER.md, MEMORY.md, HEARTBEAT.md
  • Memory templates: learning-debt.md, constraints.md, preferences.md

Version

v3.2 - Task Layering & Cost Optimization