🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Ai Compound 1.0.1

by @amangarg1999

Make your AI agent learn and improve automatically. Reviews sessions, extracts learnings, updates memory files, and compounds knowledge over time. Set up nightly review loops that make your agent smarter every day.

Versionv1.0.0
Downloads2,709
Installs16
Stars⭐ 4
TERMINAL
clawhub install ai-compound-1-0-1

πŸ“– About This Skill


name: compound-engineering description: Make your AI agent learn and improve automatically. Reviews sessions, extracts learnings, updates memory files, and compounds knowledge over time. Set up nightly review loops that make your agent smarter every day. version: 1.0.0 author: lxgicstudios keywords: compound, learning, memory, automation, agents, clawdbot, improvement, knowledge

Compound Engineering

Make your AI agent learn automatically. Extract learnings from sessions, update memory files, and compound knowledge over time.

The idea: Your agent reviews its own work, extracts patterns and lessons, and updates its instructions. Tomorrow's agent is smarter than today's.


Quick Start

# Review last 24 hours and update memory
npx compound-engineering review

Create hourly memory snapshot

npx compound-engineering snapshot

Set up automated nightly review (cron)

npx compound-engineering setup-cron


How It Works

The Compound Loop

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           DAILY WORK                    β”‚
β”‚  Sessions, chats, tasks, decisions      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        NIGHTLY REVIEW (10:30 PM)        β”‚
β”‚  β€’ Scan all sessions from last 24h      β”‚
β”‚  β€’ Extract learnings and patterns       β”‚
β”‚  β€’ Update MEMORY.md and AGENTS.md       β”‚
β”‚  β€’ Commit and push changes              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        NEXT DAY                         β”‚
β”‚  Agent reads updated instructions       β”‚
β”‚  Benefits from yesterday's learnings    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What Gets Extracted

  • Patterns: Recurring approaches that worked
  • Gotchas: Things that failed or caused issues
  • Preferences: User preferences discovered
  • Decisions: Key decisions and their reasoning
  • TODOs: Unfinished items to remember

  • Clawdbot Integration

    Automatic Hourly Memory

    Add to your HEARTBEAT.md:

    # Hourly Memory Snapshot
    Every hour, append a brief summary to memory/YYYY-MM-DD.md:
    
  • What was accomplished
  • Key decisions made
  • Anything to remember
  • Or use cron:

    # Add to clawdbot config or crontab
    0 * * * * clawdbot cron run compound-hourly
    

    Nightly Review Job

    Add this cron job to Clawdbot:

    {
      "id": "compound-nightly",
      "schedule": "30 22 * * *",
      "text": "Review all sessions from the last 24 hours. For each session, extract: 1) Key learnings and patterns, 2) Mistakes or gotchas to avoid, 3) User preferences discovered, 4) Unfinished items. Update MEMORY.md with a summary. Update memory/YYYY-MM-DD.md with details. Commit changes to git."
    }
    


    Manual Review Command

    When you want to trigger a review manually:

    Review the last 24 hours of work. Extract:

    1. Patterns that worked - approaches to repeat 2. Gotchas encountered - things to avoid 3. Preferences learned - user likes/dislikes 4. Key decisions - and their reasoning 5. Open items - unfinished work

    Update:

  • MEMORY.md with significant long-term learnings
  • memory/YYYY-MM-DD.md with today's details
  • AGENTS.md if workflow changes needed
  • Commit changes with message "compound: daily review YYYY-MM-DD"


    Memory File Structure

    MEMORY.md (Long-term)

    # Long-Term Memory

    Patterns That Work

  • When doing X, always Y first
  • User prefers Z approach for...
  • Gotchas to Avoid

  • Don't do X without checking Y
  • API Z has rate limit of...
  • User Preferences

  • Prefers concise responses
  • Timezone: PST
  • ...
  • Project Context

  • Main repo at /path/to/project
  • Deploy process is...
  • memory/YYYY-MM-DD.md (Daily)

    # 2026-01-28 (Tuesday)

    Sessions

  • 09:00 - Built security audit tool
  • 14:00 - Published 40 skills to MoltHub
  • Decisions

  • Chose to batch publish in parallel (5 sub-agents)
  • Security tool covers 6 check categories
  • Learnings

  • ClawdHub publish can timeout, retry with new version
  • npm publish hangs sometimes, may need to retry
  • Open Items

  • [ ] Finish remaining MoltHub uploads
  • [ ] Set up analytics tracker

  • Hourly Snapshots

    For more granular memory, create hourly snapshots:

    # Creates memory/YYYY-MM-DD-HH.md every hour
    */60 * * * * echo "## $(date +%H):00 Snapshot" >> ~/clawd/memory/$(date +%Y-%m-%d).md
    

    Or have the agent do it via heartbeat by checking time and appending to daily file.


    The Compound Effect

    Week 1: Agent knows basics Week 2: Agent remembers your preferences Week 4: Agent anticipates your needs Month 2: Agent is an expert in your workflow

    Knowledge compounds. Every session makes future sessions better.


    Setup Scripts

    Nightly Review (launchd - macOS)

    
    
    
    
    
      Label
      com.clawdbot.compound-review
      ProgramArguments
      
        /opt/homebrew/bin/clawdbot
        cron
        run
        compound-nightly
      
      StartCalendarInterval
      
        Hour
        22
        Minute
        30
      
    
    
    

    Hourly Memory (crontab)

    # Add with: crontab -e
    0 * * * * /opt/homebrew/bin/clawdbot cron run compound-hourly 2>&1 >> ~/clawd/logs/compound.log
    


    Best Practices

    1. Review before sleep - Let the nightly job run when you're done for the day 2. Don't over-extract - Focus on significant learnings, not noise 3. Prune regularly - Remove outdated info from MEMORY.md monthly 4. Git everything - Memory files should be version controlled 5. Trust the compound - Effects are subtle at first, dramatic over time


    Built by LXGIC Studios - @lxgicstudios


    Built by LXGIC Studios

  • GitHub: github.com/lxgicstudios/ai-compound
  • Twitter: @lxgicstudios
  • πŸ’‘ Examples

    # Review last 24 hours and update memory
    npx compound-engineering review

    Create hourly memory snapshot

    npx compound-engineering snapshot

    Set up automated nightly review (cron)

    npx compound-engineering setup-cron


    πŸ“‹ Tips & Best Practices

    1. Review before sleep - Let the nightly job run when you're done for the day 2. Don't over-extract - Focus on significant learnings, not noise 3. Prune regularly - Remove outdated info from MEMORY.md monthly 4. Git everything - Memory files should be version controlled 5. Trust the compound - Effects are subtle at first, dramatic over time


    Built by LXGIC Studios - @lxgicstudios


    Built by LXGIC Studios

  • GitHub: github.com/lxgicstudios/ai-compound
  • Twitter: @lxgicstudios